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

Cant receive any response from server in Build version #13

Open
theonardo23 opened this issue Jun 24, 2021 · 5 comments
Open

Cant receive any response from server in Build version #13

theonardo23 opened this issue Jun 24, 2021 · 5 comments

Comments

@theonardo23
Copy link

Everything is working great on the Build version except the OnMessage trigger.

It shows the log when connection is established, and my server can read the message sent from it. Only when I responded from my server side by sending or by broadcasting message, it triggered OnMessage the client that was running on my Unity Game Player but it never triggered the OnMessage on my build.

I'm using the build and run option on unity, so the build is running on localhost & as for the backend it's running on a remote server

@vietanhdev
Copy link

The same for me. OnMessage was never triggered.

@chucnorrisful
Copy link

Same problem here, the websocket connection establishes successfully, and Chrome dev tools show incoming websocket messages, but OnMessage is never triggered (tested in Chrome, Firefox).
This Problem only arises on a WebGL Build, UnityEditor and Windows Build working fine.

@Juna-Idler
Copy link

#14 ?

@arthur100500
Copy link

Try fixing it by replacing
Module['dynCall_viii']( webSocketState.onMessage, [instanceId, buffer, dataBuffer.length]);
to
Module['dynCall_viii']( webSocketState.onMessage, instanceId, buffer, dataBuffer.length);
in WebSocket.jslib in ~168 and 182 lines

@BurakSeslikaya
Copy link

Try fixing it by replacing Module['dynCall_viii']( webSocketState.onMessage, [instanceId, buffer, dataBuffer.length]); to Module['dynCall_viii']( webSocketState.onMessage, instanceId, buffer, dataBuffer.length); in WebSocket.jslib in ~168 and 182 lines

this worked for me.

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

No branches or pull requests

6 participants