GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.71k stars 675 forks source link

Bedrock Crash Paper-Velocity #3918

Open UnperishedFoods opened 1 year ago

UnperishedFoods commented 1 year ago

Describe the bug

When a bedrock player attempts to join an internal Paper server within Velocity, they experience a stutter for about a second and the game crashed. There is nothing in the proxy console (the server Geyser/floodgate is running on) except has disconnected because of bedrock player timed out.

To Reproduce

  1. Create a Velocity server network with Geyser and Floodgate installed on it.
  2. Add two paper servers, one as the internal and the other as the lobby.
  3. Attempt to join via bedrock edition.
  4. Experience the crash.

Expected behaviour

I expected bedrock players to be able to join the server smoothly and without crashes.

Screenshots / Videos

No response

Server Version and Plugins

Geyser Dump

https://dump.geysermc.org/I7nY4Sha9KsRBTQ2HxTlRZnic8XBZDtW

Geyser Version

Geyser version 2.1.1-SNAPSHOT (git-master-50d7f56)

Minecraft: Bedrock Edition Device/Version

1.20.1, All

Additional Context

No response

Konicai commented 1 year ago

curious - does use-direct-connection: false change anything?

UnperishedFoods commented 1 year ago

Nope, still broken.

UnperishedFoods commented 1 year ago

What might be the issue?

Konicai commented 1 year ago

Haven't tested anything yet. I'll eventually try to reproduce this myself, but I guess logs with geyser's debug mode enabled might be useful.

UnperishedFoods commented 1 year ago

I’ve mostly given up on trying it with the proxy, I instead just started the paper server and made people directly connect to it instead of through the proxy and it works. If you come up with a fix, let me know!

gamer50082 commented 1 year ago

Cannot replicate with velocity + Purpur maybe try Purpur

UnperishedFoods commented 1 year ago

I’ve found that it could be a crash with the tablist, I’ve noticed similar bedrock crashes with scoreboards.

Recliness commented 1 year ago

Having the same issue here. Players with older devices are crashing when attempting to join the server on Velocity/Purpur 1.20.1

UnperishedFoods commented 1 year ago

Does your network, by chance, utilize a scoreboard or custom tablist? I feel as though the issue came from one or the other.

Folas1337 commented 11 months ago

FYI, I'm using both a custom tab list as well as a scoreboard. Over the next few days I'll try what fixes this.

The user who kept crashing is not experiencing the problem on a lobby that's basically running no plugins. I'll document my findings here, maybe this leads to more. I just don't have too much time to spare atm but will have more over the next few days.

Maybe this information alone already helps some people :D It certainly was a good hint!

Folas1337 commented 11 months ago

This is different from what I expected... I have 3 different worlds in my server called lobby1. I use a plugin called RandomSpawn to spawn people in one of those 3 worlds when they join, just to make it more interesting as all 3 worlds have a different looking spawn.

Java and BE normally have no issue but Pocket Edition seems different, maybe just for certain hardware but I have one player that can very consistently reproduce the crash.

What appears to be happening is that if they rejoin and are sent to a different world than what they left in, it'll crash their clients. Once again, this might not be a PE issue alone but maybe also due to certain hardware (I only had iOS users report it) but it is a thing that I can confirm!

This is the RandomSpawn plugin in question: https://github.com/reflexLabs/RandomSpawn

To reproduce, I suggest setting up velocity with Geyser and Floodgate, a paper server with a few worlds and RandomSpawn installed. Now set up spawn in those different worlds and rejoin with PE, it might crash for you as well.

To make sure it couldn't be any other factor, I ran the same setup with RandomSpawn enabled and the 3 different spawns and they crashed and then did nothing but remove 2 of those 3 spawns and they have not crashed for 6 attempts straight.