WebSocket connection error.

Game development with Board Game Arena Studio
Post Reply
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

WebSocket connection error.

Post by ric1950 »

I am getting this error when trying to play with spectator view - everything is fine when playing the game with the players:

centrifuge.js:1 WebSocket connection to 'wss://ws.studio.boardgamearena.net/connection/websocket' failed: WebSocket is closed before the connection is established.

Can anyone help, please.
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

Re: WebSocket connection error.

Post by ric1950 »

I should have added for further information that the page loads in normally with spectator view. Without the WebSocket connection there are no notifications received so the page isn't updating as the game progresses.
User avatar
ric1950
Posts: 24
Joined: 22 January 2025, 09:06

Re: WebSocket connection error.

Post by ric1950 »

I found the issue in my code. I had used a hack to get the screen displaying properly for the spectator by allocating a player id to the spectator. Once I removed that and dealt with the screen display differently it was able to connect to the WebSocket.
I don't know why but lesser things have confused me.
Thanks to everyone who looked at my post.
Post Reply

Return to “Developers”