[Scrapped/Solved] (Change Topic: Im having socketio issues) Socket.io client not connecting to my socketio server

Project name: mineweb1
It gives "XHR failed loading GET "

i tried a lot of things, looked at forums but i can’t fix it…

Doesnt work:
var socket = io();
var socket = io("ws://mineweb1.glitch.me/socket.io/?EIO=4&transport=websocket");
var socket = io("wss://mineweb1.glitch.me/socket.io/?EIO=4&transport=websocket");

var socket = io("wss://mineweb1.glitch.me/socket.io/?EIO=4&transport=websocket");

Maybe try this? You may have been using the wrong protocol.

same issue, didnt work @RiversideRocks

I’m just using: (without wss or http)
var socket = io("mineweb1.glitch.me/socket.io/?EIO=4&transport=websocket");
Since socket.io usually handles that for you. If you want to change the transport mode you can enter that as options :slight_smile:


I think it worked.

but there are many other problems now…
Oh well, i think i will make a new thread for those.

1 Like

Okay, cool! :slight_smile:
I’ve worked a bunch with socketio and I’m online tonight, so just ping me here and we could go over it if you request my help :slight_smile:

1 Like

@sawariz0r And once again im asking for help :sweat_smile:

It seems that my client is not recieving the “log” event. The code is there? I made a “ping” event for testing but that event works…

Hmm, do you have any snippet of code you could share with me or show me? :slight_smile:


socket.on("log", (data) => {
  if (data.type=="msg"){
    console.log(data.author + "> " + data.msg);

serverside code is a little big so i think you should go to the project and see the code for yourself… (project name=mineweb1)

Oh. If I remember correctly it’s not ACTUALLY a websocket client - even though it runs on Websockets when available. So it looks like you’re forcing it to run on the websocket protocol, so I’m thinking if maybe that’s the problem… Try it without the “transport=websocket” maybe :slight_smile:

i dont think it worked… lol

b u m p
im still having the issue and i need help i need @ someone

May I please see your server side code. Are you using any middleware for socketio?

Sorry but we changed our entire project, we are no longer using server-side code or socket.io
Thanks for the help tho