73 questions
0
votes
1
answer
16
views
Where do I find server response data in socket.io-client?
I am interested in creating (for testing purposes) a fake client that mimics a browser accessing a route in a Node.js HTTP server. In the minimal example below, I am able to point an actual browser to ...
-1
votes
1
answer
39
views
Socket.io-client in node.js
I want to use socket.io-client cdn in the node js project
Sometimes I do connection to the different socket servers with the different socket io versions. So I need to handle it using socket io client ...
0
votes
2
answers
35
views
Socket.IO: No acknowledgment received from client after server emits event
I am using Socket.IO to emit an event from the server to a specific client. The event is being successfully received on the client side, and the client processes the data without any errors. However, ...
1
vote
1
answer
135
views
args[1] is received as null instead of socket acknowledgment callback
Problem:
Emitting event from server along with the callback and expecting client to trigger callback as the event received to acknowledge the server. Client is getting args[1] as null when is should ...
0
votes
0
answers
22
views
Messages Not Emitting from Current Device in Real-Time Chat
Frontend: Flutter (using socket_io_client ^3.0.0)
Backend: Node.js (using socket.io ^4.8.0)
I'm implementing real-time messaging in chat rooms.
When I send a message from my device, it gets stored in ...
0
votes
0
answers
27
views
socket.io - io.to(room) doesn't seem to work
for some reason socket.io won't send a message to a specific room.
right before using the io.to(${socket.id}-devices).emit("event", data)
i check what sockets are in said room by using: io....
0
votes
0
answers
13
views
Why is socket.connected always false when I console log it?
My React application uses Socekt.io
Here is the Socket Context
import { createContext, useState } from "react";
import PropTypes from "prop-types";
import { io } from "socket.io-client";
const ...
1
vote
0
answers
108
views
Azure Speech recognition not working with Angular + .NET Core
We are trying to implement Azure speech recognition in realtime using its PushStream. The audio is recorded at angular app using navigator.mediaDevices.getUserMedia(). The recorded audio when sent to ...
0
votes
0
answers
32
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
31
views
chrome extension is not working with socket.io
manifest.json
{
"name": "SocketIO Extension",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker&...
0
votes
0
answers
198
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 ...
0
votes
0
answers
117
views
Socket.io.client for iOS: How to extend socket timeout?
I am attempting to use socket.io to connect to an NTRIP server. I can see the auth request go out and an ICY 200 OK response come back but the connection times out after 60 seconds and is stuck in a ...
0
votes
0
answers
44
views
Angular (socket.io-client) cant send/receive message from SpringBoot (netty-socketio)
Angular is connecting on my spring boot app
However it connects/disconnects
This is my angular service
Angular cant send or receive
export class WebsocketService {
isBrowser = false;
socket:any;
...
0
votes
1
answer
64
views
Socket.io Flutter connection
I have a socket connection. Inside Bloc Constructor. Since the userInformation is not yet available at first initialization of the Bloc.
will the OnConnectSocket event will work? . esp the _socket.io....
1
vote
1
answer
83
views
Duplicated call of onConnected() in Spring when calling io() socket.io-client function
I'm trying to set up a Socket.IO server with Spring boot, which also serves as an API for my application. I have an Angular frontend that looks like this:
The problem is when I call my service to ...
0
votes
0
answers
14
views
socket.io server on mobile not working How to fix it I replaced localhost with my desktop ip also but still not working. how to fix it?
client:
import { createContext, useContext, useMemo } from "react";
import socketClient from "socket.io-client";
const SocketContext = createContext(null);
export const ...
0
votes
1
answer
80
views
Can't connect to SSL websocket after upgrading node to 20.10 (from 14.7) and socket.io 4.7.2 (from 1.4.36)
I'm completely lost at this point, so any insights would be most appreciated...
I'm maintaing code that creates a secure websocket using express. The original socket.io libraries were v1 which I've ...
0
votes
0
answers
27
views
Socket.io event doesn't emitting from client itself client
I am making a simple chat app website in Socket.io. But emit method not working in client.
when i do on and emitting event from client it doesn't do on function
here is client html body code :
<...
0
votes
1
answer
396
views
React Native WebRTC Remote Stream is black
React Native Webrtc remote stream is black during Video Call. It's getting both audio/video from remote candidate but it just won't display.
{"_id": "28967b2b-d555-4438-a8e8-...
0
votes
2
answers
719
views
Socket IO, React - Not receiving events emitted from server
In my react app, I initialize a connection with the backend socket Io server. Inside the server, I console.log the socket that has connected, and everything works as expected, the client connects fine....
0
votes
0
answers
47
views
socket.io-client CORS
Maybe I'm asking a stupid question, but I really don't understand.
I have two scripts: socket server and socket client.
socket server:
this.io = new Server(HTTPServer, {
wsEngine: eiows....
3
votes
0
answers
1k
views
Socket.io implementation in Next.js 14.1.0 app directory
I want to implement a video conference app where I need to implement socket connection for specific rooms. Since Next.js is a serverless framework, I had to create a default GET method and initialize ...
0
votes
0
answers
64
views
Node Socket.io works only on localhost but not on domain
This is Node.js server code.
Server.js
const express = require("express");
const cors = require("cors");
const http = require("http");
const SocketServer = require("....
1
vote
3
answers
2k
views
Angular 17 not rendering a component with Socket.io
I have the following Angular component, whose only property is an instance of ConnectionService service:
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
...
0
votes
1
answer
651
views
How to connect to custom namespace socket.io websockets running with FastAPI + gunicorn which runs on a domain subpath?
So I have a FastAPI app which is integrated with socketIO like so https://github.com/miguelgrinberg/python-socketio/blob/main/examples/server/asgi/fastapi-fiddle.py. The mantainer of python-socketio ...
0
votes
1
answer
178
views
Multiple namespace handling in angular using socket.io
I have two clients, where I have defined static namespace "/CGI_ONE" but when I connect "/CGI_TWO" it disconnect the previous socket.io how do I manage both in node js and angular ...
0
votes
1
answer
524
views
Client not receiving event emitted from server (using socket.io and next.js)
I'm trying to implement a chat app using next.js and socket.io. Both the client and server of socket io are on nextjs (server is using api routes).
I want to create a chat app which allows users to ...
0
votes
1
answer
297
views
vue-socket.io-extended: socket within setup() // composition API
In my vite/vue application I am trying to emit a message to socket-io from within a function defined in the setup () section / composition API.
I am able to successfully do so in the methods() section,...
1
vote
0
answers
186
views
How can we pass live video MediaStream captured from web camera from angular to nestjs backend solution using socket.io-stream and socket.io-client
Could you please advise based on your experience?
How can we pass live video MediaStream captured from web camera from angular application to nestjs backend using socket.io-stream and socket.io-client?...
0
votes
1
answer
16
views
Emitting from Server is not working correctly
Here is my client code:
import io from 'socket.io-client';
const FriendOpts = ({ user2Email, locationState = null, component = null }) => {
const auth = useContext(AuthContext);
const ...
0
votes
1
answer
345
views
Not able to use socket.io in nest js and react native ( expo )
am trying to implement a real-time functionality in my mobile app ( React native Expo ), am using NestJs as a backend and bellow is my gateway, but the connection is not happening for some reason. ( ...
0
votes
0
answers
1k
views
Join a room in socket.io on postman
how do i resolve this socket.to(user).emit("add-message", AddMessage); on postman using socket.io
i tried declaring the user id as the event listener and "add-message" as the event ...
2
votes
1
answer
2k
views
Fastify & socket.io server client doesn't connect
How can we connect fastify backend server with socket.io ? Can anyone suggest me what I did wrong in following code?
Error Code:-
"res": {"statusCode": 404}
index.html
<!...
0
votes
1
answer
155
views
Refused to load the script socket.io
Refused to load the script 'https://cdn.socket.io/4.5.4/socket.io.min.js' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem'...
0
votes
0
answers
70
views
How can I implement global messages with Socket.io-client?
I succesfully implemented a real-time chat in specific 'room' with Socket.io-client.
And now, I want to make every message from every room make an alert from everywhere in my page even though the user ...
0
votes
1
answer
85
views
sails.io.js with Svelte3/4 SvelteKit
I've been trying to port my app from older Svelte3/Rollup to newer Vite based setup and am having trouble initializing sails.io.js client to work inside Svelte.
What used to work really well in the ...
1
vote
0
answers
38
views
How can I keep the data of messages and roomUsers in room chat when I reload the page in Socket.io?
I have a challenge problem with my exercise while learning Socket via examples in Internet.
And here the link to the example I reference:
https://www.freecodecamp.org/news/build-a-realtime-chat-app-...
0
votes
1
answer
332
views
Simple-peer: Video Calling App not working when peers are connecting from different systems
I have built a video calling app that enables video communication between two peers. When I open the site (hosted on Surge, server hosted on render.com) on a single system with two different tabs ...
0
votes
1
answer
788
views
Socket.io communication issue from client, though works via Postman
I have a web client (Angular) that after deployment to production fails to get any messages from a Socket.io server. It uses connect('https://myserver.com').
The odd thing is, I have no problem ...
9
votes
2
answers
22k
views
Using Socket.io with Next.js
Background
I'm trying to establish and connect a socket using Next.js. I'm following the standard guide that uses an API call to test if a socket server is already running and creates one if not.
I ...
-1
votes
1
answer
69
views
can we share screen through socket.io without select screen prompt [closed]
i want chose my screen and share it on socket.io server but without any select screen pop up
form browser
navigator.mediaDevices.getDisplayMedia({ video: true }).then((stream: MediaStream) => {
-1
votes
1
answer
137
views
How to set client-server interaction with Socket.io
Can anyone help me to figure out this code .I'm new to Socket.io I just wanted to see how actually client and server interacts. Code in Express.js is here :
const express = require('express');
const ...
1
vote
2
answers
370
views
Importing socket.io-client into Lit controller throws error "Requested module <name> does not provide an export named default"
I'm currently building a controller for a Lit web component with TypeScript and when I am importing socket.io-client (
import {io} from "socket.io-client"
), it compiles correctly and starts ...
0
votes
1
answer
459
views
Socket.io And Next.js `net::ERR_NAME_NOT_RESOLVED`
I'm implemented Socket.io Server by UVICORN on windows 10 OS and implemented Client Side by Next.js and Typescript.
But when i tried to connect to the socket.io server, i have below errors!
1
vote
1
answer
86
views
Is there a way of solving Uncaught Reference error and stating correct ORIGIN of a socket.io server on the client side when using vscode live server
I ran a socket.io client code using the liveserver extension on vscode and because i am using the version 2.5.0 i had to make use of socket.io wildcard I then ran the code and got 2 errors in the ...
1
vote
1
answer
1k
views
Socket.IO (Client) doesn't work after deploying with ViteJS and ReactJS
I'm developing an application in ReactJS (18.2) using Vite (4.1) and Socket.IO-client (4.6) and everything works correctly locally, while running in dev mode (npm run dev) and also after deploying (...
1
vote
1
answer
251
views
Socket.Io not emitting immediately after first emit (order important)
Environment:
Backend
node:latest
socket.io | 4.5.2
Frontend
React Native | 0.70.4
socket.io-client | 4.6.0
both Android and iOS
Here is my NodeJs entry file:
const numCPUs = cpus().length
if (...
0
votes
1
answer
484
views
How to emit an event on application close using socket.io
I am trying emit an event while user closes the tab and for this I am emitting an event on unmount of a component ( which is nested inside a Main component) :
Emitting an event REMOVE_SOCKETS inside ...
0
votes
1
answer
719
views
socket.io fires event twice in react useEffect hook even though i have unsubscribed in the cleanup function [duplicate]
socket.io in react useEffect renders twice even though i unsubscribed in the cleanup function
the code is something like this
useEffect(() => {
const callback = (date) => {
//do ...
2
votes
0
answers
203
views
Socket.IO not working in regular browser mode (but works in incognito)
I have to connect to Socket.IO server from my app.
I'm using Angular wrapper ngx-socket-io without any special options set.
I have noticed that everything works when I'm connecting in incognito mode - ...