mojira.dev
WEB-6501

"Failed to log in: Invalid session" when attempting to connect to servers

Whenever I try and play any server I get this disconnected screen, I've tried restarting my PC and launcher and client, loading on a non modded client and uninstalling and reinstalling the launcher. Bedrock doesn't have this issue when I play on servers on that version. please fix!

Linked issues

MC-262262 cant connect to servers Resolved MC-262263 Invalid session help Resolved MC-262271 Invalid session Error Resolved MC-262273 reoccuring message to restart game when joining online server Resolved MC-262274 Licensed version of the game. Resolved

Attachments

Comments 64

Dupe of MC-198546, but the bug have been fixed.

It can't be a dupe of a bug from 3 years ago though?  I have the exact same problem right now!

Below might be inaccurate, as I've checked another account that does work and it does indeed have the flags token, but the other account I tested does not have psnid.  It could be that being linked to PlayStation might cause Java Edition to stop working?

------------------------

TL;DR: "flags" was added to JWT token, and I suspect this is causing the auth server to throw an exception when validating the JWT token.

------------------------

Perhaps a backend server is throwing an exception when it sees an unexpected new item in the JWT token.

An old JWT token that worked for me in the past (although it is expired now)

eyJraWQiOiJhYzg0YSIsImFsZyI6IkhTMjU2In0.eyJ4dWlkIjoiMjUzNTQ0NDIyNTY5NzQ5NCIsImFnZyI6IkFkdWx0Iiwic3ViIjoiZjMxMTgwOGEtZTUwZC00NDgxLWI2ZjEtOTg4M2ZlZGY0Nzk1IiwiYXV0aCI6IlhCT1giLCJucyI6ImRlZmF1bHQiLCJwc25pZCI6Ijg4NjgxOTcyMDE1MTYwNjM1NjgiLCJyb2xlcyI6W10sImlzcyI6ImF1dGhlbnRpY2F0aW9uIiwicGxhdGZvcm0iOiJQQ19MQVVOQ0hFUiIsInl1aWQiOiJjYTYyOTRjMzg5MTg0YmFmYjdjYzI0ZjI5ODQxMjMyMCIsIm5iZiI6MTY3OTIyMDc1MCwiZXhwIjoxNjc5MzA3MTUwLCJpYXQiOjE2NzkyMjA3NTB9.<redactedsignature>

The its decoded payload:

{   "xuid": "2535444225697494",   "agg": "Adult",   "sub": "f311808a-e50d-4481-b6f1-9883fedf4795",   "auth": "XBOX",   "ns": "default",   "psnid": "8868197201516063568",   "roles": [],   "iss": "authentication",   "platform": "PC_LAUNCHER",   "yuid": "ca6294c389184bafb7cc24f298412320",   "nbf": 1679220750,   "exp": 1679307150,   "iat": 1679220750 }

And the JWT token I have now:

eyJraWQiOiJhYzg0YSIsImFsZyI6IkhTMjU2In0.eyJ4dWlkIjoiMjUzNTQ0NDIyNTY5NzQ5NCIsImFnZyI6IkFkdWx0Iiwic3ViIjoiZjMxMTgwOGEtZTUwZC00NDgxLWI2ZjEtOTg4M2ZlZGY0Nzk1IiwiYXV0aCI6IlhCT1giLCJucyI6ImRlZmF1bHQiLCJwc25pZCI6Ijg4NjgxOTcyMDE1MTYwNjM1NjgiLCJyb2xlcyI6W10sImlzcyI6ImF1dGhlbnRpY2F0aW9uIiwiZmxhZ3MiOlsidHdvZmFjdG9yYXV0aCIsIm9yZGVyc18yMDIyIl0sInBsYXRmb3JtIjoiUENfTEFVTkNIRVIiLCJ5dWlkIjoiY2E2Mjk0YzM4OTE4NGJhZmI3Y2MyNGYyOTg0MTIzMjAiLCJuYmYiOjE2ODMwMjk4MzcsImV4cCI6MTY4MzExNjIzNywiaWF0IjoxNjgzMDI5ODM3fQ.<redactedsignature>

The its decoded payload:

{   "xuid": "2535444225697494",   "agg": "Adult",   "sub": "f311808a-e50d-4481-b6f1-9883fedf4795",   "auth": "XBOX",   "ns": "default",   "psnid": "8868197201516063568",   "roles": [],   "iss": "authentication",   "flags": [     "twofactorauth",     "orders_2022"   ],   "platform": "PC_LAUNCHER",   "yuid": "ca6294c389184bafb7cc24f298412320",   "nbf": 1683029837,   "exp": 1683116237,   "iat": 1683029837 }

Note how the latest token has a new item called "flags" perhaps a backend server is throwing an exception when it sees this unexpected new item.  I also tested with other accounts and for the ones that get a JWT token without a "flags" item they can log in without issues.

@unknown how is it fixed if me and Sigurour are having this problem

Duplicate issues: MC-262263, MC-262262

54 more comments

Having exactly same issue since yesterday. Can they already come up with the fix? it's ridiculous.

Can't connect to any server. Tried literally everything. And I didn't touch my ps5 for a few months so I don't really see how that's related. I ve been playing like usual and then the next day I couldn't log in anymore.

 

I just can now login, I don't know if they have solved the incident, I play in PC

 

Thx

Works for me, too.
Mac, Prism Launcher.
Thx for your fast reaction!

works for me now too!!

[MOD] Greymagic27

This should now be fixed. If you’re still experiencing this issue please see if Mojang Support can help resolve the issue.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

AndyFloss

(Unassigned)

API

Retrieved