All Questions
45
questions
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) ...
2
votes
2
answers
761
views
I have a websocket server. It works connecting with postman, but in my react proyect doesnt
So i have a websocket server built with python, which is deployed in a EC2 container. Connecting through postman works perfectly, but when connecting via Websocket in React, it throws always this ...
0
votes
0
answers
84
views
Is it possible with Next.js 14 to update the app state in the browser from the server in real-time without the use of WebSocket?
Is it possible with Next.js 14 to update the app state in the browser from the server in real-time without the use of WebSocket? The late versions of Next.js have got more capabilities to mix and ...
0
votes
0
answers
53
views
Pusher making multiple channel every few seconds
I am new to web socket and I was just trying pusher out.I was making a realtime comment section,here is my code
"use client";
import { useState, useEffect } from "react";
import ...
2
votes
2
answers
902
views
Pusher creating too many concurrent connections
I am trying to create a realtime chat application using the pusher library. I am using Next.js. I followed the documentation and the realtime functionality works, but when I am just messing around ...
1
vote
2
answers
640
views
How to prevent socket-io instantiating two sockets in React / Next.js (currently instantiates on server *and* client)
I'm trying to get a basic WebSocket setup to work:
Client: Next.js 14
Server: Express
WebSockets: socket-io
Here's the most important files:
Server
My Express server only has a single file that ...
1
vote
1
answer
288
views
rerender a react server component
I am working on a next.js/react.js app.
I have a component tree, such as below:
<ParentComponent> // server comp
<ChildComponent> // client component
I have an MQTT connection on ...
0
votes
2
answers
181
views
How to send data on websocket close in react/nextjs on reload or tab close
I am making a web app where i want to show online/offline status of user. For that i need to listen to close and open events of websocket.
const ws = new WebSocket('ws_url', 'token');
ws.onclose = (e) ...
0
votes
0
answers
149
views
How to replace Hocuspocus server by springboot websocket inside a tiptap editor + Hocuspocus Provider app
To make the server part as easy as possible, tiptap provides an opinionated server package, called Hocuspocus. It’s a flexible Node.js package, that you can use to build your custom backend. However, ...
0
votes
1
answer
570
views
Using TipTap.dev to make a collaborative editor -
I am using the tiptap.dev collaboration feature in my NextJS application.
When I use their built in CLI for the Hocuspocus server -> npx @hocuspocus/cli --port 1234 --sqlite , that example server ...
0
votes
1
answer
502
views
trpc `useSubscription` doesn't get React state updates
I'm building a Next.js app with trpc that requires real time comunication. It has been going well, especially since my useSubscription calls have only been updating state rather than reading it so far....
0
votes
0
answers
55
views
socket.js works in dev mode but fails to connnect in production
I am using Nextjs 13.4.13 and socketio works on dev mode perfectly fine but fails to connect from frontend to backend in production.
I am connecting the backend server (pages/api/socket.ts) which ...
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
480
views
React Stomp Client, received message before the event of Websocket
I am implementing a Web-socket into my React App. It connects with the socket of the server, subscribes the channel too, but the message also receives together. The message should be deliver after the ...
1
vote
0
answers
39
views
Socket encountered error: undefined in iPhone
I have a web Socket to get real time values. While using iPhone devices, we get many errors in guard.
What does it mean? And how can I solve this problem?
These errors do not occur on Android devices. ...