Closed guilhermebkel closed 3 years ago
Hey, i would be glad to help you in this issue.
Now about the feedback an idea would be to use this component: Snackbar.
About the auto reconnection i think that by adding autoConnect: true
would be a solution but i have to investigate more...
Then if you want to assign me this issue π€
Hello @ArcaneDiver!
I think the Snackbar is a good idea for giving feedback about the disconnection.
And about the autoConnect: true
: I feel like I've tried something like that before but for some reason it did not work π€
I'll assign you this issue, thanks! π
Hey i implemented the feedback on disconnection, but i'm having some problem with the reproducing the disconnection on mobile devices. Because i tried on my mobile phone and it perfectly works.
@ArcaneDiver Got it! Being honest I did not find a pattern on this bug but I know that is the same thing as losing access to the internet after being connected to the socket on some room. So, to recreate it, you could do the following:
That way I think you'll be able to test it π
Since I have two friends who came across this bug, after deploying this to production I can ask them for some testing. Besides, in case you want a log of this disconnection on production I can add some console.logs on the production apps to give a look closer βπ»
Heyπ, i have finally resolved this issue, now i'll refractor a bit my code, remove tons of console.log, ecc. and I tomorrow i'll make the PR. Just a bit summary of how i resolved the issue.
There was 2 main problems.
SetPlayerData
event was not fired and then the server was not able to recognize the player. pingTimeout
was too high and the server recognized when a player disconnected only when the player manually reconnected.Hello @ArcaneDiver!
At first, thanks for caring about the code you write by doing a refactor on it π
Now, about the problems:
Thanks for helping to improve this game π
When players get into the Table/Room Page on mobile devices and minimizes the Browser, for some reason it causes a disconnection instantly on some devices.
So, being minded about that, we have two possible problems: