Before proceeding with the troubleshooting process, check the status of the Minecraft servers (especially, the auth server) if they are up and running. Moreover, performing a reboot of your PC/local server may do the trick for you. Additionally, make sure only one server instance is running on the machine. Also, it is worth mentioning that cracked versions cannot authenticate with the Minecraft server and thus show the ‘failed to verify username’ message.
Solution 1: Edit the Hosts File
You may encounter the failed to verify username issue if the Minecraft entries in the Hosts file of your system are not properly configured. In this context, removing the Minecraft entries from the Hosts file may solve the problem.
Solution 2: Update the Minecraft Launcher and Java to their Latest Releases
You may encounter the failed to verify username issue in Minecraft if its launcher or the Java installation of your system is outdated. In this case, updating the launcher and the Java installation to their latest releases may solve the problem.
Solution 3: Create More Storage on the System Drive
The failed to verify username issue may emerge if the drive on which Minecraft is installed is nearly full (which may force the OS to prioritize different essential system operations over the Minecraft processes and thus cause the issue). In this scenario, deleting the temp/unnecessary files of the drive may solve the problem.
Solution 4: Log out and Log Back into the Minecraft Launcher
A temporary glitch between your Minecraft launcher and its server may cause the ‘failed to verify username’ issue. In this scenario, logging out and logging back into the launcher may solve the problem. If the issue persists, then check if your username has space at the end (login to the Minecraft website, double-click on your user’s name, and check if space is highlighted with the name), if so, then you may have to contact the Minecraft support to remove the trailing space.
Solution 5: Allow the Connection to Minecraft in the Antivirus/Firewall Settings
You may fail to verify the username in Minecraft if the antivirus/firewall of your system (Kaspersky is reported to cause the issue at hand) is blocking access to a resource essential for the operation of Minecraft. In this context, allowing the Minecraft connection in the antivirus/Firewall settings may solve the problem. Before proceeding, check if you can access the Minecraft Session Server (a white page means it is OK). Warning: Advance with extreme caution and at your own risk as editing the antivirus/Firewall settings is a proficient task and if not done properly, you may expose your system/data to threats.
Add Minecraft to Trusted Applications of the Firewall
If the issue was resolved after temporarily disabling the antivirus/firewall, then you may add Minecraft in the trusted applications of the antivirus/firewall to allow the connection to Minecraft. For elucidation, we will go through the process for Kaspersky.
Allow the Inbound / Outbound Connection
If the issue persists, you may have to create the inbound/outbound rules to allow the connection to the server. For illustration, we will discuss the process for the Windows Defender Firewall. If that did not do the trick, then make sure the required ports are properly forwarded in the (system and router) firewall. Also, it will be a good idea to check if the parental filters are not blocking the Minecraft connection and thus causing the issue.
Solution 6: Disable/Remove the Conflicting Applications
You may encounter the failed to verify username issue if the conflicting applications (Hamachi server and Relevant Knowledge are reported to create the issue) are hindering the operation of Minecraft. In this context, disabling/removing the conflicting applications may solve the problem. Hamachi server and Relevant Knowledge are reported to cause the issue at hand. If you have Hamachi, then disable/enable it when using Minecraft (or uninstall it), whereas, it will be better to uninstall Relevant Knowledge in Apps & Features.
Solution 7: Change the Server Mode to Offline
If none of the solutions so far did the trick for you (and you are using a custom Minecraft server), then changing the server mode to offline may solve the problem. But before proceeding, make sure the server application (e.g., Craftbukkit) is updated to its latest version. Also, if a whitelist is active on the server, then check if whitelisting (or pardoning yourself) solves the problem. Warning: Proceed at your own risk as setting the server mode as offline may expose your server to hacked accounts and hacking attempts. Also, switching into the offline mode may reset everyone’s progress to defaults. If the issue persists, then check if disabling IPv6 (or setting the IPv4 in the startup batch of your server) on all the network adapters resolves the issue. If the issue persists and you are using a Lunar client, then setting the “displayName” in the launcher_profiles.json (open with Notepad) in the Lunar folder of %appdata% directory file to your username resolves the issue. If not, check if deleting the mentioned launcher_profiles.json resolves the issue.
How to Fix ‘Server Denied POP3 Access for the Given Username and Password’…How to Change your YouTube Username?Steps to Change Your Name and Username on Twitch EasilyFix: “We Were Unable to Verify the Products You Own” Error in Minecraft