Closed Bug 1292762 Opened 3 years ago Closed 3 years ago

Intermittent gmake[5]: *** [.gradle.deps] Error 1 | gmake[4]: *** [mobile/android/base/libs] Error 2 due to "Failed to apply plugin [id 'android-sdk-manager'] error"

Categories

(Taskcluster :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla51

People

(Reporter: philor, Unassigned)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

https://public-artifacts.taskcluster.net/CLl5IhrdQbSyrJfGdhm95g/0/public/logs/live_backing.log

22:59:54     INFO -  /home/worker/workspace/build/src/mach gradle \
22:59:54     INFO -  		app:assembleAutomationDebug app:assembleAutomationDebugAndroidTest -x lint
22:59:56     INFO -  Starting a new Gradle Daemon for this build (subsequent builds will be faster).
22:59:59     INFO -  Parallel execution is an incubating feature.
23:00:06     INFO -  FAILURE: Build failed with an exception.
23:00:06     INFO -  * Where:
23:00:06     INFO -  Build file '/home/worker/workspace/build/src/mobile/android/app/build.gradle' line: 3
23:00:06     INFO -  * What went wrong:
23:00:06     INFO -  A problem occurred evaluating project ':app'.
23:00:06     INFO -  > Failed to apply plugin [id 'android-sdk-manager']
23:00:06     INFO -     > Specified SDK directory '/home/worker/.android-sdk' in 'local.properties' is not found.
23:00:06     INFO -  * Try:
23:00:06     INFO -  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
23:00:06     INFO -  BUILD FAILED
Summary: TC Android builds intermittently fail after "Specified SDK directory '/home/worker/.android-sdk' in 'local.properties' is not found. " → TC Android gradle builds intermittently fail after "Specified SDK directory '/home/worker/.android-sdk' in 'local.properties' is not found. "
Looks like this is a legit issue with android-sdk-manager not creating the directory it's going to install into.  I'll try to get to it Monday.
What the heck, let's go with the summary that will cause someone other than just me to star it.
Summary: TC Android gradle builds intermittently fail after "Specified SDK directory '/home/worker/.android-sdk' in 'local.properties' is not found. " → Intermittent gmake[5]: *** [.gradle.deps] Error 1 | gmake[4]: *** [mobile/android/base/libs] Error 2 due to "Failed to apply plugin [id 'android-sdk-manager'] error"
Duplicate of this bug: 1299188
(In reply to Nick Alexander :nalexander from comment #12)
> Created attachment 8786886 [details]
> Bug 1292762 - Set GRADLE_USER_HOME to avoid sdk-manager-plugin intermittent.
> 
> Review commit: https://reviewboard.mozilla.org/r/75772/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/75772/

sebastian: I think what is happening is that the build is starting in Gradle's "online" mode.  The sdk-manager-plugin blows through the check at https://github.com/JakeWharton/sdk-manager-plugin/blob/1d29782dd6ffa18880c8cbada748fb3dea45e7be/src/main/groovy/com/jakewharton/sdkmanager/SdkManagerPlugin.groovy#L23 and immediately goes to work, trying to verify the SDK.  It fails, since we don't have local.properties in place on the builders.  This should avoid that.

I would prefer to ensure the plugin runs and succeeds, but we really need to not be "online" when building (except for the explicit Gradle dependency fetching build, of course).  So that's not feasible.
Comment on attachment 8786886 [details]
Bug 1292762 - Set GRADLE_USER_HOME to avoid sdk-manager-plugin intermittent.

https://reviewboard.mozilla.org/r/75772/#review73910
Attachment #8786886 - Flags: review?(s.kaspari) → review+
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c1d4822a2127
Set GRADLE_USER_HOME to avoid sdk-manager-plugin intermittent. r=sebastian
https://hg.mozilla.org/mozilla-central/rev/c1d4822a2127
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Blocks: 1305602
You need to log in before you can comment on or make changes to this bug.