xcode-install icon indicating copy to clipboard operation
xcode-install copied to clipboard

Persistent "Available session is not valid any more" error message

Open jpsim opened this issue 6 years ago • 9 comments

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

jpsim avatar Apr 23 '19 20:04 jpsim

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

KrauseFx avatar Apr 23 '19 21:04 KrauseFx

That login endpoint changed recently over to the appstoreconnect api. I can take a look at this as well.

snatchev avatar Apr 24 '19 16:04 snatchev

@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

snatchev avatar Apr 26 '19 21:04 snatchev

That appears to have fixed the logged message. Thanks @snatchev!

jpsim avatar Apr 26 '19 21:04 jpsim

Thanks @snatchev! You saved me hours today.

It's always so annoying when CI just breaks >_<

jdbenito avatar May 29 '19 16:05 jdbenito

Is this a one time solution or do I have to do it every deployment?

tomachi avatar Dec 04 '19 15:12 tomachi

@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!

snatchev avatar Dec 04 '19 16:12 snatchev

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

xsats avatar Sep 05 '20 22:09 xsats

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.

migs647 avatar Nov 17 '20 04:11 migs647