Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The process '/Users/runner/work/1/s/gradlew' failed with exit code 1 #9924

Closed
2 of 14 tasks
LeeCeline opened this issue May 24, 2024 · 22 comments
Closed
2 of 14 tasks

The process '/Users/runner/work/1/s/gradlew' failed with exit code 1 #9924

LeeCeline opened this issue May 24, 2024 · 22 comments

Comments

@LeeCeline
Copy link

Description

While running the pipeline in azure devops for Android application, there was an issue due to which the pipeline failed -
"The process '/Users/runner/work/1/s/gradlew' failed with exit code 1"
Here is the iscreenshot
image

What can be done to mitigate the above issue as sometimes when we are running the pipeline, pipeline is successful but sometimes it is getting the error as mentioned above.
Recently it has started failing a lot and success rate is a bit low which is causing problem as it is much more time consuming.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Runner Image
Image: macos-12
Version: 20240514.3
Included Software: https://github.com/actions/runner-images/blob/macOS-12/20240514.3/images/macos/macos-12-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20240514.3
Runner Image Provisioner
2.0.369.1+55cddbb57f254a369b6e7b3b508cebdbee5d24be
Current image version: '20240514.3'

Is it regression?

Yes, but could not provide build link

Expected behavior

Pipeline should be working as expected.

Actual behavior

It was working few days ago, but currently not working as mentioned in description.

Repro steps

Android

Build your Android project with Gradle.

Add steps that test, sign, and distribute the APK, save build artifacts, and more:

https://docs.microsoft.com/azure/devops/pipelines/languages/android

name: '$(prime).$(major).$(minor)'

pool:
vmImage: 'macos-latest'

steps:

  • task: Bash@3
    inputs:
    targetType: 'inline'
    script: |
    #!/usr/bin/env bash
    MANIFEST_PATH=app/src/main/AndroidManifest.xml
    VERSION_NAME=$(prime).$(major).$(minor)
    BUILD_NUMBER=$(Build.BuildId)
    TEMP_MANIFEST_PATH=${MANIFEST_PATH}.txt
    echo "Version Code=$BUILD_NUMBER"
    echo "Version Name=$VERSION_NAME"
    cat ${MANIFEST_PATH} | sed "s/android:versionCode="."/android:versionCode="${BUILD_NUMBER}"/" > ${TEMP_MANIFEST_PATH}
    cat ${TEMP_MANIFEST_PATH} | sed "s/android:versionName=".
    "/android:versionName="${VERSION_NAME}"/" > ${MANIFEST_PATH}
    rm -f ${TEMP_MANIFEST_PATH}

  • task: Gradle@2
    inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    gradleOptions: '-Xmx3072m'
    javaHomeOption: 'JDKVersion'
    jdkVersionOption: '1.8'
    jdkArchitectureOption: 'x64'
    publishJUnitResults: false
    testResultsFiles: '**/TEST-*.xml'
    tasks: assembleINTRelease

  • task: AndroidSigning@3
    inputs:
    apkFiles: '**/*.apk'
    apksignerKeystoreFile: 'android_keystore'
    apksignerKeystorePassword: '$(keystorePassword)'
    apksignerKeystoreAlias: '$(keystoreAlias)'
    apksignerKeyPassword: '$(keystoreAliasPassword)'
    apksignerArguments: '--v1-signing-enabled true --v2-signing-enabled true --verbose'
    zipalign: false

  • task: CopyFiles@2
    inputs:
    contents: '**/*.apk'
    targetFolder: '$(build.artifactStagingDirectory)'

  • task: PublishBuildArtifacts@1

  • task: AppCenterDistribute@3
    inputs:
    serverEndpoint: 'Daimler_Android_AppCenter'
    appSlug: 'Daimler-Care4Me-1/Care4Me-Int-1'
    appFile: '$(build.artifactStagingDirectory)/**/*.apk'
    symbolsOption: 'Android'
    releaseNotesOption: 'input'
    releaseNotesInput: 'Automated Release'
    destinationType: 'groups'

@TteamMBK
Copy link

HI team,

this is a urgent issue, we require immediate help on this.

@erik-bershel erik-bershel added the investigate Collect additional information, like space on disk, other tool incompatibilities etc. label Jun 5, 2024
@erik-bershel
Copy link
Contributor

erik-bershel commented Jun 5, 2024

Hey @LeeCeline and @TteamMBK!

Unfortunately, it is not possible to investigate the problem using the information provided. Could you provide an example project with the repro steps? It will also be very cool if you can give access to fallen runs.
I would also like to receive answers to the following questions:

  • when exactly did "stable" problems with builds start (date and version of the image)?
  • were there similar problems before, but with a lower fail rate?

Our test projects with gradle work, but there is a possibility that your problem is related to Android more than gradle. We have recently fully migrated to the new service provider for macOS-12 images which has the next problem:
https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators
The other bad news is that all macOS-13 and macOS-14 images are also hosted on this hypervisor. I think that your build fails on the test stage with an emulator productivity bug. But please feel free to correct me if I wrong.

@TteamMBK
Copy link

Hi @erik-bershel

I confirm that there were similar problems before also, but with a lower fail rate.
Here are some failure records, with name and date.
image

As i can see, we are able to build the project without any error on android studio.

For providing access to fallen runs, we are checking internally that we can provide it to you or not due to policies.

@erik-bershel erik-bershel added bug Something isn't working duplicate This issue or pull request already exists and removed Area: Java investigate Collect additional information, like space on disk, other tool incompatibilities etc. labels Jun 10, 2024
@erik-bershel
Copy link
Contributor

Hey @TteamMBK!

I confirm that there were similar problems before also, but with a lower fail rate.

Then I can say with confidence that your builds are not compatible with the current runners realisation, unfortunately.
All I can recommend is to try hints from https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators or to set delay to allow Android emulator to boot. In some cases using GitHub larger runners helps also, but rarely.

I'm going to close this issue as a duplicate of #9194. Unfortunately, we cannot help with this.

@TteamMBK
Copy link

Hi @erik-bershel

Could you please elaborate about "our builds are not compatible with the current runners realisation". So we can understand better and try to approach in a correct way.

@erik-bershel
Copy link
Contributor

Hey @TteamMBK!

Please read the description here: https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators.
Another examples: #9436, #9199, #9194

Anka does not support some nested virtualisation features because of some issues with the Apple virtualisation API. It results in poor Android emulator productivity.

@TteamMBK
Copy link

@erik-bershel

I went through the sites you provided, but still i am not getting why we are referring our R&D towards android emulator.
Please make me clear that it is an android studio/emulator issue or pipeline issue or git issue.

FYI, i am asking you because recently pipeline got success once. we are still not understanding that "why is our pipeline getting failed sometimes"

We are open to connect with you on teams for better understanding of the issue. As we already mentioned, we need to find out its solution asap.

@erik-bershel
Copy link
Contributor

Hey @TteamMBK!

Sure! Let's start from the beginning.

At what step exactly does your build fail? Judging by the available information, it crashes during the testing stage. Since I have no other information about the code/config, I make the assumption that your project can also test the application using the Android Emulator. But as of recently, the already rather poor performance of this tool has reached its minimum among macOS runners due to our platform migration. The emulator's startup time exceeds that of almost any automatic tool which results in timeout while running tests. After the migration all the agents affected by https://docs.veertu.com/anka/anka-virtualization-cli/nested-virtualization/#android-emulators

At the same time, I cannot guarantee 100% that the problem is in the Android emulator - with the available information I can only guess.

We are open to connect with you on teams for better understanding of the issue. As we already mentioned, we need to find out its solution asap.

When you can provide more detailed information about the problem including an example-project or appropriate repro-steps, we can return to investigating the issue. Unfortunately, we do not directly support custom builds.

@TteamMBK
Copy link

Hi @erik-bershel

I understood.
As i mention above that recently, pipeline got success. So, can i provide you the pipeline success logs also.
May be you will get something helpful from it.
Success pipeline logs.txt

image
We are discussing internally for it, I will let you know in next some hours.

@erik-bershel
Copy link
Contributor

@TteamMBK is it possible to provide failed run logs too?
Also, please drop a couple of links to the latest successful and unsuccessful launches (just mark, please, which is which) - then I can check what is happening with the resources.

@TteamMBK
Copy link

TteamMBK commented Jun 12, 2024

@erik-bershel

Here are the failed logs.
Failed pipeline logs.txt

image

@erik-bershel
Copy link
Contributor

@TteamMBK great, I'll take a look later. Please do not forget about build links also. No matter if private project - I don't need to open it.

@TteamMBK
Copy link

@erik-bershel

could you please let me know, from where i can get Build links ?

@erik-bershel
Copy link
Contributor

erik-bershel commented Jun 12, 2024

@TteamMBK

Screenshot 2024-06-12 at 13 28 42

@TteamMBK
Copy link

@erik-bershel erik-bershel reopened this Jun 12, 2024
@TteamMBK
Copy link

Hi @erik-bershel

is there any update on the issue ?

@TteamMBK
Copy link

TteamMBK commented Jul 1, 2024

Hi @erik-bershel

Its been 2 weeks, we are in very urgent situation, this pipeline issue is creating a blockage for our application release and has many bad impact on business.
Could you please help us on priority to fix this issue together.

@vinaynaikr08
Copy link

vinaynaikr08 commented Jul 8, 2024

Hi @TteamMBK

Is the issue still ongoing? Could you please attach the latest failure and success logs so that we can analyze them?

@TteamMBK
Copy link

TteamMBK commented Jul 8, 2024

Hi @vinaynaikr08,

Our project is in very difficult situation right now, we are facing blockage because of the pipeline issue. Please try to provide quick support.
I am sharing success and failure logs of pipeline. Please analyse and let me know if you need any other details.

latest failed logs.txt
latest success logs.txt

@TteamMBK
Copy link

Hi @erik-bershel

any updates on the tickets.

@erik-bershel
Copy link
Contributor

Hey @TteamMBK!

After a dipper investigation of the failed run logs I may say that the issue itself should not be related to the virtualisation platform changes as I thought. There is no sign of resource related issues nether timeouts. From logs I found only some build issue that seems to be project and/or dependencies related.
Please run your build with the Gradle debug options like these to see more:

steps:
- task: Gradle@2
  inputs:
    workingDirectory: ''
    gradleWrapperFile: 'gradlew'
    options: '$current_options --debug --stacktrace'

In general we do not solve this kind of issues, but lets see more informative output just in case we could help.

@erik-bershel erik-bershel added Area: Common Tools and removed bug Something isn't working duplicate This issue or pull request already exists labels Jul 22, 2024
@erik-bershel
Copy link
Contributor

Hey @TteamMBK!

Feel free to ping me when new logs collected. I'm closing this now as a stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants