While Minecraft usually works without a hitch, there are a few errors that occasionally appear. One of these is the “Failed to download file, the file contents differ from what was expected” error message.

If you’re currently dealing with this glitch, you’ve come to the right place. In this article, we’ll discuss what causes this error and 5 ways to fix it.

Table of Contents

    What Causes the “Failed to Download File” Error

    The “Failed to download file” error message sometimes appears when you open the Minecraft Launcher on a Windows PC. As the launcher tries to update Minecraft, a message pops up preventing you from playing the game.

    As with every glitch, there are multiple things that might be to blame, and it may take some troubleshooting to find the exact cause. Potential causes include:

    1. An outdated launcher. The Java Edition of the Minecraft video game is opened via the Minecraft Launcher application. If this is out of date, or the files are corrupted, the download process may be hampered.
    2. Incompatible Minecraft mods. This Minecraft error occasionally appears after installing a mod. This may be due to incorrect installation, incompatibility with the version of Minecraft, or mod files that became corrupted during installation.
    3. Firewall restrictions. The firewall is designed to protect your system from suspicious network activity. Unfortunately, it can sometimes mistakenly identify legitimate apps as malicious. When this happens with the Minecraft Launcher, you get the “Failed to download file” error message.

    Here are 6 ways to fix the “Failed to download file” glitch.

    1. Manually Download the Missing File

    The easiest way to fix Minecraft following this error is to follow the instructions in the error message itself.

    The “Failed to download file” error message contains the name of the missing file (next to “Filename on disk”), a URL from which you can download the file, and the location on your drive where the file needs to be.

    To retrieve the file manually:

    1. Copy the URL from the error message and paste it into the address bar of your web browser.
    1. Let the file download automatically.
    2. Navigate to the File Explorer path specified in the error message. To do this, open File Explorer and copy and paste the path into the address bar.
    1. Transfer the file from your Downloads folder to the path in File Explorer, replacing the old file if necessary.
    2. Restart the Minecraft Launcher and see if the error is resolved. If not, leave the new file in place and try the following fixes.
    3. Remove Corrupted Mods

    Since corrupt Minecraft mods are one of the main causes of this issue, it’s a good idea to rule this out. To do so:

    1. Head to the .minecraft folder located at the following path: C:\Users\%username%\AppData\Roaming\.minecraft.
    1. Remove the mods folder from the .minecraft folder. Make sure to back it up in a different location if you want to keep your modpacks.
    1. Open the Minecraft Launcher and see if it works.
    2. If it does work, one of your mods is causing the error message. You can add each mod back one-by-one to see which is at fault.

    Note: We recommend starting with the most recent mod, since that’s the one most likely to be causing the glitch.

    2. Uninstall Non-Vanilla Minecraft Launchers

    If you’re using a non-vanilla Minecraft Launcher to play Minecraft, it may be interfering with the download procedure. To check whether this is the case, uninstall the non-vanilla launcher (or find the installed files and delete them all manually).

    With the other launcher out of the way, open the legitimate Minecraft Launcher and see if it works.

    3. Reinstall Minecraft

    If none of the above has worked for you, the next most likely cause of the error is that your Minecraft installation is corrupted. Since you’re no longer able to force update Minecraft, reinstalling is the easiest way to ensure that the files are correct and up-to-date. To do so:

    1. Press Start and type Add or remove programs. Select it from the list.
    1. Scroll down and click Minecraft Launcher then Uninstall. Wait for the process to complete.
    1. Do the same for Minecraft.
    2. Navigate to the Minecraft directory at C:/Users/%username%\AppData\Roaming\ and delete the .minecraft folder. Don’t forget to back up your Save folder if you want to keep your existing game files.
    1. Download and install Minecraft from the official Minecraft.net webpage.
    1. Open the launcher and check whether the error message still appears.

    Note: Some users receive the “Unable to update the Minecraft Native Launcher” error. If this happens to you, you may have to troubleshoot that error before moving on.

    4. Allow Minecraft Launcher Through Microsoft Defender

    The Windows Firewall can also prevent the Minecraft Launcher from downloading files. To check whether the firewall is causing the error, temporarily disable it as follows:

    1. Right-click Start and click Settings.
    1. Click Update & Security.
    1. Click Windows Security.
    1. Select Firewall & network protection.
    1. Click Private Network.
    1. Toggle Microsoft Defender Firewall Off, then check if the Minecraft Launcher is working as it should.

    If the Launcher works properly, Defender is at fault. The next step is to whitelist the Minecraft Launcher in the app’s settings:

    1. Right-click Start and click Settings.
    1. Click Update & Security.
    1. Click Windows Security.
    1. Select Firewall & network protection.
    1. Click Allow an app through the firewall.
    1. Select Change settings.
    1. Click Allow another app.
    1. Click Browse, find and select the Minecraft Launcher, and click Add.
    1. Check the box next to Private then click OK.
    1. Try to launch Minecraft and see if it’s able to download files.

    Note: If you use an antivirus other than Windows Defender, disable it by right-clicking the icon in the system tray and selecting the “disable” option. Next, see if the launcher works correctly. If it does, the third-party antivirus is likely blocking Minecraft from downloading new files.

    5. Ensure Java is Set Up Correctly

    Minecraft relies on a Java runtime environment to open .JAR files and run the game correctly. Occasionally, something will go wrong with Java and the opening preferences will be set up incorrectly. To fix this:

    1. Navigate to C:\Users\%username%\Appdata\Roaming\.minecraft.
    2. Right-click a file with the .JAR extension and select Properties.
    3. Next to “Opens With”, click Change.
    1. Depending on your version, select Java, Java(™) Platform SE Binary, or OpenJDK Platform Binary. To find these, you may have to select More Apps.
    1. Check whether the launcher is able to download files once more.

    Time to Get Back to Mining

    Hopefully, this guide has helped you fix the Minecraft failed-to-download file error and you can get back to where you left off in this fantastic sandbox game. If you know of any other fixes for this error message, let us know in the comments below.