Persistent "Available session is not valid any more" error message
Hi folks, can anyone help resolve this logged message that happens every time I run xcversion update? I'm on the latest version. I even tried resetting my credentials using fastlane fastlane-credentials remove --username [email protected] and running again.
$ xcversion update
Available session is not valid any more. Continuing with normal login.
$ xcversion --version
2.5.0
Looks like this is caused by
https://github.com/fastlane/fastlane/blob/db8e09bdb0b3462c57c4250224fbdb731a8c3992/spaceship/lib/spaceship/client.rb#L426
which has a lot of related issues https://github.com/fastlane/fastlane/search?q=Available+session+is+not+valid+any+more.+Continuing+with+normal+login+is%3Aissue&type=Issues
I'm pretty out of the loop, but I assume it's related to the API changes (https://github.com/fastlane/fastlane/issues/12713), maybe @joshdholtz can chime in
That login endpoint changed recently over to the appstoreconnect api. I can take a look at this as well.
@jpsim @KrauseFx
It looks like the cause of this that spaceship is re-using a cookie from the old authentication scheme. After the upgrade, it's trying to reuse an invalid cookie. We should be invalidating that cookie a bit better...
But here's the fix: rm $HOME/.fastlane/spaceship/*/cookie
That appears to have fixed the logged message. Thanks @snatchev!
Thanks @snatchev! You saved me hours today.
It's always so annoying when CI just breaks >_<
Is this a one time solution or do I have to do it every deployment?
@tomachi my understanding of the failure is that it was a one-time thing during a migration of auth endpoints.
If anyone experiences this regularly, please comment and reopen this issue. Thanks!
I just came across this persistent hang error.
After attempting the fixes above I had no luck - in the end closing the terminal and running expo build:ios from a different window solved it.
Seems to me to be a cache issue
I'm having this issue quite often now. Removing the cookie above works for a little bit but never seems to ask me for my 2auth token. Any ideas how the clear the cache? expo isn't a command I have.