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
[spaceship] refresh token and retry on authorization errors #19502
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
e4a874c
to
b140042
Compare
b140042
to
7269a06
Compare
7269a06
to
7aa457f
Compare
@joshdholtz pinging you here since you seem to have made plenty of changes to this file |
@crazymanish Sorry for pinging you but this PR could help for quite a big amount of people. Could you take a look on it? |
Hopefully someone will merge this soon. I'm facing the same issue all the time. |
Hi folks, just friendly bumping this up in case it fell through the cracks. Is there anything else I need to do in order to get this merged? (cc @crazymanish @joshdholtz) |
Hey there, this PR looks great, is easy to review, all issues are solved. And the best part is that it really works. I'm afraid it got lost (cc @crazymanish ) |
I can add that my team has been using a forked version of The changes in this Pull Request eliminated all flakiness from our App Store Connect uploads. |
Hi, bumping this again. We started facing random auth errors this morning. The duration workaround from #19072 seems to work, but who knows for how long. |
@joshdholtz Could you please take look on it? :) It's merge ready, and it was also checked by many users. :D Pls 🙏 |
We are getting this issue, 1 every 3/4 times which causes our pipeline to fail even though app was uploaded. Can this be merged pls |
Please review this request. This bug is very frustrating |
Please review and merge this PR. We also started to experience the same problem from last week onwards. Would like this fix to be merged soon. |
We have also started getting the issue with expired API token recently |
Hi, can we get this merged soon? |
Need this merged ASAP... getting the error a lot in last few days. |
+1 on merging this, getting a lot of wrong prematurely expired tokens lately |
I'm onboard with your reasoning @andersonvom 💪 |
Friendly ping @joshdholtz to perhaps bump the priority of this PR 🙏 🙇 |
Ah thank you thank you!! Will look at first thing tomorrow morning 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this PR! And so sorry this one slipped my eyes 😔 I'll get this released this week! Really appreciate the contribution ❤️
Alriiiight! 🎉 No worries at all, @joshdholtz! Thanks for looking into this and getting it released shortly! And thank you all who contributed with reviews and tests over time! 🏆 |
Hey @andersonvom 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Do we have an ETA when the next release will ship that includes this fix @joshdholtz? Thanks! ❤️ |
Hey! Planning a new release most likely tomorrow 💪 |
Is the release out? |
@joshdholtz Thanks for getting this merged! I hope to be the last person to need to comment on this issue ;) Any update on the release here? My team's hoping we can update the gem for a little more stability in our pipelines tomorrow. |
Sorry! Going out today sometime. I had some eye issues last night and struggled to look at my computer screen so had to stop |
Hey fam! Just wanted to let you all know that this is getting released tonight 😊 I'm going to review and merge a few more things but this will for sure go out tonight. Sorry again for the slowness. Life can get a little hard but still shouldn't have kept this one merged and unreleased for so long 😓 Will update here again when release! |
You're doing great, Josh. Thank you 🙂 |
This should be out in |
Congratulations! 🎉 This was released as part of fastlane 2.205.2 🚀 |
I am sorry, i had my GH notifications off so i never got any notification on mention...Just turned on my GH notifications for mention so will be fast to reply next time 🙇♂️ 😇 today i came here from discussion #20101 (comment) |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
Apple seems to be revoking tokens before their expiration dates. Several
users reporting problems on issue #19072 were likely affected by
it. Sometimes changing the token duration will work around the problem,
as the tokens are likely being revoked later in the future and allowing
the wait to complete.
This can be seen in practice by adding a
@token.refresh!
couple of extra logmessages to api_client.rb right at the point where we get an
UnauthorizedAccessError
:The logs above show that, even though the current token is not expired, the
appconnect API responds with a 401 and the process would otherwise fail.
Description
This refreshes the token and adds retries to
UnauthorizedAccessError
before ultimately raising the error if it still continues to fail.