9 min read

How to Fix \"Failed to Login: Invalid Session\" in Minecraft

Fix Minecraft Java's "Failed to login: Invalid session" error — what the stale login token means, then the full restart, launcher, and sign-out fixes in order.

How to Fix \"Failed to Login: Invalid Session\" in Minecraft

Failed to login: Invalid session (Try restarting your game) is your launcher telling you the login token it handed the game has gone stale, and the fix is right there in the message: fully quit Minecraft and launch it again. This is a client-side authentication problem, not anything wrong with the server you're trying to join and not a broken install. The token your launcher uses to prove to Mojang that you own the account only refreshes when the game starts up, so a clean restart almost always clears it. Work the checks below in order — a full relaunch first, then the launcher, then your Microsoft sign-in — and you'll usually be back in within a couple of minutes. If you're still getting your bearings with the add-server flow itself, keep that guide open alongside this one.

What "Invalid session" actually means

When you join an online-mode server, your client quietly proves who you are to Mojang before the server ever lets you in. It POSTs your access token and profile to https://sessionserver.mojang.com/session/minecraft/join, the server then asks https://sessionserver.mojang.com/session/minecraft/hasJoined to confirm you, and only then do you load in. Invalid session means your half of that exchange failed: the access token the launcher gave the game has expired or desynced, so the session server doesn't recognize it and the join is rejected.

That token isn't permanent. The launcher refreshes it when you start the game, and it stays good for a while after, but not forever — and two situations push it past that line.

The first is leaving the game open for hours. Launch Minecraft in the morning, wander off, and the token that was valid at startup can quietly expire before you sit down to join a server at night, because nothing relaunched to refresh it. The second is running two copies of the same account at once, which catches a lot of people with two launchers or two PCs.

The wording shifts slightly depending on what you launch from. The vanilla Minecraft Launcher tends to show Invalid session (Try restarting your game), while the Modrinth App words it Invalid session (Try restarting your game and the launcher). Treat the exact text as approximate — the cause and the fix are the same either way.

Only one instance per account

Mojang lets exactly one session per account stay authenticated, and it's always the most recently launched one. The moment you start a second instance of the same account — a second launcher, a modpack window, the game open on another computer — the older session goes stale and starts throwing Invalid session the next time it talks to a server. The newer instance is fine; the one you launched first is the one that breaks.

So before anything else, make sure you're not running the same account twice, and close every Minecraft window except the one you want to play on. This trips people up most with modded setups — the vanilla launcher and a modpack launcher both signed in, or the game left running on a desktop while you open it on a laptop. One account, one running instance — that's the rule.

Fix it on your side, in order

Fully quit and relaunch the game

Leaving a server or closing the world isn't enough, because that doesn't refresh the token — only starting the game does. Quit Minecraft completely, back to the launcher, then start it again. On the next launch the launcher issues a fresh token, and that single step resolves the large majority of these errors. Do this one first, every time.

Restart the launcher too

If a clean relaunch of the game didn't take, close the launcher itself — the Minecraft Launcher, Modrinth App, or CurseForge — and reopen it. That forces the launcher to re-acquire a token from scratch instead of reusing the cached one it was holding. This is the step the Modrinth wording is nudging you toward when it says to restart "the launcher" as well as the game.

Sign out and back in to your Microsoft account

When the credentials themselves have desynced, restarting won't rebuild them. Sign out of your Microsoft account in the launcher, then sign back in. That throws away the bad credentials and mints a brand-new session. It costs you re-entering your login, but it's the reliable cure when a plain restart keeps failing.

Close leftover Minecraft processes

Sometimes a copy of the game didn't shut down cleanly and is still sitting in memory, holding — and invalidating — the session even though no window is visible. Open Task Manager (or Activity Monitor on a Mac), look for any lingering Java or Minecraft processes, and end them, then launch fresh. After that, confirm only one instance of the account is running.

Confirm your Microsoft sign-in is healthy

If none of the above sticks, the problem may be upstream of Minecraft. Check that you can actually sign in at xbox.com and minecraft.net/login using the account that owns the game. A few passwordless Microsoft accounts that rely on email codes also need a real password set before the game's auth flow works — if you've only ever used a one-time code, set a proper password and try again.

Rule out an outage

A Mojang authentication or Xbox Live outage produces this exact symptom, and no amount of restarting will fix it — only waiting will. Before you go deeper, check that the auth servers aren't down; if they are, step away and try later.

Date, time, VPN, and antivirus

Two smaller culprits round things out. A system clock that's off can break the secure handshake, so set your date, time, and region to update automatically. And a VPN, proxy, or overzealous antivirus can block the auth request outright — turn them off briefly to test, and if the login then succeeds you've found your blocker.

"Invalid session" is yours — "Failed to verify username" is the server's

There's a sibling message that looks related but lands on the opposite side of the connection: Failed to verify username!. That one is a kick from the server, not a login failure on your client. It means the server itself couldn't verify your account against Mojang, so the troubleshooting above won't touch it.

It usually comes down to one of a few things. The most harmless is a Mojang outage, where neither side can reach the session servers. More often it's an online-mode mismatch — a non-premium or cracked account trying to join a server running the server.properties default of online-mode=true. And for server owners, the classic cause is a misconfigured proxy: when BungeeCord or Velocity sits in front, the backend servers are meant to run in offline mode behind it, and getting that wrong throws this exact kick. If that's the message you're actually seeing, the Failed to verify username walkthrough is the one to follow instead.

The line between the two can blur during an outage, since a Mojang problem can surface as either message. But the default reading holds: Invalid session is your side to fix, Failed to verify username is the server's.

This is not a version error

Worth saying plainly, because it's a common mix-up: Invalid session has nothing to do with version mismatches. The protocol-version errors are Outdated client! (your side is behind) and Outdated server! (the server is behind), and those are about protocol numbers, not login tokens. A session error doesn't care whether you're on 26.2 or 26.1, and updating or downgrading your game won't fix it. If your message names "outdated" anything, that's a separate problem with a separate fix — you can filter the full server list by version 26.2 to find servers that match the build you're on.

FAQ

I deleted minecraft_auth.json like a guide said and it still won't log in — was that wrong?

That fix is specific to the Modrinth App. Clearing its cache and minecraft_auth.json targets a known token-refresh bug in app versions 0.7.0 and up, and it does nothing for the vanilla Minecraft Launcher, which stores credentials in a completely different place. If you're on the vanilla launcher, signing out of your Microsoft account and back in is the equivalent step — that's what rebuilds your credentials there.

I'm on TLauncher and no restart fixes the Invalid session — why?

Third-party and cracked launchers like TLauncher generate session IDs that Mojang's servers never recognize, so they can't authenticate against any online-mode server at all. This isn't a stale token you can refresh — it's that the account itself can't be verified. Restarting changes nothing because there was never a valid session to begin with. The only real fix is logging in with a genuine account through an official launcher.

I'm seeing "Invalid token" or "Bad login" instead — same fix?

Largely, yes. Invalid Token and Bad login are the launcher's other ways of saying your stored credentials no longer check out, the same authentication family as Invalid session. Start with the same full restart of the game and launcher. If you see Bad login or Login failed. Unable to authenticate with Xbox live., skip ahead to signing out of your Microsoft account and back in — that's what rebuilds the credentials rather than just refreshing a token.

How do I know whether to troubleshoot my client or wait it out?

Check whether other people can play. If your friends are joining servers normally and the live rankings show servers up and populated, the auth servers are healthy and the problem is local to you — work the restart, launcher, and sign-out steps. If a lot of players are hitting login walls at once, that points to a Mojang or Xbox Live outage, and the right move is to wait rather than keep restarting a system that isn't broken on your end.