upload-google-play: Failed to publish AAB with error

Describe the bug Am randomly facing the below error: image

Workflow Step Configuration ``

      - name: Publish AAB to Google Play
        uses: r0adkll/upload-google-play@v1
        with:
          serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
          packageName: com.android.demo.preprod
          releaseFiles: ./apps/***/build/outputs/bundle/preprod/***-preprod.aab
          track: ${{ env.RELEASE_TRACK }}
          releaseName: ${{ env.VERSION_CODE }} (${{ env.VERSION_NAME }})
          inAppUpdatePriority: ${{ env.IN_APP_UPDATE_PRIORITY }}

Step Debugging

At the moment, I don’t have the debug logs. I’ll share them with you once I’ve collected this information from the workflow.

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Reactions: 36
  • Comments: 44

Commits related to this issue

Most upvoted comments

Alright, version 1.1.2 worked for us, but not on the first try. It took 5-6 attempts to successfully upload the file to the Play Store.

Is it possible to implement a retry option? This way, it could automatically retry the file submission to the Play Store if it fails, with an adjustable amount of time between each retry.

This is the solution that Fastlane has come up with. cc @boswelja

I didn’t see any potential problems related to authentication in this code. I agree with @boswelja, it’s definitely a Google related problem(maybe API library, maybe backend). Anyway, this issue broke my pipeline, I don’t want to return to the stone age and publish apps by hand. I can suggest wrapping the upload action with retry-action, I don’t know what consequences this can lead to. Depending on the step where it fails, it can create a new release on every retry for example. In my tests, it fails on uploadReleaseFiles. If it always the case, then, my opinion, this retry mechanism will not lead to any problems.

@boswelja Sorry, I just saw your response. I’m not sure if Google is aware of the issue or not, but as everything Google I’m sure they will move at a glacial pace to fix it after ignoring it for a while. Github Actions doesn’t offer a retry mechanism besides running a custom run command, which gets very messy and complex.

I put up a PR for a try mechanism if you’re interested! No hard feelings at all if you don’t feel comfortable with the solution. I would test it locally, but I’m not sure how so I’d recommend keeping that in mind.

I have just published a release that bumps all versions - including androidpublisher. Let me know if you see a change in the status of this.

For now, I will mark this as invalid since it seems to be on Google’s side

old code:

`

  - name: "LLL -> Google Play --> 2: Upload to Google Play Console"
    if: ${{ env.BUILD_ENV_AAB_PACKAGE_TYPE == 'true' }}
    id: upload_to_google_play_console
    uses: r0adkll/upload-google-play@v1.0.19
    with:
      releaseFiles: "${{env.ARTIFACT_AAB_PATH}}"
      serviceAccountJson: "./${{env.GOOGLE_SERVICE_ACCOUNT_JSON}}"
      packageName: "${{env.APP_PACKAGE_NAME}}"
      track: "${{env.BUILD_ENV_GOOGLE_PLAY_TRACK}}"
      whatsNewDirectory: "${{env.OUTPUT_WHATSNEW_EN_US}}"
      releaseName: "${{env.BUILD_ENV_VERSION_NAME}}"
      status: completed
      mappingFile: "./${{env.CURRENT_REPO}}/app/build/outputs/mapping/${{env.BUILD_ENV_BUILD_TYPE_LOWER_CASE}}Release/mapping.txt"

`

code with retry:

`

  - name: "LLL -> Google Play --> 3: Upload to Google Play Console, max retry 10 times"
    uses: Wandalen/wretry.action@v1.3.0
    if: ${{ env.BUILD_ENV_AAB_PACKAGE_TYPE == 'true' }}
    id: upload_to_google_play_console
    with:
      action: r0adkll/upload-google-play@v1.1.2
      with: |
        releaseFiles: "${{env.ARTIFACT_AAB_PATH}}"
        serviceAccountJson: "./${{env.GOOGLE_SERVICE_ACCOUNT_JSON}}"
        packageName: "${{env.APP_PACKAGE_NAME}}"
        track: "${{env.BUILD_ENV_GOOGLE_PLAY_TRACK}}"
        whatsNewDirectory: "${{env.OUTPUT_WHATSNEW_EN_US}}"
        releaseName: "${{env.BUILD_ENV_VERSION_NAME}}"
        status: completed
        mappingFile: "./${{env.CURRENT_REPO}}/app/build/outputs/mapping/${{env.BUILD_ENV_BUILD_TYPE_LOWER_CASE}}Release/mapping.txt"
      attempt_limit: 10
      attempt_delay: 3000

`

image I’m not using what’s new directory, and it worked once after I changed service account json file to new, and then, it fails to deploy

For me, this problem started last week. I’ve been using it for months and never had any problems. Something has definitely changed on Google’s side. In my case it always works on the second try.

I’ve tried v1 tag without whatsNewDirectory and works as expected too

- name: Deploy to Play Store
  id: deploy
  uses: r0adkll/upload-google-play@v1
  with:
    serviceAccountJson: service_account.json
    packageName: dev.givaldo.carspecs
    releaseFiles: android/app/build/outputs/bundle/release/app-release.aab
    mappingFile: android/app/build/outputs/mapping/release/mapping.txt
    track: beta
image

I have the same error just when I’m trying to use whatsNewDirectory, and it works properly when i removed it.

      - name: Publish To Store
        uses: r0adkll/upload-google-play@v1.1.1
        with:
          serviceAccountJson: android/service_account.json
          packageName: '....'
          releaseFiles: build/app/outputs/bundle/release/app-release.aab
          track: production
          whatsNewDirectory: whatsnew

If anyone is interested in testing this, please try using the branch for #190 in your action. Note that this error is random, and a one-shot run is not enough to say whether this has helped