20,923
questions
0
votes
0
answers
9
views
How to get online status of my users on my NextJs App
My NextAuth Option Code is (only the important part)
callbacks: {
async jwt({ token, user }) {
if (user) {
token.id = user.id;
token.email = user.email;
token.role = ...
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 ...
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 ...
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, ...
0
votes
0
answers
11
views
Attaching Socket.IO in Next.js, but server is not starting from server.ts. Please help debug
I'm trying to attach Socket.IO to my Next.js project using app-router, but I'm running into an issue where the server isn't starting correctly from my server.ts file. I've followed several tutorials ...
0
votes
1
answer
18
views
How to disable error logging when client.connect(URL) in Socket.IO Client C++ library is unreachable?
https://github.com/socketio/socket.io-client-cpp/blob/master/API.md
It keeps outputting to console whenever the server is unreachable.
I want to suppress these messages completely.
[2024-08-27 18:25:...
0
votes
0
answers
23
views
Can I use socket.io with typescript in AWS LAMBDA via AWS ALB?
I have one typescript repository which uses socketio and ioredis.
It listens to redis messages coming from one Laravel php application (ex: someone sent chat message via api call) and then dispatches ...
0
votes
0
answers
27
views
socket.io not firing on production mode when live reload page. but firing on dev mode
import { socket } from "../../socket";
useEffect(() => {
socket.emit("sedo-domain-list");
socket.on("sedo-domain-list", (domain) => {
setData(domain)...
0
votes
0
answers
19
views
MiroTalk WebRTC Video call, Chat Room & Screen Sharing. Not working video and audio with out same local ip address
MiroTalk WebRTC Video call, Chat Room & Screen Sharing. Not working video and audio with out same local ip address
if we are using same internet, we can get audio and video. but if we are using ...
0
votes
0
answers
10
views
Django SocketIO Connection Fails After RDS Restart – How to Handle Database Connectivity Issues?
I'm developing a Django application using SocketIO for real-time communication, and I'm encountering an issue where SocketIO connections fail after an RDS (Relational Database Service) restart, while ...
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&...
0
votes
0
answers
30
views
probleme connection server client [closed]
PS C:\Users\stage\Desktop\Servers\Websocket Client> node client.js
node:events:497
throw er; // Unhandled 'error' event
^
AggregateError [ECONNREFUSED]:
at internalConnectMultiple ...
0
votes
0
answers
13
views
WebSocket Disconnects and "Unknown" Error on Firefox and Safari, but Works on Chrome
Sometimes, while chatting, I experience issues with the chat list. Occasionally, the WebSocket disconnects and shows "Unknown" on Firefox and Safari, but Google Chrome seems to work properly....
0
votes
0
answers
21
views
why is my client sending a extra request to the server
io.on("connection", (socket)=>{
console.log(socket.id)
const cookiesHeader = socket.request.headers.cookie;
if (cookiesHeader) {
// Manually parse cookies
...
0
votes
0
answers
21
views
Wrote a chat app with Flask and SocketIO. Do I need to refactor to an ASGI based framework?
I've built a webapp for interacting with an AI assistant through text and speech. I'm inexperienced with web dev, and have been picking up each part of the stack as I go along - get it working first, ...
2
votes
0
answers
31
views
Websocket keep disconecting
I'm working on a project where I'm using Socket.IO to establish a low-latency connection between a server and a Raspberry Pi 5. The Pi is both a client and hosts another relay server. The connection ...
-1
votes
0
answers
25
views
How a chat application friends list is loaded and updated in real time?
Working with node, express & socket io as for backend and React JS, react-query & socket io in frontend building a chat application, I came to point where I started thinking of how to load ...
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 ...
0
votes
0
answers
10
views
Sveltekit + Socket.io + set-cookies
How do you guys set cookies in Sveltekit, if socket.io token is expired? Is it even possible?
The official approach with +page.server.ts won't work in this case for obvious reasons. But a scenario ...
0
votes
0
answers
12
views
Cannot assign to read only property using RECOIL
This is the code where I am defining my atoms,
import { io } from "socket.io-client"; import { atom, useRecoilState } from 'recoil';
export const count = atom({
key: 'count',
...
1
vote
0
answers
42
views
Testing Socket.IO connectivity during Playwright tests on github
I've built a simple multiplayer trivia app in React that uses Socket.io to communicate between client and server. To start, visitor needs to login to establish connection. If connection is established,...
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 ...
-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 ...
0
votes
1
answer
23
views
React Native Maps : inaccurate marker location when updating dynamically the marker coordinates via socket io client
I am trying to update the marker coordinates using socket io client, there's no error shown, but the marker location in the map is not as accurate as expected.
Please check my code snippet shown below....
0
votes
1
answer
46
views
WebSockets not working in Azure Static Web App -> Azure App Service
I am having issues getting websockets to work in Azure with the following setup:
Frontend in React, hosted in an Azure Static Web App
Backend in Node.js (v20 LTS) running in Azure App Service
The API ...
0
votes
0
answers
12
views
NodeMCU is unable to connect with WebSocket endpoints of a server configured over AWS EC2 and Nginx
I'm trying to connect my NodeMCU, send data to our server (project built using NodeJS, deployed on AWS EC2 with Nginx), and connect through WebSocket endpoints. The same endpoints work fine when ...
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 = ...
0
votes
0
answers
10
views
Undefined offset: 1 in Livewire\resources\views\navigation-menu.blade.php Livewire 2.12
I am Updataing unread Messeges Count. and it works when there are unread messeges but give error when there is no unread messeges
I have Tried Try Catch that's all ..
I get the idea something is null ...
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&...
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"...
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 ...
-1
votes
1
answer
24
views
Websockets vs socket.io for Flask
Can we use Websockets for flask application instead of flask-socketio?
I created a trading project in which i am using websockets to build socket connection between client and the server. next, i ...
0
votes
0
answers
21
views
Flutter web socket channel, Connection closed before full header was received
I'm trying to listen to socket (i run it locally), I'm using web_socket_channel, I followed the instruction from the documentation, but I can't make it work. It keeps telling me this:
WebSocket error: ...
0
votes
0
answers
13
views
reactjs/socket.io wrong socket returned on connection
I'm working on a chat app with reactjs/socket.io but I've been struggling to fix this bug for days now.
Server code:
io.on('connection', socket => {
console.log(`User ${socket.id} connected`);
...
0
votes
0
answers
14
views
Three digit encoding of socket.io messages using python-socketio
I'm currently reverse engineering an application that uses socket.io and engine.io v3 for it's communication. While looking at the websocket messages, I noticed that the messages contain three digit ...
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&...
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 ...
0
votes
0
answers
17
views
Socket Io based Card game dealing with 4 different views
Iam creating a card game using socket Io and the problem Iam facing is how to deal with local view and players view for example the part Iam stuck in now is when someone draw a card Iam struggling ...
0
votes
0
answers
12
views
How to make the disconnection work when we redirect?
Here is the server side code snippet
io.on('connection', (socket) => {
console.log('User connected!');
// getting the room id
socket.on('roomid', (data) => {
// console.log(data);
...
1
vote
0
answers
21
views
Can't connect to NestJS socket.io using Angular port forwarding
I have an angular SPA application running on port 4200 http://localhost:4200. I'm forwarding my NestJS api using proxy.conf.js :
'/api': {
secure: false,
target: `http://localhost:3000`,
...
0
votes
0
answers
25
views
User entered twice(socket io)
I want to implement the function that entering the room. so i wrote the code like this
//home
const user = useRecoilValue(userStateAtom);
const userId = user.userData.userIdphp;
const navigate = ...
0
votes
0
answers
13
views
Can't emit message from nextjs app route api
// lib/socket.ts
import { io } from "socket.io-client";
export const socket = io("http://localhost:3000");
// api/socket/route.ts
export const GET = async (req: Request) => {
...
1
vote
0
answers
35
views
How to Configure Apache 2.4 to Allow PHP Socket.IO Connections on a Local Server?
In PHP script using phpsocket.io library I created a socket on socketio://0.0.0.0:2346.
<?php
use Workerman\Worker;
use PHPSocketIO\SocketIO;
require_once __DIR__ . '/vendor/autoload.php';
$io = ...
0
votes
0
answers
11
views
Socket.io when socket server send msg client socket.on is not trigger
I have implemented one-to-one chat using socket.io-client in React Native. I have two users, and they are messaging each other using the socket.emit event. One user sends a message to the other, but ...
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=...
0
votes
0
answers
12
views
Socketio Postman Python not displaying emet
the code I'm using
enter image description here
import socketio
from aiohttp import web
# Создаем экземпляр сервера Socket.IO
sio = socketio.AsyncServer(async_mode='aiohttp')
# Создаем aiohttp веб-...
0
votes
2
answers
63
views
Python Flask SocketIo async
How can I make the socket run asynchronously?
This code doesn't work now. Nothing happens when the socket is called.
I need to call an asynchronous function internally. What should I do?
Here is my ...
0
votes
0
answers
9
views
Establishing many socket connections on website deployed by vercel
`Some of the connections are ok but the others aren't
Server:
server configuration
import cors from "cors";
import "dotenv/config";
import express from "express";
...
0
votes
2
answers
70
views
Deploying NextJS with Socket.IO application in IIS 10
I already deployed my application in IIS using the tutorial of Halfblood Programmer. I am using HttpPlatformHandler v1.2, the application is already running but the problem is the websocket. Socket.io ...
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&...