A Complete Guide to Fix Minecraft Invalid session Error

When you try to connect to servers in Minecraft, you encounter an error saying “Failed to Login: Invalid session (Try restarting your game)”. How do you fix this error? Read on then you’ll learn the possible solutions.

To fix the Minecraft “Invalid session” error, you can try these methods:

Method 1: Restart Minecraft
Method 2: Edit the hosts file
Method 3: Disable your VPN
Method 4: Change the server mode to offline
Method 5: Reinstall Minecraft
Method 6: Contact Mojang Support
Method 7: If you use a cracked Minecraft account

Method 1: Restart Minecraft

As the error message says, to fix the error, you can try restarting the game. Before restarting, you need to do two more steps, logging out of the Minecraft launcher and then logging back in to refresh your session ID.

Follow these steps:

1) Quit the game.

2) Log out of the Minecraft launcher. To do so, you can click your profile icon at the top left corner and then click Log out.

log out of minecraft launcher

3) Close the Minecraft launcher.

4) Restart the Minecraft launcher.

5) Log back into the Minecraft launcher.

Connect to the server again and check to see if the error is resolved.

Method 2: Edit the hosts file

When the Minecraft “Invalid session” error occurs, the hosts file list could be corrupted. Removing the Minecraft entries from the hosts file may help fix the error. Here’s how:

1) Run Notepad as administrator.

run notepad as administrator

2) Click File at the top menu bar then click Open…

3) Type “C:\Windows\System32\Drivers\etc\hosts” in the File name box and click Open.

open the hosts file

4) Look for and delete any lines containing Mojang.

edit the hosts file by deleting any line containing Mojang

5) Save the file.

6) Check to see if the error is resolved.

Method 3: Disable your VPN

Some VPNs can cause the Minecraft “Invalid session” error. If you have any VPN running when the error occurs, disable it and see if the error persists. If the error is gone, then the VPN is the cause.

If you verify VPN is the cause, you can contact the vendor of the VPN for assistance regarding this error or switch to other VPNs.

Method 4: Change the server mode to offline

The Minecraft “Invalid session” error means the Minecraft authentication server determines your account is invalid. To join your server successfully without the error, you can edit the server settings by changing the server mode to offline. After that, the Minecraft authentication server won’t check your account if it’s valid or not.

Here’s how:

1) Open the server folder where you store your Minecraft server files.

2) Find the server.properties file, and open it with Notepad.

3) Locate the “online-mode=true” line, and change it to “online-mode=false” (this will make the server bypass the account authentication check).

change the minecraft server mode to offline

4) Save your changes and close the server.properties file.

5) Check to see if the error is resolved.

Method 5: Reinstall Minecraft

To fix the error, you can try reinstalling Minecraft. Here’s how:

1) Press Win+R to open the Run box.

2) Type “%appdata%” into the Run box and then press Enter to open the Roaming folder.

3) From the Roaming folder, open the .minecraft folder. Then, find and store the saves folder to any safe location on your PC.

4) Delete the .minecraft folder. This will uninstall Minecraft from your PC.

5) Launch Minecraft launcher, then Minecraft will install again.

6) Once Minecraft is installed, a new .minecraft folder will be created automatically. Copy and paste the saves folder you stored in Step 3) to the new .minecraft folder.

Check to see if the error is resolved. If the error remains, continue to the next method.

Method 6: Contact Mojang Support

After you try the above methods, if the error still persists, the error is probably on the Mojang’s end. You can check Mojang’s Twitter account (Mojang Status) and see if there are any announcements about this error.

It’s recommended you contact Mojang Support for further info about this error. To contact Mojang Support, you can visit the Minecraft website contact page and submit your information.

Method 7: If you use a cracked Minecraft account

If you use a cracked Minecraft account, you’ll be rejected by Mojang’s authentication server and encounter the “Invalid session” error. You can edit the server settings to allow cracked Minecraft accounts. If you have no idea how to do that, contact your server hosting and they’ll tell you the detailed instructions.

For Aternos hosting, here’s how to allow cracked Minecraft account:

1) Log in to your Aternos Server Control Panel.

2) Stop your Minecraft server.

3) Click Options, then enable Cracked and Whitelist.

allow cracked account in aternos

4) Start the server.

5) Connect to your Minecraft server again and see if you can join the server successfully.

Hopefully you find this post helpful. If you have any questions, feel free to drop a comment below. I’ll get back to you ASAP.

Leave a Comment