Closed Bug 1963710 Opened 12 days ago Closed 5 days ago

:geckoview:compileDebugJavaWithJavac failure: "Cannot query the value of this provider because it has no value available" after bootstrap

Categories

(Firefox Build System :: Bootstrap Configuration, defect, P3)

defect

Tracking

(firefox140 fixed)

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: matt-tighe, Assigned: ahochheiden)

Details

Attachments

(1 file)

Ran into a build issue with the following error. IIRC, this was my build immediately following mach bootstrap swapping from a non-artifact Android build to an artifact Android build.

 0:37.99 [Incubating] Problems report is available at: file:///Users/mtighe/dev/mozilla-unified/build/reports/problems/problems-report.html
 0:37.99 FAILURE: Build failed with an exception.
 0:37.99 * What went wrong:
 0:37.99 Could not determine the dependencies of task ':geckoview:compileDebugJavaWithJavac'.
 0:37.99 > Cannot query the value of this provider because it has no value available.
 0:37.99 * Try:
 0:37.99 > Run with --stacktrace option to get the stack trace.
 0:37.99 > Run with --info or --debug option to get more log output.
 0:37.99 > Run with --scan to get full insights.
 0:37.99 > Get more help at https://help.gradle.org.
 0:37.99 Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
 0:37.99 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
 0:37.99 For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
 0:37.99 BUILD FAILED in 6s
 0:37.99 12 actionable tasks: 12 executed
 0:37.99 Configuration cache entry stored.
 0:38.05 make[3]: *** [recurse_android-archive-geckoview] Error 1
 0:38.05 make[2]: *** [android-archive-geckoview] Error 2
 0:38.05 make[1]: *** [default] Error 2
 0:38.05 make: *** [build] Error 2
 0:38.15 W 0 compiler warnings present.

:nalexander helped me dig in, and running mach gradle :geckoview:assembleDebug displayed another error in building exoplayer2. Running
mach gradle :exoplayer2:assembleDebug led us to a more clear error message:

Execution failed for task ':exoplayer2:parseDebugLocalResources'.
> Could not resolve all files for configuration ':exoplayer2:androidApis'.
   > Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for PlatformAttrTransform: /Users/mtighe/.mozbuild/android-sdk-macosx/platforms/android-36/android.jar.
         > /Users/mtighe/.mozbuild/android-sdk-macosx/platforms/android-36/android.jar

However, inspecting that directory led us to find that android.jar was in fact missing. Reinstalling the sdk through Android Studio SDK Manager resolved the issue for now.

As discussed on Slack, :nalexander and I both think that something weird with the sdkmanager tool probably caused this. It probably wasn't explicitly caused by code on our end in android.py. Upgrading from an older android SDK to a newer version could possibly be the trigger, though.

Unless more people encounter this regularly, it's probably not worth the time trying to find a way to reproduce the issue and fully resolve it. Let's hope this was a one-off.

One thing we can do, is add a check for android.jar in configure like we do for emulator and adb here. That would make diagnosing this easier. Any time ./mach build is invoked, so is ./mach configure, and if a critical file is missing the error message would make it more obvious that re-installing the android SDK may resolve the issue.

Severity: -- → S3
Priority: -- → P3

The existing check_android_tools helper only locates executables. I've added
a new check_file template that can search for any file type (e.g. .jar).

Assignee: nobody → ahochheiden
Status: NEW → ASSIGNED
Pushed by ahochheiden@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5a2db12c47a7 Check for `android.jar` at the end of `android-sdk.configure` r=firefox-build-system-reviewers,nalexander
Status: ASSIGNED → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: