How to Fix ‘Failed to Download File, the File contents Differ’ in Minecraft?

The ‘Failed to download file’ error on Minecraft occurs if your system’s firewall is hindering the operation of Minecraft. Moreover, a corrupt Minecraft file or mods may also cause the issue at hand. This occurs when a user launches the Minecraft Launcher but encounters the following type of message ( this also occurs sometimes after a mod installation):

Failed to download file, the file contents differ from what was expected.
Name: jopt-simple-4.5.jar
URL: https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar
Filename on disk: jopt-simple-4.5.jar
Path: C:\Users\lucas\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar
Exists: File
Failed to Download File, the File Contents Differ from What Was Expected

This download error is mostly caused because of the following reasons:

  • Outdated Minecraft Game/ Launcher: The Minecraft launcher is updated regularly to fix bugs and keep up with other OS modules. If your Minecraft installation is missing an essential update, it can halt the download process.
  • Corrupt/ Incompatible Minecraft Mod: Mods are enhancements to the Minecraft game but if any of the installed Minecraft mods on your system are corrupt (or incompatible) with the OS/game, it may result in conflicts within the game itself.
  • Firewall/Network Restrictions: To safeguard your system/data, the Firewall and your network provider imply different techniques and protocols; however, the download will fail if the firewall of your system or your network blocks access to the Minecraft servers.
  • Corrupt Minecraft Installation: If your system suffered a power loss while playing Minecraft or you forcefully closed the game, the Minecraft installation might have become corrupt eventually resulting in the ‘download failed’ Minecraft issue.

Before moving on, make sure to remove any applications not compatible with Minecraft (like ByteFence) from your system.

Update Minecraft to the Latest Release

The failed to download issue could be the result of an outdated Minecraft launcher; here, updating Minecraft to the latest release may solve the problem.

  1. Open the Minecraft Launcher and next to your username, click on Options.
  2. Then click on Force Update and once the Minecraft launcher is updated, check if the download file issue is resolved.
    Force Update the Minecraft Launcher

Open the Vanilla Launcher

If the issue has started to occur of a glitch in a mod (after the mod was applied to a non-vanilla launcher), then opening Minecraft through the Vanilla Minecraft launcher may solve the problem.

  1. Close the non-Vanilla launcher and also exit it from the system tray (if present).
  2. Then open the Minecraft native (i.e., Vanilla) launcher and hit Play.
  3. Let it run until the Create Game Screen is shown and then close the vanilla launcher (from the system tray as well).
  4. Now open the other launcher you were using and check if the download file issue is clear.

Twitch users may have to click on the Mod Pack and at the launcher screen, switch the game to Vanilla, and open the game. Now let it completely load, then close it, and repeat the same for the Mod Pack to check if the issue is resolved.

Set Java to Open .Jar Extension

If Java (or JDK) is not set as the default application to open the .Jar (or .Java) file extensions, then the downloaded files wouldn’t be parsed correctly and hence cause incompatibility. Changing the file opening preferences will solve the issue. 

  1. Right-click Windows and open Run.
    Open the Run Command Box from the Quick Access Menu
  2. Now navigate to the following:
    %appdata%\.minecraft\assets\indexes\
  3. Then right-click on a file with .Jar or .Java extension (if extensions are not shown, then you may have to display file extensions) and select Properties.
  4. Then click on the Change button in front of Opens With and select Java or OpenJDK Platform Binary.
    Set the OpenJDK Platform Binary to Open the .Jar File
  5. Now apply your changes and open the launcher to check if the download file issue is resolved.

Use a VPN Connection to Download the File

The download file issue could be the result of a glitch of the regional Minecraft server (in the past, UK servers are reported to face the glitch), and using a VPN to connect to a different server may solve the problem. Before moving on, make sure to exit the launcher and close it from the system tray.

  1. Download and install a VPN application on your system (if already not installed).
  2. Then connect to a different location and open the launcher to check if the download file issue is resolved.

Disable the Firewall of Your PC

You may fail to download files from Minecraft if the firewall of your PC is hindering the operation of the Minecraft launcher. In this case, disabling the PC’s firewall may solve the problem.

Warning:

Move forward at your own risk as disabling the firewall of your PC may expose your PC/data to threats.

  1. Open the System Tray (near the clock) and right-click on your security application (like ESET).
  2. Now select Pause Firewall (Allow All Traffic) and then confirm to Pause the Firewall.
    Pause ESET Firewall of Your System
  3. Then disable the Windows Firewall as well and afterward, open the Minecraft launcher to check if the Minecraft launcher can download the file.

Remove the Corrupt Mod

The download file issue could be the result of a corrupt Minecraft mod and removing the same may solve the issue at hand.

  1. Firstly, close the Minecraft Launcher and also exit it from the system tray.
  2. Now right-click on Windows and select Run.
  3. Then execute the following:
    %appdata%
    Open the Roaming App Data Folder Through Run
  4. Now open the .Minecraft directory and double-click on the Mods folder.
    Open the Mods Folder in Minecraft Directory
  5. Then copy the mods to another location and delete them from the Mods folder.
  6. Now open the Minecraft Launcher and check if it is working fine.
  7. If so, then exit it and also close it from the system tray.
  8. Then copy one of the mods to the Mods folder and open the Minecraft launcher to check if it is working fine.
  9. If so, then, one by one, copy the mods back to the Mods folder till you find the problematic mod. Once found, either update it (if possible), otherwise, contact the mod developer to solve the issue.

Manually Download the File and Place it in the Minecraft Directory

As the launcher fails to automatically download the file and update it in the directory, manually doing the same may do the trick. Before moving on, make sure to copy the error message to a text document and then exit the Minecraft launcher.

  1. Copy the URL given in the error message e.g., the following address:
    https://libraries.minecraft.net/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar
  2. Now launch a web browser (e.g., Chrome) and paste the copied address in the address bar of the browser.
  3. Then let the file download and afterward copy it.
  4. Now right-click on the Windows button and select File Explorer.
    Open File Explorer from the Quick Access Menu
  5. Then steer to the address given in the error message (except the file name at the end of the address) e.g., the following address:
    C:\Users\%username%\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\
  6. Now delete the file (the file name written at the end of the address in the error message) like jopt-simple-4.5.jar.
    File to Download, Address to Place the File, and The File to be Deleted
  7. Then confirm to delete the file (if asked to) and afterward, paste the file copied at step 3.
  8. Now open the Minecraft launcher and check if the download file issue is resolved.
  9. If that did not work, then check if unzipping the downloaded file and placing it in the path mentioned in step 5 solves the issue.
  10. If you are using a non-Vanilla launcher, then after placing the downloaded file, launch the Vanilla launcher and hit Play. Once you are on the Create Game screen, exit the launcher and use the other launcher to check if the issue is resolved.

If you are using Twitch with the Vanilla launcher, then you may have to replace the file in the Documents directory as well. Firstly, navigate to the following address:

C:\Users\%username\Documents\Curse\Minecraft\Install\libraries\net\java\dev\jna\jna\

Then open the version number folder e.g., 4.5, and paste the file (copied at step 3) here. If asked to, select Replace. Afterward, firstly, open the Vanilla launcher and then repeat step 12 to check if the issue is resolved.

Reinstall the Minecraft Launcher

If the issue persists, then the ‘failed to download file’ issue could be the result of the corrupt installation of the Minecraft Launcher, and reinstalling it may solve the problem.

  1. Right-click Windows and select Run.
  2. Now execute the following (copy-paste the address):
    %appdata%
  3. Now open the .Minecraft directory and copy the Saves folder to a safe place (in case you want to save the worlds you have been playing).
    Copy the Saves Folder to the Minecraft
  4. Then right-click Windows and in the menu shown, select Apps & Features.
  5. Now expand Minecraft (you can search for it in the search box) and click on Uninstall.
    Uninstall Minecraft
  6. Then confirm to uninstall the Minecraft and follow the prompts to complete the uninstall process.
  7. Now reboot your PC and upon reboot, navigate to the following path in Run:
    %appdata%
    Delete the Minecraft Folder in the Roaming Directory
  8. Then delete the .Minecraft folder and navigate to the following path in Run:
    AppData
    Open AppData Through the Run Box
  9. Then delete all the Minecraft folders from the all three following folders:
    Local
    
    LocalLow
    
    Roaming
    Delete the Minecraft Folders in Local, Locallow, and Roaming Folders
  10. Then reinstall Minecraft from the official Minecraft website and hopefully, the download file issue would be resolved.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Fix ‘Failed to Download File, the File contents Differ’ in Minecraft?

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested