Gradle errors while using bubblewrap
Describe the bug The issue was raised on the PWABuilder repo. We use bubblewrap to package TWAs. We have a packaging service that is essentially a wrapper for bubblewrap, and we have seen over the past months that it fails intermittently (around once every two weeks) with a gradle error that can only be fixed by restarting the service on Azure.
- What went wrong: A problem was found with the configuration of task ':app:processReleaseResources' (type 'LinkApplicationAndroidResourcesTask').
File '/opt/android-sdk/platforms/android-31/android.jar' specified for property 'androidJarInput.androidJar' does not exist.
-
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Exception is: org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':app:processReleaseResources' (type 'LinkApplicationAndroidResourcesTask'). at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:71) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78) at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34) at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40) at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28) at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:194) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:186) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114) at org.gradle.api.internal.tasks.
The fact that it gets fixed on restart makes it look like some kind of memory leak/ resource leak issue. Would highly appreciate you guidance on this.
Hi @amrutha95,
This comes from the Gradle command that builds the Android app. I'm not sure it's memory lead related for two reasons:
- The process is not a daemon, meaning that it is killed once the build step is finished and all the memory is freed.
- The error reported points out that the application was unable to find a file:
'/opt/android-sdk/platforms/android-31/android.jar', not that it ran out of memory.
It does seem something is leaving the PWA Builder server in an inconsistent state, but I'm not sure if that's something in Bubblewrap at this point. Can you help with the steps already taken to identify what is causing the issue on PWA Builder?
Having the same issue.