File already exists error when building aab

Bitrise Build Issue Report template

Description of the issue

Bitrise is uploading two .aab files to deploy directory

e[34;1mMove APK and AAB files...e[0m
copy app/build/intermediates/intermediary_bundle/release/app-release.aab to /bitrise/deploy/app-release.aab
e[33;1m  1 attempt failed:e[0m
file already exists at: /bitrise/deploy/app-release.aab
e[33;1m  Retrying...e[0m
copy app/build/outputs/bundle/release/app-release.aab to /bitrise/deploy/app-release20190815132132.aab
e[32;1mThe app path is now available in the Environment Variable: $BITRISE_AAB_PATH (value: /bitrise/deploy/app-release20190815132132.aab)e[0m
e[32;1mThe app paths list is now available in the Environment Variable: $BITRISE_AAB_PATH_LIST (value: /bitrise/deploy/app-release.aab|/bitrise/deploy/app-release20190815132132.aab)e[0m

I know from similar issue File already exists error that this happens if first file already exists. However, unlike other bug, we are only running one gradle build task. This started after we migrated from generating apks to aabs.

I can’t see from the logs where we initially moved app-release.aab to deploy directory. So I don’t know how there is already a duplicate.

Environment:

Linux

2xCPU (n1) / 7.5 GB RAM

macOS

2xCPU (Intel Xeon E5-2697 v2) / 4 GB RAM

Which build Step causes the issue and which version of the step?

  • gradle-runner:
    inputs:
    - gradle_file: “$GRADLE_BUILD_FILE_PATH”
    - gradle_task: app:bundleRelease
    - gradlew_path: “$GRADLEW_PATH”
    title: Build and sign release app bundle

Reproducibility

  • Does a “Rebuild” help? : NO
  • Does a rebuild without caches help? not sure
  • Does the issue happen sporadically, or every time? : EVERY TIME
  • Does upgrading the build Step to the latest version help? : already latest
  • When did the issue start? : when we switched to building .aab

Hello there @jason.atwood ! :wave:

Can you please send us the log file or the URL of the related build and also enable Support Access on the Settings tab of the app ( Enabling the Bitrise Support user for your app | Bitrise DevCenter ) so that we can take a more in-depth look? :slightly_smiling_face:

https://app.bitrise.io/build/9522a42eb4005261#?tab=log

Hi Jason! :wave: Thank you for providing us support access. Would it be okay if I run a couple test builds to attempt to troubleshoot the issue?

@ahvth-bitrise I have the same issue.
Build url: https://app.bitrise.io/build/cff4bc91cdb4ea53#?tab=log
Feel free to run test builds.

Let’s coordinate offline. Email me @ jason@orionlabs.io

UPDATE: looks like this topic got closed after no replies but as of 12/2019 this is still happening.

Thanks for the builds @jason.atwood and @koral, the team will be investigating this!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.