How to Fix the “Failed to Download File, the File Contents Differ” Error in Minecraft

Have you opened the Minecraft Launcher and encountered an error message saying, “Failed to download file, the file contents differ from what was expected”? If so, the launcher has failed to update successfully. When this happens, you cannot access the game to explore the dungeons you had planned to explore or mine for hours in your virtual world.

MAKEUSEOF VIDEO OF THE DAY

SCROLL TO CONTINUE WITH CONTENT

This error can occur because of corrupt Minecraft mods, restrictions from antivirus software, corrupt launcher files, or when using a non-vanilla launcher. Here are some fixes to help you fix the issue and run Minecraft again.

Preliminary Checks…

Before applying the main fixes, here are a few preliminary fixes you should perform:

  • Close the error window, and restart the Minecraft launcher.
  • If your device is connected to a VPN, temporarily disable it.
  • If you are running Minecraft on multiple clients, such as a desktop launcher and web browser, close it down on one client before running it on another.
  • If you have recently modified the game files and started to experience this issue afterward, revert those changes.

1. Listen to What the Error Message Says

Consider feeding the Minecraft launcher what it’s asking for before you implement any other fixes. As the error window indicates, the file content on the disk is different from what the launcher expected, so downloading and manually adding the requested file may resolve the issue.

As the error message also specifies the URL from which the file needs to be downloaded and the location on your hard drive where you need to add it, that makes your job much easier.

Before downloading the file and replacing it, copy the error message in a separate file to copy the paths while downloading and pasting the file. Then, follow these steps:

  1. Copy the target URL mentioned below, paste it into any web browser, and let the file download automatically.
     https: 
  2. Copy the downloaded file and navigate to the File Explorer path specified in the error message:
     

    C

    :\

    Users

    \<

    username

    >\

    AppData

    \

    Roaming

    \

    .minecraft

    \

    libraries

    \

    net

    \

    sf

    \

    jopt-simple

    \

    jopt-simple

    \4

    .5

    \
  3. Delete the file named jopt-simple-4.5.jar and paste the downloaded one instead. Deleting the File From the Mincecraft Game Files

Upon replacing the file, restart the launcher to verify that the error has been resolved. If not, unzip the downloaded file in the same folder you pasted it in earlier. If the error persists, let the copied file be placed in the directory and implement the below fixes.

2. Change the Opening Preference of Files With the .JAR Extension

A Java runtime environment is required to open .JAR files. You need to set the proper file opening preference for Java to execute all classes and resources of a .JAR file in one request.

The files won’t be executed if any other application is set as default to open these files. This improper execution can also be responsible for the error under discussion.

To change it, follow these steps:

  1. Go to C: > Users > %username% > AppData > Roaming
  2. Navigate to .minecraft.
  3. Right-click any file with the .JAR extension and select Properties. (In this case, we’re changing the file opening preference using a .JAR file in the addons folder).
  4. Right next to Opens With, click on the Change button.
  5. Select the Java (or JDK) to open such file extensions. Changing the File Preference of .Jar Files in Minecraft Game Files

If you prefer, you can repeat the same process for any other file with the .JAR extension to modify the file opening preferences. However, you can skip this step if the file extension is already set to open in your desired file opening preference.

3. Rule Out Corrupted Mod Issues

If you’re a power Minecraft player who doesn’t hesitate to try out every new Minecraft mod you come across, a corrupt mod file can also lead to this issue. To rule this out, follow these simple steps:

  1. Navigate to the following path:
     

    C

    :\

    Users

    \%

    username

    %\

    AppData

    \

    Roaming

    \

    .minecraft

  2. Copy the mods folder and paste it somewhere else.
  3. Delete the original mods folder from the game files.
  4. Run the Minecraft launcher again.

If deleting the mods folder solves the problem, one of the mods is corrupt. First, you should delete the mod you added recently. After that, you should run the launcher again to see if the problem has been resolved.

The corrupted mod still resides in the game files when the issue persists. The best way to find the culprit is to remove every mod file from the mods folder one by one and launch the launcher repeatedly. Filter out and remove the offending mod permanently, and you’re done.

different minecraft mods installed in the minecraft game files

If deleting all mods doesn’t work, continue implementing the below fixes.

If you’re primarily using a non-vanilla launcher with mods applied, the chances are that the launcher itself is causing the issue. Therefore, locate the folder where the non-vanilla launcher is installed and delete it and all of its associated files. After that, launch the vanilla launcher.

You should abandon non-vanilla launchers and permanently switch to the vanilla launcher if launching with a vanilla launcher resolves the issue.

5. Whitelist the Minecraft Launcher in Microsoft Defender’s Firewall

Microsoft Defender’s Firewall could also be causing this error as it can prevent the launcher from downloading the files correctly. Therefore, whitelisting Minecraft in the Firewall settings (allowing the app through the Firewall) holds a good chance of resolving the issue.

Follow the steps below to do so:

  1. Right-click on the Windows Start button and go to Settings.
  2. Go to Update & Security.
  3. Click on Windows Security in the left-sidebar.
  4. Go to Firewall & network protection in the right-hand pane. Firewall and Threat Protection Option in Windows Settings in Windows 10
  5. Click on Allow an app through the firewall in the right-hand pane.
  6. Click on the Change settings and then hit Allow another app… button.
  7. Click on Browse and locate the Minecraft launcher app.
  8. Then, click Add. Adding Minecraft Launcher in the List of Allowed Apps in Windows Defender Firewall Launcher
  9. Check the boxes for Private and Public.
  10. Hit OK.

Windows 11 users need to follow a different process to whitelist the app. If you haven’t created an exclusion before, refer to our guide on whitelisting files on Windows 11 to exclude the Minecraft launcher. Try running the launcher again after whitelisting the launcher to see if it downloads the file this time. If the error persists, reinstall Minecraft.

6. Reinstall Minecraft

Since you must delete the existing installation before reinstalling Minecraft, copy the Save folder from the game files and save it elsewhere to avoid losing your progress. Afterward, open the Windows Control Panel, click on Programs and Features, locate the Minecraft Launcher, right-click on it, and select Uninstall.

uninstalling minecraft in the control panel

Then, go to C: > Users > %username% > AppData > Roaming and delete the “.minecraft” folder. Afterward, grab a copy of Minecraft from the official website and install it on your computer.

Do not forget to copy the Save folder again in the exact location in a fresh installation so that you can continue playing the game while retaining the previous progress.

7. Ensure the Problem Doesn’t Come From Minecraft or Report the Issue to Minecraft

If the problem persists after applying all of the fixes mentioned above, the issue might originate from Minecraft’s backend. To confirm this, go to the Minecraft bug reporting tool and check the most recent cases reported.

Whenever you find multiple reports pertaining to the same issue, you should wait until Minecraft automatically resolves it. If you’re the only one having this problem, report it and hear what they say.

Get Back to Exploring Your Minecraft World

By applying the above fixes, you should be able to fix the “Failed to download file, the contents differ from what was expected” error in Minecraft. If the problem persists, consider going back to an older version of the game.

Even if that wouldn’t solve the issue, let the Minecraft launcher rest for a while and play Minecraft classic on the web. While it has several limitations, it’s a good alternative if you’re eager to play the game.