Hi ! I created a multiplayer chess game with the unity lobby/relay that I published in itch.io but there are some errors. The second player can connect his game to the lobby created by the first player but normally he should get a relay got thanks to the lobby and rejoin the game like that. However it didn't work, the host don't get the log which says that the client is connected and the client requested the relay code only one time. I get this error after 1-2 minutes :
WebSocketInvalidStateException: WebSocket is not connected.
at Unity.Services.Wire.Internal.WebSocket.Send (System.Byte[] data) [0x00000] in <00000000000000000000000000000000>:0
--- End of stack trace from previous location where exception was ---
Does someone got this error
(I'm sorry because my English is not very good but I try to do my best)
#Unity relay error
1 messages · Page 1 of 1 (latest)
Make sure you are starting the relay with the web socket connection type
https://docs.unity.com/ugs/en-us/manual/relay/manual/relay-and-ngo#note-about-unity-web-platform-support
Thanks for your answer ! I already did that and now I have another error on my build. In the unity editor there isn't errors but in my build I get these two errors :
:63730/StreamingAssets/UnityServicesProjectConfiguration.json:1
Failed to load resource: net::ERR_CONNECTION_REFUSED
[ServicesCore]: An error occured while trying to get the project configuration for services.
Couldn't fetch config file.
URL: http://localhost:63730/StreamingAssets/UnityServicesProjectConfiguration.json
Reason: Unknown Error
I'm pretty sure you can and should delete that file. That config file has token information for the Unity Services that should only be used in development
Ok I will try thanks !
It doesn't work without the file I got the same error.
I asked ChatGPT and it was saying that we can not use Unity Relay with WebGl... Is it true ?
Chatgpt doesn't know jack about shit. The docs I linked above shows how to use Relay with WebGL.
Does it work outside of itch.io? When you build to webgl locally
No I get the same errors