Closed flexhd41 closed 6 months ago
Not quite sure what's going on with your portal here, but as a sanity check does your server say the turtle has connected? It should look something like this when a turtle connects to the backend server:
[1] info 28-11-2023 06:29:39 Starting server...
[1] info 28-11-2023 06:29:39 Listening on port 6868
[1] info 28-11-2023 06:33:31 Incoming connection...
[1] info 28-11-2023 06:33:31 Initiating handshake...
[1] info 28-11-2023 06:33:32 Incoming connection...
[1] info 28-11-2023 06:33:32 Initiating handshake...
[1] info 28-11-2023 06:33:32 Sol [0] has connected!
[1] info 28-11-2023 06:33:33 Freia [18] has connected!
And then my portal let's me know they're connected:
If I change the server port without updating the portal it currently looks like the following:
If you know how to you could open your browser's developer tools and check the network tab for WebSocket connections and then make sure it manages to establish a proper connection to your server.
the server dosnt mention anything for the network tab one gets the ip with 25569 that call is just called ws and another one with 25568 is called the domain name i use
also i saw this in the console
Oh-yeah, the issue is probably that there's a second WebSocket servers running from server/src/entities/turtle.ts
that's supposed to handle the communication with the turtles.
I'm honestly not too sure why I've set it up like this, probably just because it was easier to separate the portal and the turtles then.
I've made some changes to make the second WebSocket server more obvious as well as added an environment variable TURTLE_WSS_PORT
that allows you to configure the port for it.
Alright thank you for the help Really like this project it works now
The turtle itself says its connected but it dosnt show up could be because i changed the port of the backend but also changed the port in the app.tsx file