All Questions
81
questions
0
votes
1
answer
44
views
How to keep websockets alive in background?
WS Connection opens and stays open for quite a long time - which is great. If you leave the page for a long time or the computer goes to sleep/hibernation, the WS connection closes and is never re-...
0
votes
0
answers
16
views
Error: Rendered more hooks than during the previous render with next-auth & socket.io
const [bidAmount, setBidAmount] = useState<number>(product?.data?.currentPrice);
const { data: session } = useSession();
const socket = useClient();
useEffect(() => {
if (!socket) ...
0
votes
0
answers
27
views
Socket io trigger an event twice in react js
im facing an issue. my socket io trigger twice on client side. i dont know what is the issue here.
here is my socket configure code in src/socket.ts file
and the socket connection in the mainlayout ...
0
votes
0
answers
18
views
NodeJS socket connection not working on EC2 despite working fine on local
We have deployed our reactJS frontend, NodeJS backend and NodeJS chat(which uses socket programming for communication) on AWS using nginx as webserver.
This is what I have added my /etc/nginx/nginx....
1
vote
0
answers
16
views
Websockets connection error (socket.io...?)
I am clicking on call button once it does nothing when I click call button twice only then only it establish connection.
Frontend code:
import React, { useState, useRef, useEffect } from 'react';
...
0
votes
0
answers
25
views
Socket.io handling disconnection on client
On my server I am storing rooms and users as they are created or as users join. Problem is on disconnection I remove the user from the room on server using socket.id and remove room if no one is left ...
0
votes
1
answer
95
views
how to send tracks between two peers in webrtc
i'm creating a video calling react app using webRtc and socket.io
the offer and answer are perfectly shared between both peers but i'm unable to send video tracks.
ontrack event listner is not getting ...
0
votes
0
answers
23
views
How should eliminate the multiple socket io connection in React form submit?
I want to make a Countdown timer. I want to send a timer from Admin page to the server. The issue here is that every button hit in the input field make a new connection. I want only one connection and ...
0
votes
0
answers
44
views
useEffect not always displaying the received message
I am using socket.io to create a simple chat application. I've spent a couple hours trying to debug this error with no avail.
When I try to display the received message with a useEffect hook it ...
2
votes
2
answers
141
views
socketInstanceRef.current.readyState becomes 3 after reconnect and is not rendering other component
So basically I'm using a connect.ts a custom hook for leveraging a single socket connection by not making new connections each time whenever I need to send a message from anywhere from my app.
I have ...
0
votes
0
answers
37
views
Update states when web socket returns a response - React
I'm creating a panel to manage my messages on Whatsapp, like a CRM, but I want that when a user changes his task automatically all other users who were viewing the same message panel update the ...
0
votes
0
answers
121
views
How Can I Connect Elephant IO to Socket IO Between PHP as Backend and React as FrontEnd
I am Trying to create a chat app using PHP as backend and React as frontend. I want the messages to be updated every time a change happens in the database (new message sent). As I searched the most ...
0
votes
1
answer
45
views
React not rendering long list of strings
I have a long array in React, over 600 items of strings. I have a map function that lists these strings in a log. When I update the empty list to add all the strings, the update is fairly immediate ...
0
votes
1
answer
153
views
How to connect to nextjs websocket from external react
I am trying to send messages over a websocket from nextjs to a separate react app but new to websockets and not sure how to do it so any help would be appreciated, I can send a message from my nextjs ...
0
votes
0
answers
104
views
Cannot perform 'get' on a proxy that has been revoked
export const bulkWatchPayload = (requestIds = [], currentView) => {
const structuredData = requestIds.map(
(requestId) => `ukca_${requestId}_${currentView}`
)
return {
userId: ...