SpongePowered / SpongeForge

A Forge mod that implements SpongeAPI
http://www.spongepowered.org/
MIT License
1.14k stars 306 forks source link

Client Logging Issue #1507

Closed Keaton1188 closed 7 years ago

Keaton1188 commented 7 years ago

Hi all, we have been having a issue on our servers for some time now.

What it is, if you log out on a manually generated world and then try to log back in, it just won't let you, basically the server sees the client logging in but the client still thinks its in the logging process, maybe it does not receive some form of packet.

This is only a issue with Bungee, if you have a single servers its fine but the issue arises when you use Bungee, so its either Bungee/spongeForge or Nucleus. (Nucleus is what we used to manually generate one of the worlds /world create etc.

Annoying thing is, there is no error logs for it.

SpongeForge: Minecraft: 1.10.2 SpongeAPI: 5.2.0-SNAPSHOT-a26c654 SpongeForge: 1.10.2-2281-5.2.0-BETA-2322 Minecraft Forge: 12.18.3.2254

m31317015 commented 7 years ago

Check Bungeecord, I have this problem too and I notice that I got disconnected immediately no sooner have I connected. A message would pop up like this:

[Player] <-> ServerConnector [Server] has connected [Player] <-> ServerConnector [Server] has disconnected

Sir-Will commented 7 years ago

Same issue here, sponge forge build 2464. For some reason I can mainly reproduce it by killing my game while in that world.

This error shows up on the client log when connecting:


[12:34:22] [Client thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Could not get provider type for dimension 2, does not exist
    at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_131]
    at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1045) [bcx.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:371) [bcx.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: java.lang.IllegalArgumentException: Could not get provider type for dimension 2, does not exist
    at net.minecraftforge.common.DimensionManager.getProviderType(DimensionManager.java:132) ~[DimensionManager.class:?]
    at net.minecraftforge.common.DimensionManager.createProviderFor(DimensionManager.java:282) ~[DimensionManager.class:?]
    at net.minecraft.client.multiplayer.WorldClient.<init>(WorldClient.java:63) ~[bln.class:?]
    at net.minecraft.client.network.NetHandlerPlayClient.func_147282_a(NetHandlerPlayClient.java:274) ~[bll.class:?]
    at com.mumfrey.liteloader.client.PacketEventsClient.handlePacket(PacketEventsClient.java:149) ~[PacketEventsClient.class:1.10.2-SNAPSHOT+jnks-b6.git-ff13a62c8cd27e67b6f886f216016cd65c5f59b8]
    at com.mumfrey.liteloader.core.PacketEvents.handlePacketEvent(PacketEvents.java:219) ~[PacketEvents.class:1.10.2-SNAPSHOT+jnks-b6.git-ff13a62c8cd27e67b6f886f216016cd65c5f59b8]
    at com.mumfrey.liteloader.core.PacketEvents.handlePacket(PacketEvents.java:161) ~[PacketEvents.class:1.10.2-SNAPSHOT+jnks-b6.git-ff13a62c8cd27e67b6f886f216016cd65c5f59b8]
    at com.mumfrey.liteloader.core.PacketEvents.handlePacket(PacketEvents.java:148) ~[PacketEvents.class:1.10.2-SNAPSHOT+jnks-b6.git-ff13a62c8cd27e67b6f886f216016cd65c5f59b8]
    at com.mumfrey.liteloader.core.event.EventProxy$2.$event00004(Unknown Source) ~[?:1.10.2-SNAPSHOT+jnks-b6.git-ff13a62c8cd27e67b6f886f216016cd65c5f59b8]
    at net.minecraft.network.play.server.SPacketJoinGame.func_148833_a(SourceFile) ~[gw.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[fl$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_131]
    at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.util.Util.func_181617_a(SourceFile:45) ~[h.class:?]
    ... 9 more
[12:34:22] [Client thread/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_131]
    at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1045) [bcx.class:?]
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:371) [bcx.class:?]
    at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: java.lang.NullPointerException
    at net.minecraft.client.network.NetHandlerPlayClient.func_147240_a(NetHandlerPlayClient.java:1749) ~[bll.class:?]
    at net.minecraft.network.play.server.SPacketCustomPayload.func_148833_a(SPacketCustomPayload.java:58) ~[gl.class:?]
    at net.minecraft.network.play.server.SPacketCustomPayload.func_148833_a(SPacketCustomPayload.java:11) ~[gl.class:?]
    at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[fl$1.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_131]
    at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_131]
    at net.minecraft.util.Util.func_181617_a(SourceFile:45) ~[h.class:?]
    ... 9 more
m31317015 commented 7 years ago

I would say I've been fine. The way I solve it would be a trade-off: ip_forward: false

I tried several plugins from either side, bungee or sponge, none of them worked. Only way is to turn off ip_forward and forward the port yourself in the router.

Sadly if you don't have one you got to get yourself one, unless you're using a single PC that is not sharing external ip with any other devices.

Sir-Will commented 7 years ago

What has this to do with ip forward?

Slind14 commented 7 years ago

This is a game breaking bug for servers requiring additional worlds. Any help would be much appreciated.

m31317015 commented 7 years ago

The following are my own opinion and guesses.

No it's not only that, players cannot even join the server (please look at the first post), how can they possibly create worlds?

That is another problem, the current problem here is discussing is player is not able to join the server without ip_forward turned off. That solution I found was from I believe waterfall forums.

For the waterfall side, I would say the solutions without further explanation on technical terms is: Waterfall, or even Bungeecord, are not directly designed for Sponge platform but rather Spigot and Craftbukkit. This is a very apparent thing. Until the devs stand out and make a public announcement about this bug being fixed, multi-world support for sponge would be very buggy.

About the ip_forward thing, it seems like there's codes that I don't really understand much about trying to connect together. I can't figure out the relationship between ip_forward and not able to join server, but since I have a router I simply just forward the port by myself and baam, problem solved, I can join server now.

Last time I use sponge with waterfall was a month ago, we were using mods to create worlds and its totally fine. I guess if you say that "game breaking bug" is obstructing you to create new worlds via plugins, it has to be Sponge API failed to tell the world to the player via Waterfall.

Sir-Will commented 7 years ago

@m31317015 You seem to have a different issue. This issue is about not able to connect after being in a sponge plugin created world. This has nothing to do with ip forwarding.

m31317015 commented 7 years ago

@Sir-Will I guess I am having another problem then, but since it's solved its a matter of hit or not, welp I missed.

And if you believe this is a waterfall bug, maybe we should go over there and discuss more.

dualspiral commented 7 years ago

I had a quick look yesterday. I could reproduce this - I managed only under IP forward conditions, but as it was cursory, I didn't really do rigorous testing:

I put some debugging statements into SF 5.2 and just traced authentication to ensure that the Forge server treated the client as a Forge client, and whether the block of code sending the dimension registration from the server via the FORGE message channel were fired (required for forge clients) - which they were. That's no guarantee that this got to the client though - it might (probably?) be is that Bungee et. al. doesn't forward the FORGE messages until login and respawn is complete - I don't recall, it was a while ago since I last looked.

I will try to do more rigorous testing tonight to confirm it's not on our end, but, to be honest, I'm convinced that Sponge is sending the required messages. I guess that they just aren't being received at the right time.

dualspiral commented 7 years ago

This is a Bungee bug - one caused by me really, it wasn't sending some packets through, including the Dimension Register one. I'll PR a fix to Waterfall.

Sir-Will commented 7 years ago

@dualspiral thanks a lot!

ryantheleach commented 7 years ago

"I tried several plugins from either side, bungee or sponge, none of them worked. Only way is to turn off ip_forward and forward the port yourself in the router."

That's not what ip_forward does FYI. ip_forward makes Bungee encode additional details about the player into the packets, so that the servers can see the true connecting IP. I'm not 100% sure which platforms support it.

dualspiral commented 7 years ago

No, I think something was lost in translation here. I think what is meant is that you have to log into the server directly, and to do that, you need to turn IP forwarding off.

What I found was that you could log into the server directly first, which would give you the dimension registration (only possible with IP forwarding off), log off the server using the “quit” option, then you could log into the bungee network without closing the client - it didn’t clear Forge’s registration. Moot point now, of course, but certainly interesting to note!