Getting URL is not defined when connecting to Room
-
Been banging my head against this, trying to connect to a room.
When I try connecting to a Room, I get a console log in the web browser that url is not defined. However I know the server is seeing it, as onInit() in the server is called for that room.
Client Repo:
https://github.com/KG204/ff_client
Colyseus connection code is in src/application.jsServer Repo:
https://github.com/KG204/ffScreenshot of browser:
https://imgur.com/a/9yw9haC
-
A sample project or code snippet would go a long way to helping figure out what's going on.
-
Client Repo:
https://github.com/KG204/ff_client
Colyseus connection code is in src/application.jsServer Repo:
https://github.com/KG204/ffScreenshot of browser:
https://imgur.com/a/9yw9haC
-
hey @KG204, welcome!
this is an error from your room handler, apparently the error is here: https://github.com/KG204/ff/blob/master/src/questionretriever.js#L13
url
is not defined on this scope, you should usethis.url
I thinkcheers!
-
Thank you! Apologies if I thought it was colyseus related.
Its probably that but I wont be able to test for a while (computer crashed and fails to start, less than a year old, still under warranty)
And that's why unit tests should always be used. Could have caught the error. I come from a compiled background so still getting used to debugging JS