Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
27 views

Issues with Emitting Events to Socket.IO Server on Different URLs and JSON Data Conversion

I am working on a Node.js backend project using Socket.IO and am facing two issues when trying to interact with the Socket.IO endpoints via Postman: 1. Connection and Event Emission Issue on Different ...
azam45's user avatar
  • 352
0 votes
0 answers
18 views

Socket IO Node JS server-side functions running multiple times on client emit

First off, I have browsed StackOverflow and read multiple threads about this, but couldn't find the answer. The problem: Sometimes, when a user clicks a button and thereby emits a message to the ...
o11899nine's user avatar
0 votes
0 answers
28 views

Converting CJS Module to ECMAScript when export contain an arrow function

On Server Application Structure documentation page of Socket.io, two methods are presented to use modules for better code clarity. Those modules are CommonJS. I managed to translate the first to ESM, ...
Akyno's user avatar
  • 1
0 votes
0 answers
13 views

Can't solve Socket.io error in MERN app. Proxy error: Could not proxy request socket.io

I've been trying to run an old e-commerce app to make a list of functionalities. No matter what I do, I can't solve this socket.io error. Proxy error: Could not proxy request /socket.io/EIO=4&...
tatoTatiya's user avatar
0 votes
0 answers
15 views

How to use Websocket.io with IIS [duplicate]

I'm trying to use IIS with a Node.js API, and I've configured URL rewriting in my web.config file to handle API requests and Angular routes. The rewrite rules work perfectly for HTTP requests, but ...
Lucas Pechebelok's user avatar
0 votes
0 answers
12 views

Issue with Initializing Socket.io Once in a Node.js Clustered Environment with Express.js

I'm working on a Node.js application using the cluster module to handle multiple worker processes. My application uses Express.js for HTTP requests and Socket.io for real-time communication. The ...
Sheikh Shahariar Siam's user avatar
-2 votes
1 answer
51 views

Prompting user if they want to leave the page [closed]

I'm building a web chat with sockets, and I recently added href support for urls like so: this is a test text measage with link when the users click this link i want to prompt: Are you sure you want ...
D K's user avatar
  • 3
0 votes
0 answers
13 views

Facing trouble when implementing websockets

I am trying to implement web sockets in my Node.js application. config/socket.js The initialization of socket, and an emit notification function. const socketIO = require('socket.io'); const winston = ...
Noor Fatima's user avatar
1 vote
0 answers
27 views

Android socket.io, node.js as server, android as client

here is a nodejs server code snippet that works fine : const express = require("express") const { createServer } = require("node:http") const { Server } = require("socket.io&...
Gilles's user avatar
  • 21
0 votes
1 answer
31 views

Having an issue with formatting

I am following this guide to learn how to develop a p2p messaging application. the guide seems out of date and i have having trouble displaying 2 things properly <TabsTrigger value="login"...
FTP GGVersed's user avatar
0 votes
0 answers
14 views

Why does Socket.io catch just one connection without client side

So if we implement socket into node server, and add a code (event handler) to follow a connection, it will show the first connection but not the others. I understand it is working normally if we ...
GigaBurek's user avatar
1 vote
0 answers
24 views

File upload is not working with Node.js clusters, socket.io and Multer

I am working on an application that was written in Node.js express with socket.io and Multer.During file upload i got error as unexpected end of form. This is my code master.js require("dotenv&...
Harsha's user avatar
  • 23
0 votes
1 answer
71 views

Socket.io not receiving data properly in React and Node JS

`I am trying to build a connection between a web application and a frontend using socket.io. I want it so that anytime I click on a button, I receive the JSON data that is being sent from the server ...
Syed S's user avatar
  • 3
0 votes
0 answers
22 views

Trying to proxy websocket connections using http-proxy-middleware?

Iam trying to proxy websocket connections through a API-Gateway using http-proxy-middleware. i have an API-Gateway running at localhost on PORT=3000 and websocket server socket.io at localhost on PORT=...
Donald Reddy Indelu's user avatar
0 votes
0 answers
25 views

error connecting to socket.io with python

I need to scrape the latest informations from the website: https://x13.bet/double And I saw that all the informations from the website that I need is from: https://s.x13.bet:2053/socket.io/?EIO=4&...
Guilherme Gobbo's user avatar
0 votes
0 answers
45 views

I can't connect to socket io with python

I'm trying to connect to a socket io link that returns some results in a web page. The link is: https://s.x13.bet:2053/socket.io/?EIO=4&transport=polling&t=P4bEWAn&sid=s5Walx7F2aBWJDTIADXA ...
Guilherme Gobbo's user avatar
-1 votes
0 answers
16 views

Socket server restarting due to an uncatchable error

We have a backend which is mainly used to perform socket connections. Lately we have been experiencing some restarts in the server due to this error right here: The error that makes the socket server ...
Francisco Lopez's user avatar
0 votes
0 answers
14 views

How to use socket.io by node.js as server and android as client?

I am using socket.io in Android as client and connects to node.js server. I follows the guide in socket.io ([https://socket.io/blog/native-socket-io-and-android/]) as in the following: import io....
terry's user avatar
  • 51
0 votes
2 answers
50 views

socket.to(room).emit() not emitting events to others in the room

I want to notify other clients in a lobby when one of the clients leaves. For that I'm using socket.to(room).emit() but it is not working as expected. I have written code in my client side to join ...
aaditya-1219's user avatar
0 votes
0 answers
15 views

Error : hostname:3001/socket.io/?EIO=4&transport=polling&t=P3zvxuf:1 Failed to load resource: net::ERR_CONNECTION_TIMED_OUT

Server Code Node JS My project is everything ok on the local host; I can send SMS, fetch data, etc. Then I deployed on my hosting server. After that, get data from mongoDB properly. Node Js all ...
Bayazid Arefin's user avatar
1 vote
2 answers
46 views

Why is my emitted data not getting recieved on the frontend in react and node js

I wrote this code where I get some data from a function on the server side and that function gives back some data that is then relayed to the front end vis socket.io in node and react however the ...
Divyansh Pathak's user avatar
0 votes
0 answers
15 views

Getting a lot of errors in this aws-sdk server mainly in websockets

I am getting multiple warning and errors but I am not able to debug them The delay between the input submitted and the server is extremely long (approx 90 sec) with increases with more emit functions ...
Divyansh Pathak's user avatar
0 votes
0 answers
16 views

Getting multiple errors in this aws-sdk server mainly in websockets

I am getting multiple warning and errors but I am not able to debug them The delay between the input submitted and the server is extremely long (approx 90 sec) with increases with more emit functions ...
Divyansh Pathak's user avatar
1 vote
1 answer
63 views

In Next.js, not using sockets but getting GET /socket.io?EIO=4&transport=polling&t=P37KhCz 404 in 5344ms

I'm working on a next.js project using nextjs 15.0.0-rc.0, next-auth 5.0.0-beta.19, and react 19.0.0-rc-f994737d14-20240522. The latest time I went to start up my project, I did pnpm run dev, and I ...
Dan Tahir's user avatar
0 votes
0 answers
19 views

Event handling for encapsulated socket.io server

I (js beginner) am creating a node.js webapp with socket.io. I encapsulated my socket server and namespaces to a single module that I call socketManager.js because I heard that this is generally good ...
dumpysmasher's user avatar
0 votes
0 answers
39 views

Is there a way to keep my program alive if the server it needs to connect to is not up and listening yet?

So I've been trying to figure out how to keep my program alive if this separate server that I'm running is not open yet. Right now my program's site pulls up successfully but then the second I try to ...
Nash Carroll's user avatar
0 votes
0 answers
21 views

Extending socket.io Socket interface with custom properties like user_id not recognized

I'm currently implementing authentication with socket.io in TypeScript for my project. When a user connects, I need to store their user_id on socket.user_id after verifying their JWT token in a ...
DjBillje Official's user avatar
0 votes
0 answers
69 views

Group Voice chat application

I am building a project that features group voice chat, allowing a group of people to audio chat with each other in real-time. I am using the MERN stack for development and using Socket.IO on the ...
Faizan Baig's user avatar
0 votes
0 answers
36 views

Socket.io not creating a connection in Express.Js Server

I am trying to create a socket.io based connection in my localhost server running on port 80. All of a sudden it has stopped working as i did not see my debug statements in session middleware as well ...
Roshan Bhatia's user avatar
0 votes
0 answers
73 views

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (CORS request did not succeed). Status code: (null)

I want to deploy my node.js on vps. my project tech stack is node.js , express , peer.js and socket.io I deployed the project on server but cors blocked error occurs Picture of the error is I am ...
Syed Talal Jilani's user avatar
0 votes
0 answers
28 views

Independent socket.io servers on separate child processes [duplicate]

I've been working with express and socket.io, and have successfully created two different apps that serve clients from a domain. So now I'm interested in having the main page for my domain be a portal ...
hmathers's user avatar
1 vote
1 answer
34 views

How can I check if a user is logged in or not in socket.io with AdonisJS?

There isn't much information about this. Is there a way to check if a user is logged in with AdonisJS V6 and socket.io? I have this code so far, but I can't verify if the user has logged in with CSRF ...
Ahmed Elkady's user avatar
0 votes
0 answers
23 views

Socket.IO: Clients Not Receiving changeRoom Event in Multiplayer Game

I'm building a multiplayer game using Flutter for the frontend and Node.js with Socket.IO for the backend. The problem is that when a second player joins a room, the changeRoom event is not being ...
Harsh Butani's user avatar
0 votes
1 answer
43 views

Socket.IO Callback not working in (Node/C#)

I am so concern about an issue that i tried 100 solutions for but nothing works. In python i can : self.sio.emit('join', 'join', callback=self.join_acknowledgment) and it works with charms. I.e. ...
M. Adil's user avatar
1 vote
0 answers
69 views

How to set up an Express server with Socket.IO on Netlify or another free host?

I'm trying to set up an Express server with Socket.IO and deploy it on Netlify. My server was working fine on localhost, but I'm having trouble configuring it to work on Netlify. Here's what I have so ...
Bora Bey Sarikaya's user avatar
0 votes
0 answers
33 views

Blocked by CORS policy: No 'Access-Control-Allow-Origin' header error nodejs

Whenever I try to establish a socket connection (from client) with my server (writen in nodejs), I get a cors error Access to XMLHttpRequest at 'https://example.onrender.com/socket.io/?EIO=4&...
noah.'s user avatar
  • 1
0 votes
1 answer
121 views

Trying to create a live server with Vite and Node.js

I am trying to create an application that hosts a live server, where anyone that connects with it will be able to see any changes made in real time. I am using vite and react.js and I have tried to ...
Bryson Sutton's user avatar
0 votes
1 answer
50 views

socket.io on node server - connection not successful on deployment but worked in development

Problem I have set up socket.io on node server following advice here and socketio docs. It was working successfully and i can see server log can print out connected when i run localhosted client. ...
Ryan's user avatar
  • 3
-1 votes
1 answer
27 views

How to change a source in response to socket IO event? JS + Socket IO + Node js?

I'm trying to make a simple online game. When one player clicks on an object, the background picture changes, and I want to change it with css for all the connected players. I was first doing it with ...
Anna Denisova's user avatar
0 votes
0 answers
24 views

My Nodemon Server is crashing every time i am using a piece of code

I am writing a server for my realtime collab IDE and this is my backend, Here is the full backend index.js code const express = require("express"); const app = express(); const http = ...
Divyansh Pathak's user avatar
0 votes
1 answer
45 views

socket.io setup unsuccessful in nodejs

Problem: Setup of socket.io to backend node js server unsuccessful. Attempts to connect from both postman and my frontend react app were both unsuccessful. frontend terminal error message: App.js:6 ...
Ryan's user avatar
  • 3
0 votes
1 answer
23 views

NodeJS put socket.io on-Events to different file

Hi i want to organise my code a little better and want to split all my socket.on() events into multiple files. Right now this is my setup. Everything is in index.mjs. io.on('connection', function (...
Shy Devil's user avatar
1 vote
0 answers
25 views

Socket.io Response Malformed When Using Nginx as a Reverse Proxy

I am experiencing an issue with my Socket.io application when running in a production environment behind an Nginx reverse proxy. In my local environment, everything works perfectly. However, in ...
DoubleBackSlash's user avatar
0 votes
1 answer
42 views

"CORS header ‘Access-Control-Allow-Origin’ missing" despite setting cors origin in my server.js

I am working on a project where I have set up a socket.io server. server.js const express = require('express'); const app = express(); const http = require('http'); const { Server } = require("...
user25669529's user avatar
-1 votes
1 answer
47 views

Socket.io , CSS and UUID aren't working together?

I'm developing a project for real-time communication. I believe there is an issue with my server.js file that I was unable to decipher I therefore programmed it to use the uuid library to create a ...
Titan's user avatar
  • 3
0 votes
0 answers
86 views

socket.io-client fails to compile (module not found) on Vercel but runs just fine on localhost

Every time I try to build the vercel app, I get this error: Failed to compile. Module not found: Error: Can't resolve 'socket.io-client' in '/vercel/path0/client/src/components/mainlayout/navbar' ...
God's Drunkest Driver's user avatar
0 votes
0 answers
27 views

Perform drag and drop event to all clients with socket.io

it's the first time i'm working with node.js, express and socket.io and i'm trying to perform a simple drag and drop option for all connected clients. Drag and drop is working but it is not rerendered ...
phibac's user avatar
  • 7
0 votes
2 answers
80 views

RTC ice candidate gathering is not triggered when my call starts from callee side

There are my idea steps that I try to implement: callee start a live and wait to a new caller join caller join and then send offer and establish peer-to-peer following WebRTC workflow normally Actual:...
Trong Nguyen's user avatar
0 votes
0 answers
58 views

Using Redis to store Socket.io sessions but getting "Session ID unknown"

When I have more than one instance running my socket.io receives the following error "{"code":1,"message":"Session ID unknown"}". This is expected as subsequent ...
Abdul Aziz's user avatar
0 votes
0 answers
36 views

Socket.io disconnecting with error "transport close"

io as my socket provider, for a android project. Server is in NodeJs and client is in Kotlin androdid. in my socket operation Small emitting with Json is working fine. but while im tryning to send ...
Somnath Nath's user avatar

1
2 3 4 5
267