If you're playing Minecraft and are trying to join a multiplayer game but can't because servers keep rejecting the connection with an error message that says: “Failed to login: Invalid session (Try restarting your game and the launcher).” This means the server was reached, but Minecraft could not validate your current login session. The good news is that this isn't a really big problem, so you should be able to fix it nice and quickly. Before you start any of the steps in this guide, restart your modem/router as well as your computer. If that solves the issue, you're done. If not, keep working through the steps below.
Takeaways:
- What's causing “Failed to login: Invalid session (Try restarting your game and the launcher).” in Minecraft
- Is Minecraft error “Failed to login: Invalid session (Try restarting your game and the launcher).” a server error or a game error?
Table of Contents
How to Fix Failed to Login Invalid Session Error in Minecraft
Microsoft is notorious for having sign-in issues across all of their software, so there's a good chance some of the sign-in data on your device has been corrupted for one reason or another. So you'll need to purge everything and start clean.
- Exit Minecraft and close the launcher.
- Press Ctrl + Shift + Esc to open Task Manager.
- End any remaining Minecraft, Minecraft Launcher, javaw.exe, or mod-launcher processes.
- Make sure Minecraft is not running on another PC or in another instance using the same account.
- Open the official Minecraft Launcher.
- Open the account menu and select Log out.
- Close and reopen the launcher.
- Select Microsoft Login and sign in again.
- Make sure you use the Microsoft account that owns Java Edition.
- Start a single Minecraft instance and try joining the server again.
Check the Microsoft Account that you are using
Minecraft may reject authentication if the launcher is signed in to a Microsoft account that does not own Java Edition. It's quite common to have issues when you are signed into a different account in the Microsoft Store and the Xbox app as well, so make sure you are signed into the same account everywhere.
- Look at the email address and Xbox gamertag shown in the launcher.
- If you see Play Demo, Buy Now, or a message saying that your products cannot be verified, check whether you are using the correct Microsoft account.
- On Windows, also make sure the same account is being used in the Xbox app, Microsoft Store, and Minecraft Launcher.
- After confirming the account, sign out of the Minecraft Launcher and sign back in before testing multiplayer again.
Test the Official Launcher
If you are using Modrinth, CurseForge, or another third-party launcher, its saved authentication session may have expired, so check with the official one to see if everything is working.
- Open the official Minecraft Launcher.
- Sign in with the confirmed account.
- Select Minecraft: Java Edition > Installations > New installation.
- Create a clean installation using a release compatible with the server.
- Launch the installation and try joining the server.
If the official launcher works but your third-party launcher does not, the problem is with that particular launcher or its saved account session. Update the third-party launcher, sign out, and add your Microsoft account again.
Troubleshoot a Single Server
If other Minecraft servers work but one specific server keeps showing the invalid-session error, the problem is probably server-based. Show the server owner the exact error message and the time it occurred so they can review the server logs. The owner will then have to do a few things to try to fix it.
- Restart the server and its proxy, if applicable.
- Confirm that the server can reach Minecraft's authentication services.
- Keep online-mode=true on a normal standalone server.
- For Velocity or BungeeCord networks, verify the proxy's secure player-forwarding configuration.
Note: Do not set online-mode=false simply to hide an authentication error. Doing so prevents the server from properly verifying paid Minecraft identities and can create username and UUID-related problems.
Repair the Minecraft Launcher
If nothing is working after trying everything above, it's time to clean things up completely.
- Install any pending Minecraft Launcher updates through the Microsoft Store.
- On Windows, open Settings > Apps > Installed apps > Minecraft Launcher > Advanced options.
- Select Repair if the option is available.
- If repair does not work, reinstall the Minecraft Launcher.
- Avoid deleting your .minecraft folder or saves when troubleshooting an authentication error.