"JavaLocationFailedException" should be considered a user error, not a mach failure
Categories
(Firefox Build System :: Bootstrap Configuration, task, P3)
Tracking
(Not tracked)
People
(Reporter: bdekoz, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug)
./mach boostrap for android non-artifact on Fedora 33/linux fails.
The details of the failure are as follows:
mozboot.util.JavaLocationFailedException: The $JAVA_HOME environment variable ("/etc/alternatives/jre") is pointing to a Java installation with version "11". Howevever, Firefox depends on version 1.8. Please change $JAVA_HOME.
File "/home/bkoz/src/mozilla-gecko.git/python/mozboot/mozboot/mach_commands.py", line 58, in bootstrap
bootstrapper.bootstrap()
File "/home/bkoz/src/mozilla-gecko.git/python/mozboot/mozboot/bootstrap.py", line 422, in bootstrap
getattr(self.instance, "install_%s_packages" % application)(mozconfig_builder)
File "/home/bkoz/src/mozilla-gecko.git/python/mozboot/mozboot/centosfedora.py", line 113, in install_mobile_android_packages
self.ensure_mobile_android_packages(mozconfig_builder, artifact_mode=False)
File "/home/bkoz/src/mozilla-gecko.git/python/mozboot/mozboot/centosfedora.py", line 140, in ensure_mobile_android_packages
self.ensure_java(mozconfig_builder)
File "/home/bkoz/src/mozilla-gecko.git/python/mozboot/mozboot/base.py", line 891, in ensure_java
bin_dir = locate_java_bin_path()
File "/home/bkoz/src/mozilla-gecko.git/python/mozboot/mozboot/util.py", line 103, in locate_java_bin_path
raise JavaLocationFailedException(
Sentry event ID: 070466edd2084fe4a5b37c1da8e194f9
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
same bootstrap works fine for desktop non-artifact
Comment 1•3 years ago
•
|
||
same bootstrap works fine for desktop non-artifact
That makes sense because we only need Java when we're compiling Java for Android (there's no Java code for desktop).
The $JAVA_HOME environment variable ("/etc/alternatives/jre") is pointing to a Java installation with version "11"
You need to have Java 8 as your default Java - Java 11 is too new.
This reply on reddit explains that you can change your default Java with sudo alternatives --config java
Let's leave this ticket open: when this situation occurs, a stack trace shouldn't be raised and Sentry shouldn't report an issue, since this isn't a failure by mach - it's a situation that needs to be resolved on the user's machine.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•