Taureon / aps-plus-plus

Hosting your own Arras Community Server, made very easy to get and edit!
GNU General Public License v3.0
33 stars 72 forks source link

Disconnected: Socket error #245

Closed xenon154 closed 6 months ago

xenon154 commented 6 months ago

I have an instance running on my Raspberry Pi with the latest version of Node.js and NPM. When I go to http://localhost:23601, it gets stuck on "Connecting..." and when I click play, it displays the error: "Disconnected: Socket error". I installed the ws package with npm install ws so I do not think that's the issue.

Taureon commented 6 months ago

unless you are checking out the game directly on your raspberry pi, you would have to change localhost to your pi's local network IP (are usually 192.X.X.X, which are private IPs) and then use that to connect to the aps++ instance. let me know how that works

xenon154 commented 6 months ago

I know, I was accessing it from a Cloudflare tunnel. I also tried accessing it from its IP on my network, same issue.

Taureon commented 6 months ago

if you put localhost in your browser, it expects a webserver to be on the same machine that is visiting localhost btw, what are the errors in devtools console?

ChandlerAx commented 6 months ago

localhost:23601, it

Set host url in server/config.js to localhost:26301

Taureon commented 6 months ago

localhost:23601, it

Set host url in server/config.js to localhost:26301

that only works if the server is running on the same machine as the computer that synt4ctic is trying to connect to it with

xenon154 commented 6 months ago

if you put localhost in your browser, it expects a webserver to be on the same machine that is visiting localhost btw, what are the errors in devtools console?

I understand what localhost means, I was accessing it from its private IP.

xenon154 commented 6 months ago

There was a websocket error: socketInit.js:754 WebSocket connection to 'wss://localhost:26301/' failed:

Taureon commented 6 months ago

when you try to join the server, does the server's console log anything?

xenon154 commented 6 months ago

Not any errors on the server's console itself, but there was the websocket error in the developer console

Taureon commented 6 months ago

There was a websocket error: socketInit.js:754 WebSocket connection to 'wss://localhost:26301/' failed:

what is the host variable in the config file?

xenon154 commented 6 months ago

localhost:23601

Taureon commented 6 months ago

change that to the domain that you've been putting in the url bar the entire time and then restart the server

xenon154 commented 6 months ago

Thank you, that worked