WebSocket not working?


#1

Hi there, m project just recently ported to glitch will not seem to work i have tested it locally and it works perfectly with unity 2018, however now i’ve put it on glitch, i cant get unity to connect to it have i put the correct URL ?
just replaced 127.0.0.1 with my project URL

ws://questcraft3d.glitch.me:3000/socket.io/?EIO=4&transport=websocket


#2

Hi @jackthehack21, welcome to the Glitch Forums!

Are you seeing any error messages in your Glitch project’s logs (shown by clicking on the Logs button under your project’s name) or in your websocket client’s logs? We have numerous websocket-based projects running on Glitch, although I don’t know of anything using Unity off-hand.

It’s possible that you need to use wss:// instead of ws://, although I’d expect to see some error messages if that was the problem.


#3

No errors in glitch, it’s just the problem of getting to the glitch project via WS URL, does work locally but not when hosted

[edit]
It’s either not hosting at all or I haven’t got the right URL for it, if someone could help with that I would Ben grateful.


#4

Update: Its now working, just changed the URL in unity to not include the port.