bitrise-steplib / steps-google-play-deploy

MIT License
54 stars 35 forks source link

error: googleapi: Error 401: Request is missing required authentication credential. #159

Closed neilroebert closed 6 months ago

neilroebert commented 9 months ago

Troubleshooting

Useful information

Issue description

The google api error persisted in 3.7.x. I still think this is how this step interacts with the google APIs. But the auth issue mentioned in #153 persists in 3.7.x. I used the version 3.7.5 at the time of writing. I downgraded to 3.5.x as per the previous issue thread, which immediately solved issue. The build uploaded after the downgrade

Bitrise info

I gave the full, redacted, debug log:

Getting configuration  
Configs:  
- service_account_json_key_path: *****  
- package_name: [com.test.app](http://com.test.app)  
- app_path: /Users/vagrant/deploy/app-release-bitrise-signed.apk|/Users/vagrant/deploy/app-release-bitrise-signed.aab  
- expansionfile_path: <unset>  
- track: [com.test.app](http://com.test.app) prod  
- user_fraction: 0  
- update_priority: 0  
- whatsnews_dir: <unset>  
- mapping_file: /Users/vagrant/deploy/mapping.txt  
- release_name: <unset>  
- status: <unset>  
- retry_without_sending_to_review: false  
- ack_bundle_installation_warning: false  
- verbose_log: true  
Using mapping file from: /Users/vagrant/deploy/mapping.txt  
Both .aab and .apk files provided, using the .aab file(s): /Users/vagrant/deploy/app-release-bitrise-signed.aab  
Using app from: /Users/vagrant/deploy/app-release-bitrise-signed.aab  
Configuration read successfully  
Authenticating  
Authenticated client created  
Create new edit  
[DEBUG] POST [https://oauth2.googleapis.com/token](https://oauth2.googleapis.com/token)  
[DEBUG] POST [https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.test.app/edits?alt=json&prettyPrint=false](https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.test.app/edits?alt=json&prettyPrint=false)  
editID: 12345  
Edit insert created  
Available tracks on Google Play:  
[DEBUG] GET [https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.test.app/edits/12345/tracks?alt=json&prettyPrint=false](https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.test.app/edits/12345/tracks?alt=json&prettyPrint=false)  
- production  
- beta  
- alpha  
- internal  
- [com.test.app](http://com.test.app) prod  
- [com.test.app](http://com.test.app) staging  
- [com.test.app](http://com.test.app) test  
- dev  
- prod  
Tracks listed  
Upload apks or app bundles  
Parsing list input: '/Users/vagrant/deploy/app-release-bitrise-signed.apk|/Users/vagrant/deploy/app-release-bitrise-signed.aab'  
Found element: /Users/vagrant/deploy/app-release-bitrise-signed.apk  
Found element: /Users/vagrant/deploy/app-release-bitrise-signed.aab  
Parsing list input: '/Users/vagrant/deploy/mapping.txt'  
Found element: /Users/vagrant/deploy/mapping.txt  
Uploading /Users/vagrant/deploy/app-release-bitrise-signed.aab 1/1  
Uploading file &{0x14000307f20} with package name '[com.test.app](http://com.test.app)', AppEditId '12345  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable)  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9)  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9)  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9)  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9)  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9)  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9)  
Received HTTP 401 (Unauthorized), retrying request...  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9) (status: 401): retrying in 2s (6 left)  
Received HTTP 401 (Unauthorized), retrying request...  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9) (status: 401): retrying in 4s (5 left)  
Received HTTP 401 (Unauthorized), retrying request...  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9) (status: 401): retrying in 8s (4 left)  
Received HTTP 401 (Unauthorized), retrying request...  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9) (status: 401): retrying in 16s (3 left)  
Received HTTP 401 (Unauthorized), retrying request...  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9) (status: 401): retrying in 30s (2 left)  
Received HTTP 401 (Unauthorized), retrying request...  
[DEBUG] POST [https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9](https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.test.app/edits/12345/bundles?ackBundleInstallationWarning=false&alt=json&prettyPrint=false&uploadType=resumable&upload_id=q6bkQ3sTDP4d5ez2o2iAt0-2F71H9) (status: 401): retrying in 30s (1 left)  
Received HTTP 401 (Unauthorized), retrying request...  
Failed to upload application(s): failed to upload app bundle, error: googleapi: Error 401: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See [https://developers.google.com/identity/sign-in/web/devconsole-project](https://developers.google.com/identity/sign-in/web/devconsole-project)., unauthorized

Steps to reproduce

It happened quite regularly on 3.7.x

bitrise-coresteps-bot commented 6 months ago

Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.

To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 90 days, so I marked it as stale.

The community would appreciate if you could check if the issue still persists. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".

If no comment left within 21 days, this issue will be closed.

bitrise-coresteps-bot commented 6 months ago

I'll close this issue as it doesn't seem to be relevant anymore. We believe an old issue probably has a bunch of context that's no longer relevant, therefore, if the problem still persists, please open a new issue.