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
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.
- Open the Minecraft Launcher and next to your username, click on Options.
- Then click on Force Update and once the Minecraft launcher is updated, check if the download file issue is resolved.
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.
- Close the non-Vanilla launcher and also exit it from the system tray (if present).
- Then open the Minecraft native (i.e., Vanilla) launcher and hit Play.
- Let it run until the Create Game Screen is shown and then close the vanilla launcher (from the system tray as well).
- 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.
- Right-click Windows and open Run.
- Now navigate to the following:
%appdata%\.minecraft\assets\indexes\
- 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.
- Then click on the Change button in front of Opens With and select Java or OpenJDK Platform Binary.
- 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.
- Download and install a VPN application on your system (if already not installed).
- 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.
- Open the System Tray (near the clock) and right-click on your security application (like ESET).
- Now select Pause Firewall (Allow All Traffic) and then confirm to Pause the Firewall.
- 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.
- Firstly, close the Minecraft Launcher and also exit it from the system tray.
- Now right-click on Windows and select Run.
- Then execute the following:
%appdata%
- Now open the .Minecraft directory and double-click on the Mods folder.
- Then copy the mods to another location and delete them from the Mods folder.
- Now open the Minecraft Launcher and check if it is working fine.
- If so, then exit it and also close it from the system tray.
- Then copy one of the mods to the Mods folder and open the Minecraft launcher to check if it is working fine.
- 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.
- 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
- Now launch a web browser (e.g., Chrome) and paste the copied address in the address bar of the browser.
- Then let the file download and afterward copy it.
- Now right-click on the Windows button and select File Explorer.
- 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\
- Now delete the file (the file name written at the end of the address in the error message) like jopt-simple-4.5.jar.
- Then confirm to delete the file (if asked to) and afterward, paste the file copied at step 3.
- Now open the Minecraft launcher and check if the download file issue is resolved.
- 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.
- 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.
- Right-click Windows and select Run.
- Now execute the following (copy-paste the address):
%appdata%
- 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).
- Then right-click Windows and in the menu shown, select Apps & Features.
- Now expand Minecraft (you can search for it in the search box) and click on Uninstall.
- Then confirm to uninstall the Minecraft and follow the prompts to complete the uninstall process.
- Now reboot your PC and upon reboot, navigate to the following path in Run:
%appdata%
- Then delete the .Minecraft folder and navigate to the following path in Run:
AppData
- Then delete all the Minecraft folders from the all three following folders:
Local LocalLow Roaming
- Then reinstall Minecraft from the official Minecraft website and hopefully, the download file issue would be resolved.