Connection problems

NetHandlerLoginClient Cannot Be Cast to NetHandlerPlayClient

What it looks like in the log

java.lang.ClassCastException: Cannot cast net.minecraft.client.network.NetHandlerLoginClient to net.minecraft.client.network.NetHandlerPlayClient

How to fix it

  1. Update Minecraft Forge to the latest build available for your Minecraft version (especially on 1.7.2 and 1.12, where official patches fixed Netty handshake race conditions).
  2. Try joining the world or server again, since thread timing race conditions during the Forge handshake often succeed on a retry.
  3. Inspect the stack trace lines immediately below the ClassCastException for any mod package names; if a specific mod is sending packets during login, update or remove that mod.
  4. If this occurs in a Forge development environment, verify that all blocks and items are registered during the proper initialization phase and avoid manually overriding the client NetHandler or sending play packets before login finishes.
LoadersForge
SeverityBreaks something
CategoryConnection problems

Check your own log

Related errors