
Minecraft error code 1 means the Java game crashed during launch or play, usually because of a Java problem, an outdated or mismatched mod, or an old graphics driver, and the fix is to update Java and the driver, remove the problem mod, and check the launcher path. This guide covers exit code 1 in full, plus exit code -1, the out-of-memory error, the Bedrock Drowned sign-in error, the getsockopt connection error, and the internal server errors players see when joining servers. For the wider map of game errors, see our guide to game error codes.
Read the Crash Report Before You Fix Anything
When Minecraft Java Edition crashes, the launcher shows the exit code and a crash report. Read the first lines of the report: they usually name the cause, such as a mod, a Java error, or a graphics driver problem. Note whether the crash happens at launch, when loading a world, or when joining a server, and whether it started after an update, a new mod, or a driver change. Back up your saves before you change anything: copy the saves folder inside .minecraft somewhere safe.
Exit Code 1: The Game Crashed During Launch or Play
Exit code 1 is a generic crash code. It means Minecraft Java Edition stopped unexpectedly, and the crash report holds the real reason. The most common causes are a Java configuration problem, a mod made for a different Minecraft version, an outdated graphics driver, or a broken launcher path. Work through these fixes in order.
- Reinstall or update Java. Exit code 1 is usually a Java problem, so reinstalling Java is the best first step. Uninstall Java as you would remove any other program, then download the latest version from the official Java download page and install it.
- Check the mod versions. If you use mods, every mod must match the Minecraft version installed on your computer. A mod made for version 1.19 will crash a game running version 1.20. Open the mods folder, check each mod’s version number, and replace any mod that does not match.
- Find the problem mod. If all the mods match the game version and the crash continues, one mod’s files may be conflicting with the game. Move all the mods out of the mods folder, then move them back one at a time, launching the game after each one. The mod that brings the crash back is the culprit: delete it.
- Update the graphics driver. Download the latest driver from your graphics card maker’s site: NVIDIA, AMD, or Intel. An old driver causes launch crashes as well as graphics problems in play.
- Change the Java executable path. Open the Minecraft Launcher, go to Minecraft Java Edition, then Installations, click the three dots next to Latest release and choose Edit. Click “More options”, then Browse in the Java Executable section, find your Java installation folder, select
java.exe, and click Open. - Change the launcher path. If your Windows username has a special character in it, the launcher path can break. Right-click the Minecraft Launcher shortcut, open Properties, go to the Shortcut tab, and add
–workDir %ProgramData%.minecraftto the end of the Target field. Do not change the original link. - Repair the launcher. On Windows, open Settings, then Apps, then Installed apps, find Minecraft Launcher, open its three-dot menu, choose Advanced options, and use the Repair option.
- Reinstall Minecraft without deleting saves. Back up your saves first, then uninstall the game and install it again. This replaces corrupted game files while keeping your worlds.

Exit Code -1: The Game Stopped Before Fully Loading
Exit code -1 is another generic Java crash code. It means Minecraft stopped before it finished loading, and it shares the same causes as exit code 1: Java, mods, drivers, and the launcher path. Use the same fix order as above.
One detail separates the two codes. If exit code -1 appears only when loading one particular world, the problem sits with that world’s files rather than with the game itself. Back up the world folder first, then test a new world: if the new world loads and the old one does not, the old world’s data is damaged. Do not delete the world until you have a backup copy somewhere safe.
Java Out-of-Memory Error
The out-of-memory error means Minecraft ran out of the RAM Java was allowed to use. It usually appears with large modpacks, big render distances, or many background programs.
Close background apps and browser tabs first, then give Minecraft more RAM. In the launcher, open Installations, edit your profile, open “More options”, and find the JVM Arguments field. It contains a flag like -Xmx2G, which sets the maximum RAM to 2 GB. Raise it to 4 GB (-Xmx4G) if your PC has at least 8 GB of RAM. Do not allocate more RAM than your system can spare: giving Minecraft almost all of your memory leaves nothing for Windows.
Error Code Drowned: Bedrock Sign-In Failure
Error code Drowned is a Bedrock Edition error that stops players signing into their Microsoft accounts, which blocks worlds, Realms, and multiplayer. Players reported it widely after the Bedrock 1.21.120 update, and the reports describe a login authentication failure between Minecraft and Microsoft’s servers. No official Mojang fix was confirmed at the time of writing, so the steps below are the ones players report as working.
- Try the offline login workaround. Turn off your Wi-Fi or unplug the Ethernet cable, launch Minecraft Bedrock while offline, wait for the main menu to load, then turn the internet back on and sign into your Microsoft account. You may need to repeat it every time you play.
- Clear the Minecraft cache. On Windows, press Win + R, type
%LocalAppData%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalCache, and delete everything inside the LocalCache folder. On Android or iOS, go to Settings, then Apps, then Minecraft, then Storage, and tap “Clear Cache”. Do not tap “Clear Data”. - Re-link your Microsoft account. Sign out of Minecraft completely, check that your account is active at account.xbox.com, then launch Minecraft and choose “Sign in with Microsoft Account” and follow the code steps.
- Check the service status. Open the Xbox Live status page and the Minecraft Help Center. If either service shows an outage, wait for it to be restored.
If the error survives these steps, check the Microsoft support thread for Drowned, where players and support staff share newer workarounds as they appear.

Getsockopt Error: Connection Timed Out
The getsockopt error appears as “Connection timed out: getsockopt” when Minecraft cannot establish or keep a connection to a server. It is a network error, not a Java error. Possible causes include a firewall rule, a DNS problem, a server that is down, or outdated software.
Before changing settings, check that the server you want to join is actually online, and check that your own Wi-Fi is working. Restart your router. Then work through these steps:
- Allow Minecraft through the firewall. Open Windows Defender Firewall, choose “Allow an app or feature through Windows Defender Firewall”, and make sure
javaw.exe(the Java Platform SE binary) is allowed. If your antivirus has its own firewall, add the same exception there. - Switch to a public DNS. Change your network’s DNS to Google DNS (8.8.8.8 and 8.8.4.4) or Cloudflare DNS (1.1.1.1 and 1.0.0.1) and try joining again.
- Test another network. A phone hotspot takes a minute to test. If the server joins on the hotspot, your home network is blocking the connection.
- Check the server address. A typed address with a wrong port or a missing character produces the same timeout. Copy the address from the server’s own page instead of typing it.
Internal Server Error and Internal Exceptions
“Internal server error” in Minecraft usually arrives as an “Internal Exception” message, and the text after it names the cause:
- ReadTimeoutException means the connection to the server stalled because no data arrived within the timeout window. The server may be overloaded or your connection may have dropped packets.
- “An existing connection was forcibly closed by the remote host” means the server ended your connection. This can be a server restart, a kick, or a network break.
- “Connection reset” means the TCP connection closed abruptly in the middle of the session.
For all three, check whether the server is online and whether other players report the same problem, restart your router, switch to a wired connection, and try again in a few minutes. If the error appears on one server only, the fault sits with that server. If it appears on every server, the fault sits with your connection, and the getsockopt steps above are the ones to follow.
Network Protocol Error
The network protocol error appears when your game client and the server disagree about the version of the game. The most common cause is joining a server that runs a different Minecraft version from yours: a 1.21 client joining a 1.20 server, for example. Check the server’s listed version, then switch your game to that version in the launcher’s Installations tab before joining. On modded servers, a mod on your side that the server does not have causes the same error, so match the mod list to the server’s list.
Failed to Login: Invalid Session
“Failed to login: Invalid session (Try restarting your game)” means your Minecraft session token is no longer valid, so the server rejected your login. Close the game fully, launch it again, and sign in fresh. If the error returns, sign out of the Minecraft Launcher and sign back in, which issues a new session token. The error is an account session problem, not a problem with the server.
.bat Errors When Starting a Server
Players who run a modded server with a .bat file sometimes report a “bat error” when the file fails to start the server. The usual causes are a Java path the file cannot find, or RAM flags the system cannot honor. Open the .bat file in a text editor and check that the Java path points at an installation that exists, and that the -Xmx value is no larger than the RAM your PC has free. Back up the server’s world folder before changing the launch file.
Video Guides
The video below walks through the Drowned sign-in error on Nintendo Switch: signing out and back in, checking the server status, updating the game, and the other steps that restore multiplayer and Realms access. Every step also appears in writing above.


Frequently Asked Questions
What is Minecraft exit code 1?
Exit code 1 is a generic crash code for Minecraft Java Edition. It means the game stopped unexpectedly, usually because of a Java problem, a mod made for the wrong game version, or an outdated graphics driver.
How do I fix Minecraft exit code 1?
Reinstall or update Java, check that every mod matches your Minecraft version, update the graphics driver, and check the launcher path. Remove mods one at a time to find the one causing the crash.
What is Minecraft error code Drowned?
Drowned is a Bedrock Edition sign-in error that stops players logging into their Microsoft accounts after the 1.21.120 update. Players report that launching the game offline and signing in after the main menu loads works as a temporary workaround.
What does the getsockopt error mean in Minecraft?
It means the connection to the server timed out before it was established. Allow javaw.exe through your firewall, try a public DNS, restart your router, and check that the server is online.
How much RAM should I give Minecraft?
2 GB is enough for the plain game. For modpacks, 4 GB is a good setting if your PC has at least 8 GB of RAM. Do not allocate more than your system can spare, or Windows itself will run short.
Will reinstalling Minecraft delete my worlds?
Not if you back them up first. Copy the saves folder inside .minecraft somewhere safe before uninstalling, then put it back after reinstalling.
Related Fixes
If the error is in another game, our guides cover Valorant and League error codes, starting with Vanguard error 57, Steam error codes, starting with the disk write error, Fortnite and Epic Games error codes, starting with the matchmaking error, and Call of Duty and Battlefield error codes, starting with the Battlefield 6 DirectX error.
Sources
10
- Minecraft Help Center: https://help.minecraft.net/hc/en-us
- Microsoft Q&A, Drowned error code fix: https://learn.microsoft.com/en-us/answers/questions/5603551/drowned-error-code-fix
- Android Authority, Minecraft exit code 1 error: what it is and how to fix it: https://www.androidauthority.com/minecraft-exit-code-1-error-fix-3343756/
- How-To Geek, How to fix Minecraft exit code 1 on Windows: https://www.howtogeek.com/fix-minecraft-exit-code-1-on-windows/
- Help Desk Geek, How to fix a Minecraft exit code: 1 error? 5 solutions: https://helpdeskgeek.com/5-ways-to-fix-minecraft-exit-code-1/
- Beebom, How to fix Minecraft exit code 1 error: https://beebom.com/how-fix-minecraft-exit-code-1-error/
- Beebom, How to fix the getsockopt error in Minecraft: https://beebom.com/how-to-fix-getsockopt-error-in-minecraft/
- MakeUseOf, 6 ways to fix Minecraft’s “Exit Code: 1” on Windows: https://www.makeuseof.com/minecraft-exit-code-1-windows/
- FDayTalk, Minecraft Drowned error code fix (1.21.120 update): https://www.fdaytalk.com/minecraft-drowned-error-code-fix/
- N4G, Minecraft error codes list (and how to fix them): https://n4g.com/articles/minecraft-error-codes-list-and-how-to-fix-them
Every factual claim on this page was verified against a named source above, or is presented as a general troubleshooting step from the game’s own support guidance.



