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

Is there a good way to debug the websocket? #1061

Closed
on3iro opened this issue Feb 23, 2022 · 1 comment
Closed

Is there a good way to debug the websocket? #1061

on3iro opened this issue Feb 23, 2022 · 1 comment

Comments

@on3iro
Copy link
Contributor

on3iro commented Feb 23, 2022

Hi, I am currently trying to run boardgame.io behind a reverse proxy (caddy v2).
I can proxy requests to the Lobby-API without issues. However the socket always disconnects (the socket handshake seems to work fine however after upgrading from polling to websocket, the socket is closed).

Do you have any idea how I could debug this and find out why the socket closes?

Thanks in advance!

Btw. I really like boardgame.io and I am almost done with building Radlands with it and it worked like charm! Thanks for your work!

@on3iro
Copy link
Contributor Author

on3iro commented Feb 24, 2022

I figured it out 🎉

You can prefix your backend server npm script with Debug=* node ... and will then get lots of logging output.
I also found out what the issue was that way:
I specified my Socket.io in my <GameClient />-component the wrong way and had a trailing path which led to an invalid namespace on the socket.

@on3iro on3iro closed this as completed Feb 24, 2022
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

1 participant