PrintedScript / turtle-control

7 stars 3 forks source link

Turtle going to Sleeping after reboot, Turtle Control Panel states "No turtles are connected", localhost:5757 says "Upgrade Required" #12

Open Jackaroo05 opened 1 year ago

Jackaroo05 commented 1 year ago

Hello, when I go to reboot the turtle after pastebin get startup, the turtle gets stuck on "Sleeping for 5 seconds before attempting reconnection" instead of the expected "Turtle Control OS, originally created by Ottomated. Modified by PrintedScript". Going to the Turtle Control Panel shows "No turtles are connected". When trying to access where the websocketServer is connecting to, in this case "localhost:5757", the website states "Upgrade Required". Linked is the video of the steps I took. Any help is appreciated. Thanks! https://youtu.be/-4EpiuixXvE

End3r27 commented 1 year ago

i got the same issue

hecker2000 commented 1 year ago

I believe the issues are ngrok's fault. Did you try any other port forwarding

edit: I've now tried my own hosting directly and I'm getting the same issue, I guess we wait for a patch?

Jackaroo05 commented 1 year ago

For which side? Frontend or backend?

On Mon, Jun 12, 2023 at 12:34 AM hecker2000 @.***> wrote:

I belive the issues are ngrok's fault. Did you try any other port forwarding

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hecker2000 commented 1 year ago

the backend, now the frontend works fine. but as you said before, 127.0.0.1:5757 and (I did test this) 127.0.0.1:5758 just give a "upgrade required". I don't really know why, but I'm still looking into the issue

edit: I'm going to try and change the version of nodejs I'm using and hopefully that works

edit: It did not work

hecker2000 commented 1 year ago

the issue seems to persist from both windows 10 and 11. I guess I'm going to try it on Kali-Linux?

Jackaroo05 commented 1 year ago

the issue seems to persist from both windows 10 and 11. I guess I'm going to try it on Kali-Linux?

Did it work?

hecker2000 commented 1 year ago

the issue seems to persist from both windows 10 and 11. I guess I'm going to try it on Kali-Linux?

Did it work?

my wsl failed to function at all, and my main Linux machine doesn't have any kind of networking at all

PrintedScript commented 1 year ago

I think this has something to do with ComputerCraft not allowing connections to localhost, to fix this you would have to modify your computercraft config file to allow localhost connections.

https://github.com/cc-tweaked/CC-Tweaked/discussions/626

Edit: Also the "upgrade required" is expected as port 5757 and 5758 are websockets, you can learn more about websockets here https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism

hecker2000 commented 1 year ago

I think this has something to do with ComputerCraft not allowing connections to localhost, to fix this you would have to modify your computercraft config file to allow localhost connections.

cc-tweaked/CC-Tweaked#626

Edit: Also the "upgrade required" is expected as port 5757 and 5758 are websockets, you can learn more about websockets here https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism

oh, its a websocket, alr guess more testing is gonna happen i dont really know much about websockets, the extent of my knowledge is funny pings go back and forth

hecker2000 commented 1 year ago

okay so I can confirm that PrintedScript solved all my issues with the "upgrade required" and localhost, the only thing that isn't fixed is ngrok asking a turtle to proceed to the WebSocket.

edit: now I can mess with funni tutle