GeyserMC / Floodgate-Modded

Port of the hybrid mode plugin called Floodgate for Fabric and NeoForge to allow for connections from Geyser to join online mode servers.
MIT License
52 stars 18 forks source link

bedrock players when floodgate is set to "send-data" are disconnected with `velocity.error.modern-forwarding-failed` #83

Open gadget78 opened 1 year ago

gadget78 commented 1 year ago

Having a issue with bedrock/linked players connecting to fabric servers on our Velocity network..

WHATS HAPPENING when trying to connect, player connects then gets disconnected from the fabric server;

WHEN IT HAPPENS

SETUP ; -VELOCITY PROXY velocity-3.2.0-SNAPSHOT-229.jar floodgate 2.2.0-SNAPSHOT (b74-4f36112) geyser 2.1.0-SNAPSHOT (git-master-e7b8b4e) tried with and without ViaVersion 4.5.1 plugin

player forwarding is set to modern floodgate has send-floodgate-data: true

-FABRIC SERVER also current, and on 1.19.3 with mods; fabric-api-0.74.0+1.19.3.jar FabricProxy-Lite-2.4.0.jar
and floodgate-fabric-1.19.3-18thfeb.jar (floodgate 2.2.0-SNAPSHOT)

and it DOES have the same key.pem file as proxy and has same 24 character text, that is in "forwarding.secret" file on proxy, thats in the file FabricProxy-Lite.toml under secret = ""

-PAPER SERVER on 1.19.2 many mods etc etc but connect fine to this after failing above

onebeastchris commented 1 year ago

setting "hackEarlySend" to false in FabricProxyLite's config fixes the issue

onebeastchris commented 1 year ago

However, that will stop luckperms from properly working. As for the issue itself, no clue what causes it - however, i've compiled logs of the issue (with and without send-floodgate-data, from both fabric & velocity) and a fully setup .zip with a velocity proxy and 1.19.3 fabric server that is necessary to replicate the issue.

I'm honestly stumped about why send-floodgate-data and hackEarlySend set to true worked before, and stopped now though.

https://1drv.ms/u/s!ApW4KLFOl-B6gfxECify5qijKrn6AQ?e=B4SEVo <- onedrive link to my test setup & logs

gadget78 commented 1 year ago

great find, i dont know why i never even trialled the hackEarlySend = false setting !!

just tested it on my server, and can confirm your findings.. :) plus this works on 1.19.2, and 1.19.3 servers that i tried it on too!

onebeastchris commented 1 year ago

@gadget78 if you're on 1.19.4, mind testing if this works? In my tests, this works with java and bedrock, with luckperms and floodgate on all servers. FabricProxyLite.zip

gadget78 commented 1 year ago

is this the public version 2.5 thats on Modrinth ? but yes, this does work :) with newest velocity, with newest floodgate/geyser and send data enabled, this, floodgate-fabric and luckperms on server and with send-floodgate-data: true, i CAN now connect ...

althou i am having an issue with bedrock players connecting if there's a mod that uses polymer. (java players are fine) they connect, but at 0 0 0 and fall, with no world loading.. if i connect direct its fine, or if i remove all mods i can connect via velocity/proxy

onebeastchris commented 1 year ago

The issue with polymer would be a separate one unrelated to this. As for this hacky workaround - i wouldn't recommend using it

gadget78 commented 1 year ago

i have tried MANY things now to try get to bottom of polymer issue, maybe its best to close this and open a new one ?

but just a couple of questions.. -is your posted one same as the public version 2.5 thats on Modrinth ? -and what method could i use to try to find fault find polymmer ? as there not even any sign the user joins in logs.

onebeastchris commented 1 year ago

Since this issue is not yet fixed, don't close it. No, the mod i sent is not version 2.5 of FabricProxyLite on modrinth, it is a debug build to test a theory. As for the polymer issue, i do not know. Sorry.

luneth commented 1 year ago

Hi, Having the problem as gadget78, Exact same configuration, and this issue also prevents me of using luckperms. Is the 2.5.0 debug version you shared recommended for production? If so would you be able to share with us a 2.6.0 patched version? I would've built it from master but it doesn't seem to be a commit merged related to this issue. Regards,

onebeastchris commented 1 year ago

I've used it in production fine, but not sure what side-effects it might have, worked fine for me though. The issue doesn't lie within FabricProxyLite, but - i assume - rather within Floodgate-Velocity not listening to the player info packet send in the hack mixin here, but only to the one sent here. The hacky fix i did here was to just.. always register the second packet and not rely on the mixin sending it; but that does send the packet twice.

onebeastchris commented 1 year ago

As for providing a patched version - i personally wont do that, but you can do the same unsafe patch by removing this if statement and always register the sending of the player info packet on ServerLoginConnectionEvents.QUERY_START.

luneth commented 1 year ago

Thanks, You mentioned earlier in this issue that you wouldn't recommend using this hacky workaround as a fix in Floodgate-velocity was being worked on, do you have a link? I haven't been able to find it browsing the repo.

onebeastchris commented 1 year ago

There's no debug/testing version available for Floodgate-Velocity, so your best bet will be this hacky workaround :/

luneth commented 1 month ago

I can believe this has already been a year. Wesley-Youg's mentioning reminded me of this issue. Any progress or lead? I'd still like very much being able to use Fabric with Geyser/Floodgate + luckperms.

ArkoSammy12 commented 4 weeks ago

I am having the same issue here 👍🏻