-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to join any multiplayer lobby on Android #14312
Comments
Looks to be an issue with JSON deserialisation on the Android builds, happening while invoking the multiplayer hub's
|
Your log shows your build as |
Thanks. Are any other android users able to confirm this? |
Could reproduce on my device aswell in the latest version. (can't provide logs because Android 11 doesn't let me access the osu!lazer folder) |
Tested on 2021.815.0-lazer and it indeed does not let me join any rooms. runtime.log |
i'm pretty sure we've got enough confirmations, what we need now is a root cause. i'll look at it later if i'm not pre-empted. |
The likely cause is that we forced json serialisation with the recent team vs changes (see |
I've poked this from a few angles but got nothing concrete yet. It doesn't help that you don't get very nice stacks on xamarin/android in not-own code, as is tradition on xamarin. The next thing I am looking to try is setting options.PayloadSerializerSettings.TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Full; but I would obviously have to set that on the spectator server end too, which means that I'd have to set up local instances of spectator server and web that are reachable over my local network so that the android app can hit them, which is a not-insignificant amount of work and could take a while. Edit: As mentioned on discord @peppy has enabled the above flag for me for a second on the dev server, but it doesn't seem to help:
|
After some more digging in issue threads over at the newtonsoft repository I found this hint of adding a custom serialisation binder that resolves types supposedly coming from
I was able to complete a multiplayer game. I haven't thought much about how to package that "workaround", though (if at all) - it would probably be nice to have it live in the mobile projects because I imagine that binder can't be set universally. |
I was preparing to PR the above workaround but unfortunately there is a complication - I have found yet another instance where this same exception happens for another type, namely This is likely caused by the spectator server leaking implementation-specific collection types over the wire in the I'm wondering whether specifying |
As it stands probably the only options left to preserve multiplayer working on android are:
I'm not sure which one is the worse option at this point. |
I think solution (2) would be the least worse, not requiring to write more custom serialisation code on new structures, or become very careful with return types going forward. |
I think (3) is the easiest / lowest overhead implementation. Will look at that today. |
Oh, slight correction: (3) will still need the workaround serialisation binder to swap out |
Option 4 of course is to get messagepack working again and stick with that. I think this can also be done with a custom binder, and may be our best option? At least it has consistent(*probably) behaviour across platforms, and is broken in the same way on desktop as mobile currently. |
Yeah, if it can be somehow nudged into respecting |
Describe the bug:
Attempting to join any multiplayer lobby on Android throws an error. On the host's side, they will momentarily see the player joining but then suddenly leaves the lobby.
osu!lazer version:
2021.815.0-lazer
Logs:
network.log
runtime.log
The text was updated successfully, but these errors were encountered: