You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/02 09:32:30 UTC

[GitHub] [cordova-android] gartorware opened a new issue #1011: Build ignores gradle.properties

gartorware opened a new issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011


   # Bug Report
   
   ## Problem
   
   Starting with cordova-android 9, builds on relatively large project are failing because of lack of memory. After a while we can see this message printed on console `expiring daemon because jvm heap space is exhausted` then the build finally fails.
   
   In _platforms/android/gradle.properties_ file I can see the following property:
   `org.gradle.jvmargs=-Xmx2048m`
   
   But after launching a build `ps aux` shows that gradle daemon is being started with default options
   ```
   user    143945  156  2.7 3788756 225600 ?      Ssl  11:03   0:04 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/user/.gradle/wrapper/dists/gradle-6.5-all/2oz4ud9k3tuxjg84bbf55q0tn/gradle-6.5/lib/gradle-launcher-6.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.5
   ```
   Note the **-Xmx512m** argument, which is the default in gradle 6.5.
   
   I have tried to add other options to that file (ie `org.gradle.logging.level=debug`) but is getting ignored as well.
   
   If instead I cd into _platforms/android_ and launch gradle bypassing cordova with `./gradlew bundleRelease` the file is honored and the build success.
   
   Also, If I place the very same gradle.properties file under `$GRADLE_USER_HOME` the file is honored and the build success even with cordova build.
   
   ### What is expected to happen?
   
   gradle.properties file should be honored so the build could success.
   
   ### What does actually happen?
   
   gradle.properties file is being ignored so the build fails because of lack of memory.
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   Problem can be reproduced on simple cordova android project with a `gradle.properties` file. That file seems to be ignored.
   In our case problem started after upgrading to cordova-android 9.
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   Just a cordova android project with gradle.properties file under platforms/android and built with `cordova build --release`
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   Ubuntu 20.04. Android platform.
   
   ### Version information
   <!--
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   cordova-cli 9.0.0 (cordova-lib@9.0.1)
   cordova-lib@9.0.1 with:
     cordova-common@3.2.1
     cordova-create@2.0.0
     cordova-fetch@2.0.1
     cordova-serve@3.0.0
   
   Environment: 
     OS: linux - Ubuntu 20.04 LTS
     Node: v12.16.2
     npm: 6.14.4
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011#issuecomment-653835084


   > If instead I cd into platforms/android and launch gradle bypassing cordova with ./gradlew bundleRelease the file is honored and the build success.
   
   Does the problem reproduce say if you run `gradlew` from a different directory, like the cordova root project?
   
   `./platforms/android/gradlew bundleRelease`
   
   Lots of changes have been made on how we call on sub processes... so my running theory is that the working directory has changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek closed issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
breautek closed issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek edited a comment on issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011#issuecomment-653836341


   Nevermind I've confirmed the bug, and it is indeed a current working directory issue. PR incoming :grin: 
   
   Feel free to try out the PR https://github.com/apache/cordova-android/pull/1018 to confirm that it fixes the problem for you.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] gartorware removed a comment on issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
gartorware removed a comment on issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011#issuecomment-652907862


   I just tried to downgrade cordova-android version to 8.1.0 on the same project. File seems to be honored in this case:
   ```
   user    148676  219  2.5 5480220 206888 ?      Ssl  11:45   0:04 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/user/Programs/gradle/gradle-6.2/lib/gradle-launcher-6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.2
   ```
   Note the **-Xmx2048m** argument.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] gartorware commented on issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
gartorware commented on issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011#issuecomment-652907862


   I just tried to downgrade cordova-android version on the same project. File seems to be honored in this case:
   ```
   user    148676  219  2.5 5480220 206888 ?      Ssl  11:45   0:04 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/user/Programs/gradle/gradle-6.2/lib/gradle-launcher-6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.2
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011#issuecomment-653836341


   Nevermind I've confirmed the bug, and it is indeed a current working directory issue. PR incoming :grin: 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] gartorware edited a comment on issue #1011: Build ignores gradle.properties

Posted by GitBox <gi...@apache.org>.
gartorware edited a comment on issue #1011:
URL: https://github.com/apache/cordova-android/issues/1011#issuecomment-652907862


   I just tried to downgrade cordova-android version to 8.1.0 on the same project. File seems to be honored in this case:
   ```
   user    148676  219  2.5 5480220 206888 ?      Ssl  11:45   0:04 /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/user/Programs/gradle/gradle-6.2/lib/gradle-launcher-6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.2
   ```
   Note the **-Xmx2048m** argument.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org