20,531 questions
0
votes
1
answer
75
views
Handling concurrent task updates in a real-time Kanban board using Socket.IO without UI flickering
Problem
I need to implement a concurrency handling strategy.
If two users try to move or edit the same task at exactly the same time, I want to prevent:
Data corruption
UI flickering
Tasks jumping ...
0
votes
0
answers
114
views
How to emit Socket.IO events from a BullMQ worker running in a separate process?
I’m building a Node.js backend where:
BullMQ is used for background jobs (invoice generation, emails, etc.)
Socket.IO is used to send real-time updates to clients
BullMQ workers run in a separate ...
1
vote
2
answers
89
views
Why isn't this emitting the message?
@app.route('/3x3/online/<username>', methods = ['POST'])
def online3x3(username):
if username == session['username']:
socketio.emit('create', (session['username'], 1), namespace = '/...
1
vote
0
answers
72
views
Socket.IO Livestream Not Cleaning Up After App Crash (Zombie Stream Issue)
I’m building a Node.js + Socket.IO livestreaming backend where a user can have only one active livestream at a time. When a mobile app is force-closed or crashes, the client does not send a ...
Best practices
0
votes
0
replies
24
views
How does one prevent stale ack caused by exceptions?
I have a nest server that has a few @SubscribeMessage functions that fetch data and return it to the client. If the client's request if bad, the functions might throw an error. However, the client's ...
1
vote
1
answer
81
views
Socket.io Custom Headers
So apparently for authentication you need to pass extraHeaders in socket.io, meaning you can't use http-only cookies.
Since I have this code over here, trying to connect to the most barebones socket....
0
votes
0
answers
81
views
Socket connection issue in react-native and nodejs
I’m currently working on a logistics app that manages goods transportation in my area. The tech stack includes React Native for the mobile app, Node.js / Express.js for the backend, MongoDB as the ...
0
votes
0
answers
32
views
Server is listening, but Socket.io client can't reach server
I've spent countless hours trying to figure this out, the code worked perfectly fine on my machine, but stopped working on the server, it just kept throwing "example.com/socket.io/?EIO=4&...
1
vote
2
answers
138
views
Frequent update of records in database
I’m building a real-time chat application using NestJS, Postgresql (Main DB), Redis and Socket.IO.
My database schema (simplified) looks like this:
-- Chats
table chats (
id serial primary key,
...
Advice
0
votes
2
replies
71
views
Code Review: Websockets integration using NestJS for trading application
I’m currently building a trading platform that requires streaming real-time price updates to the UI. I’ve implemented a WebSocket gateway and added handling for common issues such as:
Ghost/...
0
votes
0
answers
27
views
Integrate socket.io namespaces with Node Cluster
I am trying to integrate socket.io with Node's HTTP alongside Node's Cluster Module. Consider the reproducible example:
index.js:
let cluster = require('cluster')
let fs = require('fs')
let http = ...
0
votes
0
answers
65
views
Error with Turso connection database on Node project
I'm following a Node.js tutorial where the database is created with Turso but I have a problem, the connection is created well but I can't realise any type of query. I'm using these libraries:
import ...
0
votes
1
answer
65
views
Socket io is not connecting from Angular to backend nodejs
So I am trying to build a dynamic dashboard application ,so I use socket io 4.8.1 , and In frontend as well I installed the same version , now I used polling socket io it actually worked with polling ...
0
votes
0
answers
47
views
How to prevent auth token from being stolen on the Nextjs client side of socket.io?
This is my nodejs server socket.io code:
const io = new Server(server, {
cors: {
origin: "*", // Allows connections from any origin
methods: ["GET", "POST"] // ...
1
vote
1
answer
121
views
Python Socket.IO with FastAPI in Kubernetes 499 and 426 error
I am trying to setup a socketio server, but having issues with client connection either getting 499 or 426 error -
I have tried port forwarding from the pod to my local and run curl command that also ...
0
votes
0
answers
60
views
socket.io works in browser but failed in node.js
I'm trying to replicate a function of a website in node.js. And this function is implemented by establishing a websocket connection via socket.io. So I just imported socket.io in my node.js code, but ...
0
votes
1
answer
91
views
How to emit Socket.IO events from Bull queue worker running in separate process?
I have a Express application with Socket.IO and Bull queues. My worker processes run in separate processes from the main Express server, and I need to emit Socket.IO events from within the worker jobs....
0
votes
1
answer
108
views
Laravel Echo Server not receiving broadcast events even though WebSocket connection is successful
I’m using Laravel 8 with Redis and laravel-echo-server to broadcast events to my frontend.
The WebSocket connection is successful (status 200), but the broadcasted event from Laravel never shows up in ...
0
votes
1
answer
47
views
Where does the cookie value come from in socketio server when using express-session?
This is what the request headers look like in my handshake request
GET wss://<REDACTED>/socket.io/?EIO=4&transport=websocket HTTP/1.1
Host: <REDACTED>
Connection: Upgrade
Pragma: no-...
0
votes
0
answers
78
views
Android System Monitoring: ADB polling vs. APK with Socket.IO - Which has lower performance overhead?
I need to collect various system metrics from an Android device, including:
Frame rate (FPS)
Memory usage
CPU frequency
Battery level
Battery voltage
Battery temperature
Battery current
Power ...
-1
votes
1
answer
82
views
In Next.js, not using sockets but getting GET 404
There was another post like this, but the only answer it had was to just restart, which didn't work for me.
I added sockets to my project for the first time, it wasn't working so i reverted to a ...
0
votes
0
answers
49
views
socket io java android app and socket io javascript server reliable connection possible?
I need to make a reliable socket io solution for my android apps for chatting app or similar. When I was tinkering with the system I noticed the socketio java client is getting disconnected every few ...
0
votes
0
answers
72
views
Artillery Socket.IO: {{token}} in socketio.query interpolates as 'undefined' despite beforeConnect
I'm trying to load test a Node.js Socket.IO server using Artillery. My server expects an authentication token as a query parameter during the handshake. I'm using Artillery's socketio.beforeConnect ...
1
vote
1
answer
31
views
Periodic beeping in live audio stream using Flask-SocketIO and sounddevice — concurrency issue?
Periodic beeping in live audio stream using Flask-SocketIO and sounddevice — concurrency or deployment issue?
Question
I'm building a live audio streaming feature with Flask-SocketIO and sounddevice. ...
0
votes
0
answers
50
views
pc.oniceconnectionstatechange = () => { state disconnected
i am making the streamign app in react native so when host start the streamign and user user join the stream user able to see host stream but user start the stream host not able see user see that ...
0
votes
0
answers
39
views
Question about receiving events in Artillery without emitting
I'm using the socketio engine in Artillery, and I want to connect to the server without emitting any events — just receive events after the connection is established.
Is there a way to listen for ...
0
votes
1
answer
67
views
Socket.IO not working on AWS with NGINX, Node.js, and HTTPS (400 Bad Request on WebSocket)
I'm running a Node.js application with HTTPS and Socket.IO on an AWS EC2 instance, behind NGINX. The REST APIs work fine, but the WebSocket connection to Socket.IO fails with a 400 Bad Request.
const ...
0
votes
0
answers
27
views
Socket.IO client only sends message on first request, subsequent emits are queued but not sent
I'm using Socket.IO in a Next.js 15 app, and I establish the socket connection globally inside a layout or provider component. My issue is that when I click a button to send a message using socket....
0
votes
1
answer
62
views
Flutter web + flask_socketio: flutter app can't connect to flask socketio
I am trying to run a Flutter web frontend and a python flask + flask_socketio api/socketio backend in a docker compose file. The frontend image uses nginx as a reverse proxy, and its configuration ...
1
vote
1
answer
88
views
Bloc throws an exception "emit was called after an event handler completed normally."
I am using bloc and socket.io in my flutter application to react to login states from the server.
Future<void> _setLoginListener(SetLoginListener event, Emitter<LoginState> emit)async{
...
0
votes
0
answers
56
views
socket.io-client works only via Run Code in VSCode, not with node CLI
Environment:
OS: Windows 10
Node.js: v20.12.2
socket.io: v4.8.1
socket.io-client: v4.8.1
Run environment: VSCode (Run Code extension) & terminal (Git Bash, PowerShell)
Issue:
I have a Node.js + ...
2
votes
2
answers
79
views
Making a ChatApp Two - Way
So, basically, I have created a basic chat app using html, css, and javascript. I am also using SocketIO, so that I can make the chat app real-time. The problem is, I am not able to figure out how I ...
-1
votes
1
answer
64
views
Why is this event is not getting cleaned up or getting attached twice?
There's an event listener as update-active-users and it's getting listened twice i asked ChatGpt she says that might be listener is getting registered twice .
useEffect(() => {
const ...
0
votes
0
answers
39
views
Ios Swift authentication with auth object
I'm using sockets in android to have a connection between backend(node js) app and my android app.
I'm successfully able connect to socket by passing auth header like
mSocket = IO.socket(uri, IO....
0
votes
1
answer
33
views
How do you use certificates and certificate chain with Flask SocketIO?
I need to use SocketIO from flask_socketio with certificate, secret key, and certification chain. How do I do that?
Here is my code so far:
from gevent import monkey
monkey.patch_all()
import ssl
...
1
vote
1
answer
49
views
socket notification for multiple user for different logical area approach comparison
My app has five tab - Tab1 Tab2 Tab3 Tab4 Tab5 each tab its own logical operation.
using WebSocket notification with api
if user made any change in Tab1 Tab 2 3 4,5 must get notification.
similar ...
0
votes
0
answers
35
views
Websockets not working on AWS elastic beanstalk (Socket.IO)
I'm deploying a Node.js app on AWS Elastic Beanstalk using Nginx as the reverse proxy, with socket.io on the backend and socket.io-client on the frontend. Everything runs on a single instance. Locally ...
0
votes
0
answers
67
views
Socket.IO not connecting in Chrome browser (HTTPS, custom port 6530)
Socket issue:
My Laravel backend is hosted on https://example001.com/, while my React app is hosted on https://example002.com/ React uses the 4.8.1 version of the socket.io client, and Laravel uses ...
0
votes
2
answers
76
views
TypeError: Cannot read properties of undefined (reading 'id') when using createAdapter() from @socket.io/cluster-adapter
I'm trying to set up Socket.IO with cluster support using PM2, following this docs.
Here's my code:
import { createAdapter } from "@socket.io/redis-adapter";
import { createAdapter as ...
0
votes
0
answers
32
views
python server / JS client: socketio regular disconnects
In trying to reproduce errors from a larger project I have created a server using python's aiohttp and the following python-socketio (v5.12.0) namespace:
class MyNamespace(AsyncNamespace):
...
0
votes
0
answers
60
views
Connection failed: socket.io
how are you?
Guys, I'm trying to use socket.io to create a chat, locally everything works, when I put "Cpanel" into production I can't connect.
Displays message below:
websocket.js:43 ...
2
votes
1
answer
47
views
SocketIO in React app does not capture emitted event
I am trying to build a Leaderboard that updates real-time based on redis stream events.
So I have this code in my frontend component that ultimately should be getting the latest updates real-time from ...
1
vote
1
answer
130
views
Flutter socket_io_client not updating query token on reconnect – server keeps receiving old 'public' token
I'm building a mobile app in Flutter that connects to a Node.js WebSocket server using socket_io_client. The WebSocket is used for both:
public unauthenticated users (to receive global broadcasts)
...
0
votes
2
answers
137
views
Golang Fiber + Socket.IO: WebSocket Disconnects and Connects in Never Ending Loop
I'm working with a Golang Fiber web server using socketio to manage WebSocket connections. I'm trying to mark a guest as Online = false in the database when the socket disconnects. However, I'm facing ...
-1
votes
1
answer
71
views
Socket.IO server in v2.x with a v3.x client, but they are not compatible
I am working on flutter app where i need to show live stock price from symphonyfintech
and I am using socket_io_client: ^3.1.1. Now i am trying to get connect with socket i am getting error that says:
...
0
votes
0
answers
32
views
iOS Socket.IO client connects but events don't reach server (auth via headers, works on Android/Postman)
Description:
I'm implementing a Socket.IO connection in an iOS app using socket.io-client-swift. The backend uses authentication via headers (user-id and sessionkey). The issue I'm facing is:
The ...
0
votes
0
answers
47
views
How to use socketio and ipc together in python
I am trying to building an server that communicates with the client using socketio protocol, Now the server starts multiple application as a sub processes, the server communicates with this ...
0
votes
0
answers
43
views
AWS NodeJS Websocket server "sleeping" - no error
I've got a NodeJS websocket running on an EC2 instance.
I'm keeping it alive with PM2.
I'm working on it via SSH using vis studio code.
The system is running well and I have about 500 clients (desktop ...
0
votes
1
answer
53
views
How to add different namespace clients to the same room?
I created two socket.io namespaces because there is an agent and customer in chat application and their handleConnection, handleDisconnect functions and etc. are different. That is why I separated ...
1
vote
1
answer
59
views
Why does my Socket.IO connection prevent my Angular component from reloading?
I have an Angular component that connects to a Socket.IO server. However, when I include the WebSocket connection code, my component fails to reload properly. If I comment out the Socket.IO code, ...