question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Windows] Bubblewrap Build failing at gradlew.bat

See original GitHub issue

Describe the bug Started experimenting with Bubblewrap today. Ran into this issue. It was coincidently reported and fixed within 10 minutes. Now, at the last build step I am getting the below error:

cli ERROR Command failed: gradlew.bat assembleRelease --stacktrace

FAILURE: Build failed with an exception.

  • What went wrong: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/6.1.1/userguide/gradle_daemon.html Process command line: C:\Users\xxx.bubblewrap\jdk\jdk8u265-b01\bin\java.exe -Xmx1536m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\xxx.gradle\wrapper\dists\gradle-6.1.1-bin\4i3ntwqiazourd86epxcz427c\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.1.1 Please read the following process output to find out more:

Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap

  • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Exception is: org.gradle.api.GradleException: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/6.1.1/userguide/gradle_daemon.html Process command line: C:\Users\xxx.bubblewrap\jdk\jdk8u265-b01\bin\java.exe -Xmx1536m -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\xxx.gradle\wrapper\dists\gradle-6.1.1-bin\4i3ntwqiazourd86epxcz427c\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.1.1 Please read the following process output to find out more:


Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap

    at org.gradle.launcher.daemon.client.DaemonGreeter.parseDaemonOutput(DaemonGreeter.java:38)
    at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startProcess(DefaultDaemonStarter.java:175)
    at org.gradle.launcher.daemon.client.DefaultDaemonStarter.startDaemon(DefaultDaemonStarter.java:137)
    at org.gradle.launcher.daemon.client.DefaultDaemonConnector.doStartDaemon(DefaultDaemonConnector.java:217)
    at org.gradle.launcher.daemon.client.DefaultDaemonConnector.startDaemon(DefaultDaemonConnector.java:211)
    at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:133)
    at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:140)
    at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:94)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:56)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:212)
    at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:404)
    at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:376)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:38)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
    at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:369)
    at org.gradle.launcher.Main.doAction(Main.java:35)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:31)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

To Reproduce I ran the command bubblewrap init --manifest https://my-twa.com/manifest.json which worked fine. Then I ran bubblewrap build which produced the above error. I see that the error is similar to this report, but its specific to MacOS I think, and mine is on Windows.

I installed JDK & Android SDK using Bubblewrap’s prompt itself. So not using any manual configuration either.

Desktop (please complete the following information):

  • OS: Windows 10

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
andrebancommented, Mar 4, 2021

Thanks. Does this help: https://stackoverflow.com/questions/30045417/android-gradle-could-not-reserve-enough-space-for-object-heap

Can you try editing the gradle.properties file in the generated project and comment out the line with org.gradle.jvmargs=-Xmx1536m and try running build again (PS: running bubblewrap update will revert this change).

0reactions
andrebancommented, Apr 13, 2021

Sgtm

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bubblewrap build fails, FAILURE: Build failed with an exception
Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. · Exception is: org.gradle.api.internal....
Read more >
Gradle Wrapper Error (Build failing) - MSDN - Microsoft
I have code that runs perfectly with AndroidStudio but once I uploaded onto VSTS and tried building it, the gradlew build fails and...
Read more >
tangrams/tangram-chat - Gitter
Issue 1) Got this error while trying to use the dependency you mentioned "ERROR: Failed to resolve: com.mapzen.tangram:tangram:0.10.2-SNAPSHOT". That is curious ...
Read more >
error: command failed: gradlew.bat app ... - You.com
we should shift right of CLI commands on Windows 10. type 'cmd' to use the command line tool on by right click, choose...
Read more >
Guide to the Gradle Wrapper - Baeldung
2. Gradle Wrapper · Build a project with Wrapper on any machine without the need to install Gradle first · Have a fixed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found