Skip to content
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

Resolve initialization problems for some players #203

Merged
merged 5 commits into from
Oct 10, 2020

Conversation

snooooooow
Copy link

Related issues

#202
#195
#191
#189
#182
#158

Bug explanation

  • I found an initialization problem. Indeed some players could not have a connection with the websocket server.
    This error is due to the hardware configuration of users. Small processors take longer to load resources and therefore NUI is loaded after TokoVOIP initialization. The script.js file is not loaded and the connection to the websocket server is not initiated.

  • The getmyip and upgrade routes of the websocket server were poorly defined

Fixes

  • Add an "nuiLoaded" nui callback in client main, trigerred by script.js on initialisation.
  • Loop on voip:initialisation to load script.js file when nui is loaded and trigger nuiLoaded event
  • Add '/' before routes names for getmyip and upgrade, to prevent a fail during ip update and upgrade route call

Tests

I tested this version during an evening with around 50-60 players, all players who couldn't log in, can now use the plugin without problems

@snooooooow snooooooow marked this pull request as ready for review September 29, 2020 22:10
@Itokoyamato
Copy link
Owner

Impressive debugging work ! It makes complete sense. All those small issues related to client configurations are just things I haven't been able to put time into. Thanks a lot for figuring them out.
The least expected one for me would be the route definitions, that a different client configuration would end up sending calls that don't match with them. Weird but good to know.

It should help with a lot of the remaining connection issues. (related to configurations at least)

I'll look to merge this and release in the coming days.

Thanks for the contribution !

@snooooooow
Copy link
Author

Thanks. :)

It was weird because we had this bug on our production server but not on our development server. Maybe because of the lot of nui interfaces loaded at client connection I think. We noticed any debug print in client side wasn't print in fivem console, that's how we solved it. Glad to help the project :)

@johnnypernik
Copy link

johnnypernik commented Sep 30, 2020

After quick test for few players, they are being moved randomly between in-game and lobby rooms and their Teamspeak clients are crashing, but maybe i missed something during update, i updated ws_server and fivem script, im gonna look into it later, i literally didnt touch a code (just configs and little volume change)

@snooooooow
Copy link
Author

I think it's another issue with TokoVoip because this update only affect client initialisation. Can you post an issue with yours config files ?

@Itokoyamato Itokoyamato merged commit bed182e into Itokoyamato:master Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants