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
Google Api Error: Unauthorized - Request is missing required authentication credential when trying to do a Google Play release #21507
Comments
+1 |
I am also experiencing this across several stores that have been publishing fine for years. Here is one of the failures. 🚫 fastlane environment 🚫Stack
System Locale
fastlane files:No Fastfile found No Appfile found fastlane gems
Loaded fastlane plugins:No plugins Loaded Loaded gems
generated on: 2023-09-12
|
+1
|
the same :( |
Our nightly build hit this same error about 9 hours ago. I re-ran the process 15 minutes ago and again received the error. Then I ran it again with the |
@markpar I report above was executed with the |
I think that this has been an issue with Google service accounts. My upload did not work and my RevenueCat service account also broke down. |
Lots of folks are (were?) having the same issue here: #21091 |
hey i have same problem |
+1 |
Same problem here! |
Same problem here |
Try setting the root_url: upload_to_play_store(
root_url: "https://androidpublisher.googleapis.com/",
...
) |
This worked for me. |
That worked, thanks |
Worked for me as well. Thanks! |
Didn't help for screenshots uploading |
same here sadly |
+1 |
I'm pretty sure the issue is on Google's end, because the request failure is completely random, sometimes it passes sometimes it doesn't. When you're doing only one apk upload request to the Google API it can be enough to retry a couple of times until it passes, but if you need to upload new screenshots for example, that requires many Google API calls (one per image upload), so there is a way higher chance that one of them will fail along the many ones that are sent. In the meantime—i.e. until Google fixes it on their end—I was able to apply a quick-and-dirty patch to my local copy of the fastlane gem:
def call_google_api
+ tries_left ||= 5
yield if block_given?
rescue Google::Apis::Error => e
error = begin
@@ -92,7 +93,13 @@ module Supply
message = e.body
end
- UI.user_error!("Google Api Error: #{e.message} - #{message}")
+ if tries_left.positive?
+ UI.error("Google Api Error: #{e.message} - #{message} - Retrying...")
+ tries_left -= 1
+ retry
+ else
+ UI.user_error!("Google Api Error: #{e.message} - #{message}")
+ end
end Obviously this is a temporary workaround and dirty patch, that is only aimed to get you out of a bind if you need to call Note about why not making a PR to fastlane with that patchI thought about submitting a PR to fastlane but I think this would need a nicer implementation than my dirty patch above — especially adding a Also I'm pretty sure this is a very exceptional case that we should probably not officially cover for in fastlane's end but in GoogleApis' end, as the Indeed, the reason why this mechanism from the |
Unfortunately, setting the root_url does not solve the issue... The only way I have been able to get an app uploaded with upload_to_play_store is by disabling the image and screenshots. upload_to_play_store(
root_url: "https://androidpublisher.googleapis.com/",
skip_upload_images: true,
skip_upload_screenshots: true,
...
) |
Like @AliSoftware, I just wrote a script to repeatedly keep trying the deployment and it eventually goes through. It's a problem on Google's end. |
When deploying manually I found a new paid applications agreement, I think it could be correlated, although accepting the agreement doesn't immediately fix this problem. |
* fastlane/fastlane#21507 * Google Api Error: Unauthorized - Request is missing required authentication credentials * Retry
* fastlane/fastlane#21507 * Google Api Error: Unauthorized - Request is missing required authentication credentials * Retry
Similar workaround to fastlane/fastlane#21507 (comment). Retry HTTP calls when 401 is (randomly) returned by Google, that causes customer impact.
This worked for me |
- update fastlane to 2.15.1 which includes fix for the following [issue](fastlane/fastlane#21507) - also adds `root_url` to the upload_playstore_internal lane
|
2.216.0 + SUPPLY_UPLOAD_MAX_RETRIES did the trick for me. |
How can I add this to my Fastfile.. Kindly, drop screenshot of how you did it. |
Can you share a code snippet of how you set |
See #21507 (comment) |
…lay Store (#1041) Required to fix the "Google Api Error: Unauthorized - Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential." (see fastlane/fastlane#21507) error when uploading Android apps to Google Play Console.
Worked as a charm! Thank you |
As @anh1979 mentioned, after updating Fastlane version, we added the |
Someone on the Android DevRel team at Google contacted me 5h ago saying they were made aware of this and were monitoring this GitHub issue, and that the Play team had identified an issue which may have contributed to this issue and believe they have now fixed this. 🤞 They added:
So feel free to comment here to indicate if from now on your |
* chore(deps): update fastlane to v2.213.0 * feat(notifications): allow user to use keyboard to edit time based notifications * feat(boat-notifications): change the notification message to know if the boat is coming or is leaving Bordeaux * chore(version): increment version to `v1.9.2` * test 1 * feat(ui): rework of the forecast widget * fix(boats-detection): fix the regex to better match multi boat events * fix(multi-day-detection): the events spread over to day are now correctly detected * feat(ui): complete redesign of the forecast information dialog * feat(ui): remove closure time on forecast info bottom sheet * feat(ui): add animations and little tweeks * chore(deps): run `flutter pub upgrade` * feat(ui): set `maxWidth` for tablet mode for the info bottom sheet * feat(docked-boat): display the current docker boat in the Moon harbord (#79) * WIP * test 1 * feat(ui): rework of the forecast widget * fix(multi-day-detection): the events spread over to day are now correctly detected * chore(ci): set the reporter on github when running `flutter test` * feat(ui): complete redesign of the forecast information dialog * feat(ui): remove closure time on forecast info bottom sheet * feat(ui): add animations and little tweeks * chore(deps): run `flutter pub upgrade` * feat(ui): set `maxWidth` for tablet mode for the info bottom sheet * chore(ui): set the highlight color to warningColor * chore(ci): run `dart format lib` * WIP * add test * chore: remove unused file * fix typo * chore(ui): adjust the size of the status tile more pricesily * fix(ui): set the correct color in the info bottom sheet * fix(ui): lower the border width * chore(ui): rework forecast widget * chore(playstore): regenerate all screenshots * chore(version): increment version to `v2.0.0` * chore(deps): update actions/checkout to v3.5.3 * chore(deps): update kotlin_version to v1.8.22 * chore(deps): update androidx.window:window to v1.1.0 * chore(deps): update androidx.window:window-java to v1.1.0 * chore(deps): update ruby/setup-ruby to v1.151.0 * feat(ui): add divider to MontWidget * fix(ui): prevent day to overlap with the warning icon * fix(ui): make more readable if a boat is leaving or not * chore(changelogs): move all CHANGELOGS into a proper directory * chore(licenses): add OFL (Open Font License) to license list * feat(ui): set dynamic font size for the main text & move the moon harbor button status * fix(bug): the arriving boat count was wrong during an event where one is leaving and another is coming * fix(typo): fix french translation when the brisge will soon close * chore(flutter): add all missing files * feat(vessel-info): change vessel info redirect page * chore(ci): run `dart format lib` * fix(translation): set new translation keys for better handling * feat(wine-festival): add support for the Wine Festival Event * chore(version): increment version to `v2.1.0` * chore(deps): update ruby/setup-ruby to v1.152.0 * chore(apm): add sentry integration * chore(ci): run `dart format lib` * fix(ci): add missing `$` * chore(ads): add consent management platform (CMP) to comply to new regulation * chore(sentry): add custom integration for sentry * fix(ci): typo in Sentry secret name * chore(version): increment version to `v2.2.0` * fix: CI & default env value * chore(deps): update animated_toggle_switch to ^0.7.0 * chore(sentry): improve integration * chore(ci): run `dart format lib` * ci: fix `--dart-define` usage * chore(deps): update gradle to v7.6.2 * chore(deps): update flutter_local_notifications to v15 (#91) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat: rework of the 'About' page * feat: add fr and es privacy policies * fix: add missing translated pages for site * fix: asset pages for privacy pages * fix: ui tweaks * chore(version): increment version to `v2.3.0` * chore(deps): update kotlin_version to v1.9.0 * fix: the sentry_dsn value is now correctly injected during the build process * fix: wrong job for sentry_dsn secret injection * chore: fix Android build by downgrading the kotlin version to ´1.8´ * chore: refresh the ´.gitignore´ file * fix: portrait mode was broken when a info widget was open * fix: rate link broke if we cancel the Android in App rating * chore: adjust padding for the About Screen * fix: make ´check_secret_decryption.sh´ and ´decrypt_secret.sh´executable * chore: refresh store screen captures * chore(version): increment version to `v2.3.1` * chore(version): upgrade main to v2.1.0 (#87) * chore(deps): update fastlane to v2.213.0 * fix(notifications): prevent Android notifications from being stuck on lockscreen * feat(notifications): allow user to use keyboard to edit time based notifications * feat(boat-notifications): change the notification message to know if the boat is coming or is leaving Bordeaux * fix(CI): set the correct Changelog path on new tag * chore(version): increment version to `v1.9.2` * test 1 * feat(ui): rework of the forecast widget * fix(boats-detection): fix the regex to better match multi boat events * fix(multi-day-detection): the events spread over to day are now correctly detected * chore(ci): set the reporter on github when running `flutter test` * feat(ui): complete redesign of the forecast information dialog * feat(ui): remove closure time on forecast info bottom sheet * feat(ui): add animations and little tweeks * chore(deps): run `flutter pub upgrade` * feat(ui): set `maxWidth` for tablet mode for the info bottom sheet * chore(ui): set the highlight color to warningColor * feat(docked-boat): display the current docker boat in the Moon harbord (#79) * WIP * test 1 * feat(ui): rework of the forecast widget * fix(multi-day-detection): the events spread over to day are now correctly detected * chore(ci): set the reporter on github when running `flutter test` * feat(ui): complete redesign of the forecast information dialog * feat(ui): remove closure time on forecast info bottom sheet * feat(ui): add animations and little tweeks * chore(deps): run `flutter pub upgrade` * feat(ui): set `maxWidth` for tablet mode for the info bottom sheet * chore(ui): set the highlight color to warningColor * chore(ci): run `dart format lib` * WIP * add test * chore: remove unused file * fix typo * chore(ui): adjust the size of the status tile more pricesily * fix(ui): set the correct color in the info bottom sheet * fix(ui): lower the border width * chore(ui): rework forecast widget * chore(playstore): regenerate all screenshots * chore(version): increment version to `v2.0.0` * chore(deps): update actions/checkout to v3.5.3 * chore(deps): update kotlin_version to v1.8.22 * chore(deps): update androidx.window:window to v1.1.0 * chore(deps): update androidx.window:window-java to v1.1.0 * chore(deps): update ruby/setup-ruby to v1.151.0 * feat(ui): add divider to MontWidget * fix(ui): prevent day to overlap with the warning icon * fix(ui): make more readable if a boat is leaving or not * chore(changelogs): move all CHANGELOGS into a proper directory * chore(licenses): add OFL (Open Font License) to license list * feat(ui): set dynamic font size for the main text & move the moon harbor button status * fix(bug): the arriving boat count was wrong during an event where one is leaving and another is coming * fix(typo): fix french translation when the brisge will soon close * fix(typo) * chore(flutter): add all missing files * feat(vessel-info): change vessel info redirect page * chore(ui): change the theme picker color * chore(ui): change the day picker color * chore(ci): run `dart format lib` * fix(translation): set new translation keys for better handling * feat(wine-festival): add support for the Wine Festival Event * chore(version): increment version to `v2.1.0` --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(ci): remove dart code metrics package (the free version is not anymore maintained) * chore(deps): update fastlane to v2.214.0 * chore: run ´flutter pub upgrade --major-versions´ * chore: change like due to a git repo rename * chore(deps): update kotlin_version to v1.9.10 * chore(deps): update actions/checkout to v3.6.0 * chore(deps): update animated_toggle_switch to ^0.8.0 * fix: set correct params value following [email protected] update * fix: set kotlin version to ´1.8.0´ * chore: upgrade to flutter ´3.13.3´ * chore: fix README.md (repo URL changed) * feat: add the user the ability to choose the time format (#101) * feat: add the user the ability to choose the time format * chore: add missing tests * chore: run ´flutter pub upgrade --major-versions´ * fix: set valid project name ('-' => '_') * chore(version): increment version to `v2.4.0` * chore(deps): update actions/checkout to v4 * fix(time-format): the notifications now correctly use the time format picked by the user * fix(settings): set the correct behaviour when device is in landscape mode * fix(ui): move the button when the screen is in portrait mode on the about screen * fix(ui): when the device is in portrait mode, the setting buttons are now correctly displayed * fix(ui): set the correct behaviour an tablet for bottom bar * chore(version): increment version to `v2.4.1` * fix(ui): buttons are now displayed properly when the "About screen" is in landscape mode * chore(version): increment version to `v2.4.2` * chore(deps): update ruby/setup-ruby to v1.153.0 * chore(deps): update google_fonts to v6 * chore(deps): update fastlane to v2.215.1 * fix(deps): set correct version of fastlane into Gemfile.lock * feat(ui): set special UI for the King's Charles boat * Revert "feat(ui): set special UI for the King's Charles boat" This reverts commit e79452b. * fix(ci): set ´SUPPLY_UPLOAD_MAX_RETRIES´ env var to prevent fastlane from failing See fastlane/fastlane#21507 (comment) --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@AliSoftware I'm not seeing our builds have to retry anymore. Just as a note like you mention. |
As an additional note, we started doing this before google fixed their systems and is seems like our build is getting lost in the aether as it says upload successful but the build never shows up in the google console. |
I'm still getting this error and not able to resolve with the above, here is my lane: lane :update_images do |
New Issue Checklist
Issue Description
We have a problem that started 2 days ago with publishing Google Play releases.
When running the
release_playstore
lane that usesupply
Google APIs returnGoogle Api Error: Unauthorized - Request is missing required authentication credential.
We have checked the service account key and it is valid and does not have an expiry date. Can someone experienced take a look at this problem. The assumption is Google made changes to the way API requests need to be done.
Command executed
Complete output when running fastlane, including the stack trace and command used
Environment
The text was updated successfully, but these errors were encountered: