Giter Site home page Giter Site logo

Comments (16)

RexQian avatar RexQian commented on May 24, 2024 5

As @mj-daft mentioned, the non-ascii GITLAB_USER_NAME may cause this issue.

After add "export GITLAB_USER_NAME=GHOST" in before_script, i workaround this issue

before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- export GITLAB_USER_NAME=GHOST
- chmod +x ./gradlew

from gitlab-ci-android.

oliverspryn avatar oliverspryn commented on May 24, 2024 2

Following the advice for this post fixed the issue for me: https://stackoverflow.com/a/47027943 Sounds like Gradle needs more memory than Docker is willing to give it.

from gitlab-ci-android.

FilipIlievski avatar FilipIlievski commented on May 24, 2024 2

This thread helped me solve the issue.

Apparently, it's a low-level memory problem - the execution machine isn't able to allocate enough memory for the heap. I've removed the .gradle directory which freed enough memory for the daemon to be able to work.
You can find the gradle path under Android Studio → Properties → search for "gradle"

from gitlab-ci-android.

flekken avatar flekken commented on May 24, 2024 1

Running the gradle commands with --no-daemon solved this issue for me. Example:
./gradlew --no-daemon assembleDemoDebug

from gitlab-ci-android.

jangrewe avatar jangrewe commented on May 24, 2024

I don't see how this could be an issue of the Docker image. Have you inspected the container after it died? Especially the State section? It should tell you a bit more about what happened.
Example:

$ docker inspect my_container_name
[
    {
        "State": {
            "Status": "created",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 127,
            "Error": "OCI runtime create failed: container_linux.go:296: starting container process caused \"exec: \\\"/usr/bin/bash\\\": stat /usr/bin/bash: no such file or directory\": unknown",
            "StartedAt": "0001-01-01T00:00:00Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        }
[...]

from gitlab-ci-android.

AngryBaby avatar AngryBaby commented on May 24, 2024

@jangrewe
"State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 1752, "ExitCode": 0, "Error": "", "StartedAt": "2018-02-27T02:36:03.361738116Z", "FinishedAt": "2018-02-26T11:14:43.663727688Z" },

from gitlab-ci-android.

AngryBaby avatar AngryBaby commented on May 24, 2024

@jangrewe
i copy your gitlab-ci.yml to my project and change args, run in the docker, then occur this error

from gitlab-ci-android.

jangrewe avatar jangrewe commented on May 24, 2024

So that's not the container dying, as it's always still Running.
Does your Gradle task run fine outside of the container?

from gitlab-ci-android.

jangrewe avatar jangrewe commented on May 24, 2024

Did you try, as instructed by Gradle:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

from gitlab-ci-android.

mj-daft avatar mj-daft commented on May 24, 2024

I see, your GITLAB_USER_NAME=????????? is not encoded property in environment variables. This may help: gradle/gradle#3117

from gitlab-ci-android.

KishoreBabuIN avatar KishoreBabuIN commented on May 24, 2024

@oliverspryn how would one increase the allowed memory when I'm using this in gitlab ci? is there any menu options? or any other way?

from gitlab-ci-android.

RexQian avatar RexQian commented on May 24, 2024

add unicode support to docker image may fix this issue

gradle/gradle#3117 (comment)

from gitlab-ci-android.

divanvb avatar divanvb commented on May 24, 2024

I'm facing this issue and none of the above works for me. Anyone that can assist, please?

  • Running on GitLab CI
  • Used --no-daemon but it still starts
  • Changed the name but still fails

Don't know what else to try

* Exception is:
org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
	at org.gradle.launcher.daemon.client.DaemonClient.handleDaemonDisappearance(DaemonClient.java:242)
	at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:218)
	at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:179)
	at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:54)
	at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:37)
	at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:52)
	at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:207)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:402)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:375)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:37)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:368)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:298)
	at org.gradle.launcher.Main.doAction(Main.java:36)
	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:23)
	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:30)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)


* Get more help at https://help.gradle.org
ERROR: Job failed: exit code 1

from gitlab-ci-android.

divanvb avatar divanvb commented on May 24, 2024

Searched around and it seems like because I use git-cz which adds emoticons to the commit messages, it bombs out. This issue is apparently fixed in version 5.3 & above of gradle. Can you update the version, please?

from gitlab-ci-android.

juanfer0002 avatar juanfer0002 commented on May 24, 2024

Hi,

I'm using gradle wrapper, so I updated to 5.5.1 version in gradle-wrapper.properties. After this I ran ./gradlew --no-daemon <task>.

I also added org.gradle.daemon=false to gradle.properties

This solved my issue

from gitlab-ci-android.

julianmojico avatar julianmojico commented on May 24, 2024

Downgrade gradle to version 5.3

./gradlew wrapper --gradle-version=5.3

This fixed the issue for me.

from gitlab-ci-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.