soler91 / noita-together

Play alone together
237 stars 29 forks source link

Javascript error when creating room [0.9.27] #35

Closed zeroZshadow closed 3 years ago

zeroZshadow commented 3 years ago

image

This error appears when clicking +Create, filling in the room name and password, and then clicking Create.

During the start of the application, it asked for administration permission twice, and both times have been approved.

zeroZshadow commented 3 years ago

Is this possibly due to listening on such a low port number?

soler91 commented 3 years ago

either the port 1234 is already in use by another app on your computer or there's something else preventing the app from listening on it that port is used to communicate with the game

zeroZshadow commented 3 years ago

I've checked the ports in uses, and 1234 itself is not in use. There is also no software running on my machine, including windows firewall, that would block binding to this port. Is there a way I can try with a different port number?

soler91 commented 3 years ago

port should be in use by another app, as far as i know that error only happens for 2 reasons

  1. not enough permissions, but app runs as admin so that's out of the question
  2. another app is already running use that port

i would say try restarting your computer and check again as of now there's no way to change which port the app listens for the game

zeroZshadow commented 3 years ago

A restart sadly didnt resolve it. I've grabbed a checkout of the project and changed the port, then build it into the electron app. Having changed the port to 20443 worked great, and the error went away.

soler91 commented 3 years ago

guess i'll change the port later today

zeroZshadow commented 3 years ago

I highly recommend something above the 20000 range to avoid permission issues and conflicts. I would also recommend not binding to 0.0.0.0, but 127.0.0.1, to avoid having to check if the incomming connection is local or not

soler91 commented 3 years ago

done, kinda forgot to bind to localhost, will do next time 👍