heroiclabs / nakama-js

JavaScript client for Nakama server written in TypeScript.
https://heroiclabs.com/docs/nakama/client-libraries/javascript/
Apache License 2.0
194 stars 56 forks source link

Socket connection disconnects immediately on mobile #187

Closed nudejsio closed 6 months ago

nudejsio commented 6 months ago

Hi guys!

Ekran Resmi 2024-03-11 12 19 31

I got the above error from the browserstack emulator, so actually the network socket data on an iPhone device is like this.

Error message: The operation couldn’t be completed. Software caused connection abort

If I put the application in the background on mobile and open the application again after 10-15-20 seconds, the direct socket connection is disconnected and it gives the above error.

My configuration settings are like this, but it does not see these values.

socket.ping_period_ms = 60000 socket.pong_wait_ms = 75000 setHeartbeatTimeoutMs(60000)

mofirouz commented 6 months ago

This isn't a nakama-js issue; you should ask this question on the forum:

https://forum.heroiclabs.com

Additionally, this looks like your server crashed(?) or was misconfigured - which we cannot advise on custom deployments. If you are running on Heroic Cloud, please send an email to support@heroiclabs.com.