Closed reyts closed 2 years ago
Hello @reyts! Could you verify what permissions the service account has in your Google Play Console under Settings > Developer Account > API Access > Service accounts > View access
?
I have typically seen this error when insufficient privileges are given in this portal.
I had all the required privileges granted. In fact, I had to add all 10 permissions just to test but to no avail. I tried unchecking and checking the boxes, as well as creating a new service account and granting all permissions.
hmm, okay, it might be an issue with the action reading your service account JSON. Could you post your workflow .yml configuration for this action?
Kindly find below the workflow used.
name: PlayStore Release
on:
push:
branches: [ main ]
jobs:
version:
name: Create version number
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Fetch all history for all tags and branches
run: |
git config remote.origin.url https://x-access-token:${{ secrets.TOKEN_SECRETS }}@github.com/${{ github.repository }}
git fetch --prune --depth=10000
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Create version.txt with nuGetVersion
run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt
- name: Upload version.txt
uses: actions/upload-artifact@v2
with:
name: gitversion
path: version.txt
build:
name: Build APK and Create release
needs: [ version ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get version.txt
uses: actions/download-artifact@v2
with:
name: gitversion
- name: Create new file without newline char from version.txt
run: tr -d '\n' < version.txt > version1.txt
- name: Read version
id: version
uses: juliangruber/read-file-action@v1
with:
path: version1.txt
- name: Update version in YAML
run: sed -i 's/99.99.99+99/${{ steps.version.outputs.content }}+${{ github.run_number }}/g' pubspec.yaml
- name: Update KeyStore password in gradle properties
run: sed -i 's/#{KEYSTORE_PASS}#/${{ secrets.KEYSTORE_PASS }}/g' android/key.properties
- name: Update KeyStore key password in gradle properties
run: sed -i 's/#{KEYSTORE_KEY_PASS}#/${{ secrets.KEYSTORE_KEY_PASS }}/g' android/key.properties
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.22.5'
- run: flutter pub get
- run: flutter build apk --release --split-per-abi
- run: flutter build appbundle
- name: Create a Release in GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*.apk,build/app/outputs/bundle/release/app-release.aab"
token: ${{ secrets.TOKEN_SECRETS }}
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}
- name: Upload app bundle
uses: actions/upload-artifact@v2
with:
name: appbundle
path: build/app/outputs/bundle/release/app-release.aab
release:
name: Release app to internal track
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Get appbundle from artifacts
uses: actions/download-artifact@v2
with:
name: appbundle
- name: Release app to internal track
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }}
packageName: com.exchange.reyts
releaseFiles: app-release.aab
track: internal
whatsNewDirectory: distribution/whatsnew
Hmm, I don't see anything immediately wrong with that configuration unless something is amiss with how you have your secrets.PLAYSTORE_ACCOUNT_KEY
setup. Could you follow these steps, https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/enabling-debug-logging#enabling-step-debug-logging, to enable step debug logging and post your output here?
Hey @r0adkll
Kindly see below the raw logs with debugging enabled
hmm, okay, could you verify in your Google Play Console under Users and permissions
that the service account email is that list (and add it if not). If it is in the list (or you just added it) can you click on it and verify that it has access to the application you are trying to deploy.
I had all the required privileges granted. In fact, I had to add all 10 permissions just to test but to no avail. I tried unchecking and checking the boxes, as well as creating a new service account and granting all permissions.
Yes it does and I have verified that the account has the access to the application to be deployed
@aadegbite Is the issue still occurring? I've just checked my configuration and I haven't granted separate app permissions, so perhaps try running again with just the releases permissions under account permissions?
Yes the issue still persists. I will try again one more time with your suggestions.
@aadegbite I had this same issue. This is how I got mine working:
Hope this helps!
In case anyone bumps into my situation, if you are using the same user for multiple apps, I have the same problem until I realized I haven't added the new app to the API user, and remember to hit the "Save changes" button after adding it.
This is an annoying amount of guesswork... I encountered the same problem, and this was solved by granting Admin access in the Google Play Console, even though I just needed to upload files and create new versions.
Since this seems to be a common problem, I thought I'd post the final configuration:
All in all, thanks to both the existence of this Action and the various comments in this post, managed to get it all done in a couple of hours. I would suggest that if you're blind-testing this, you open a new branch, take a precompiled APK and put in in the repo, and then try and upload THAT, since the build step (which you'd use for your final test) is usually excessively longer than the upload step, and this will improve your iteration speed for this task.
Hope this helps future users the way you've all helped me!
i am facing same issue has anyone found solution ?
I have faced the same issue and couldn't resolve until I completed the next steps.
In case anyone bumps into my situation, if you are using the same user for multiple apps, I have the same problem until I realized I haven't added the new app to the API user, and remember to hit the "Save changes" button after adding it.
i have a owner permission but still i couldn't
This seems like a configuration issue in the Play Console, closing.
Hello,
I have been trying to resolve this issue for a while now in my private repository. The instructions for the create Play Store Service Account has been followed and doubled checked. Every other thing passes except this stage. Kindly assist