Compiled game don't reach server

Hello, the compiled version of the game don’t trigger the glitch server while launching it from editor it does (also if imperfectly) why is that?

Hmm, that’s not easy to debug, are you getting any errors? Have you tried to add some console logs to see where it fails?

Also, if you don’t concatenate (compress) the scripts code when building the Playcanvas app, do you still get the same issue?

Didn’t tried to not concatenate…was actually double checking from editor.

Is glitch down/is the server still spinning up?

Just restarted the server…it doesn’t get triggered anymore neither from editor :frowning: will have to check all again

1 Like

Are you launching on HTTPS?

yes

Any errors in console?

:open_mouth: tons!!! where they come from???

Name not resolved…means??

Can you show some of the errors please?

Sure
net error

Now seems to work the server, but i got this 2 errors
net err2

The first one is not an error, its a warning for missing a source map file. You can ignore it, or add .map of the socket.io.

As for the error, you have a problem with a handshake. You need to check the server logs for closing reason.

1 Like

the closing reason i can guess is because of inactivity or change browser tab for too long so the server don’t feel the client and shut down the connection, also if the tab is awaken again the server don’t resume the client (of course coz it don’t go through the initialization process) is there a way to keep the vacant handshake for a longer time?

Yes, you can adjust the connection timeout setting on the server side. You may Google on that one. However, keep in mind, that you should be careful with increasing its value, as the connection will be kept alive, even if the client actually no longer there.

1 Like

Thanks @LeXXik yes i was already aware of that issue, i just want to make it a bit longer coz of testing purposes, i think when everything will work i will enable some sort of autosave before disconnection.

awwww… again… on chrome it works or so seems
chrome net
in firefox

Is this related to the original post? If not, you’d want to make a new thread, probably.
As for the error in Chrome vs Firefox. I don’t think it is the browser issue. Check your this.player property on when you start using it and add guards, to make sure it is used only after it has a proper value. Most probably you have some race condition somewhere.

Yes i do have a race condition, but the problem is the lag when firefox load the game, it loose connection before start the game, that’s due probably coz 3 web pages fill the memory too much so firefox…that’s already slower stall. Anyway yes, seems there is a bug somewhere about the race attribute i have to dig into that as well. Thanks @LeXXik