Questions tagged [socket.io-client]

65 questions
4
votes
0 answers

Connect to a socket server in golang

I am using this library in golang to connect to socket server.https://github.com/hesh915/go-socket.io-client I have to pass an auth object as server is expecting an object which will authenticate the user, but in this implementation, query seems to…
Areej Fatimah
  • 251
  • 2
  • 11
3
votes
1 answer

Socket.io and Chrome Extension MV3

I am trying to use socket.io in my chrome extension. I have setup express server and it is up and running perfectly includes socket.io as follow: const express = require("express"); const cors = require("cors"); const http = require("http"); const {…
2
votes
0 answers

Golang socket.io client connection to server

I have this object being sent to socket server in node-js, where client is trying to establish connection to the server & passing data for authentication. The object looks like this being passed. const socket = io({ auth: { userId: "", …
Areej Fatimah
  • 251
  • 2
  • 11
2
votes
3 answers

Socket.io-client connection error: websocket error

Previously, I was getting the output "xhr poll error" with the code: import { io } from "socket.io-client"; const socket = io("https://socket.io/docs/v4", { reconnection: true, reconnectionDelay: 1000, reconnectionDelayMax: 5000, …
raid6n
  • 55
  • 1
  • 7
2
votes
0 answers

Why web socket connection is finishing without establishing a connection on the AWS instance even with a secure connection?

The web socket connection is finishing without establishing a connection on the AWS instance even with a secure connection. Working perfectly fine on my local and staging environments. WebSocket connection to…
Jaskaran Singh
  • 2,392
  • 24
  • 39
1
vote
0 answers

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…
Hajime
  • 21
  • 3
1
vote
2 answers

Importing socket.io-client into Lit controller throws error "Requested module 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 the dev server only to then throw the error Uncaught…
2Can
  • 33
  • 5
1
vote
1 answer

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 console from the first error there's apparently a…
Exboy
  • 79
  • 7
1
vote
1 answer

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 (npm run build + npm run preview). However, when…
1
vote
1 answer

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 (cluster.isPrimary) { const app = express() …
spatak
  • 1,039
  • 1
  • 14
  • 25
1
vote
0 answers

Emit specific SocketIO event as HTTP post request?

In a project that I'm currently working on I have an API call that's being sent via socketIO as follows: Socket config: const socket = io(URL, { path: PATH }) API call: socket.emit( ProcessValues, { user_id: userID, file_id: fileID, …
1
vote
0 answers

Socket client io.socket.engineio.client.EngineIOException: xhr poll error

I am trying to connect my socket client in spring boot application to my node js socket server. The node js client code is as below. socket = io('localhost:3000', { path: 'https://localhost:3000/socket.io', auth: { token:…
Areej Fatimah
  • 251
  • 2
  • 11
1
vote
1 answer

Nodejs socket server and spring boot client

I am trying to connect to my socket server in nodejs with client in spring boot. My nodejs client looked like this while establishing connection to my server passing authentication parameters. socket = io('localhost:3000', { path:…
Areej Fatimah
  • 251
  • 2
  • 11
1
vote
0 answers

Socket.io architecture/configuration to connect to the closest server when available

We have Global Accelerator setup in Amazon to route requests to the closest host from some multiple nodes. How does socket.io play out in this case? If let's say a user connected, and the socket client is connected to host A, but then host B which…
1
vote
1 answer

Can't import socket.io-client (v2.4.0) in my typescript project

It says here that I can import it like this: import io from 'socket.io-client'; But doing this I'm getting an error: Could not find a declaration file for module 'socket.io-client'. '/.../project/node_modules/socket.io-client/lib/index.js'…
1
2 3 4 5