All Questions
26
questions
0
votes
0
answers
18
views
Add header to SockJS
i am using this code to connect to my websocket spring boot, but it not working when im add header into.
import { Client, IMessage, IFrame } from '@stomp/stompjs'
import SockJS from 'sockjs-client'
...
2
votes
0
answers
41
views
WebSocket is not receiving messages
I have simple STOMP websockets:
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void ...
0
votes
0
answers
370
views
How to work with websockets in react js and spring boot application
I'm trying to connect with web socket which is on spring boot via React JS but not able to establish connection
I'm using the stompJS and sockjs-client libraries from npm
It's working while tested on ...
0
votes
1
answer
82
views
Websockets works in Firefox but not Chrome
I have implemented websockets with authentication in Spring Boot by passing my bearer token within the Sec-WebSocket-Protocol header as "Authorization, ". This is performed in my React ...
0
votes
1
answer
225
views
WebSocket not connecting with react+vite app, with backend running on spring boot
My react+vite app is running on the localhost:5173 port and my spring boot is running on localhost:5729. The following is the code for the App.jsx:
import { useState } from 'react'
import './App.css'
...
0
votes
0
answers
184
views
Websocket connection - "2000 All transports failed" after migrating to Vite from create-react-app. React, Sockjs-client, webstomp-client, Spring Boot
I am using React in combination with the sockjs-client and webstomp-client dependencies to establish a connection with a WebSocket. Previously, I have used Create React App for initiating React ...
0
votes
0
answers
23
views
web push Api on non internet environment
I want to use web push api on my application that will be runned on an offline network, is it possible? if yes how to do that? I see that the push service of every browser is generating an endpoint ...
0
votes
0
answers
19
views
Messages not received
So I have a spring boot backend and react client i am trying to make a chat application.
So this is my problem, lets say I have two user UserA and UserB
UserA sends a message, the backend receives ...
0
votes
0
answers
71
views
Cannot read properties of null (reading 'addEventListener') Getting error while connecting to sockjs
I'm getting the above error when trying to run the application. I'm using spring boot on the backend and websocket. And using js and sockjs library.
This is the error I'm getting:
ChatRoom.js:45 ...
1
vote
0
answers
43
views
React websocket cannot subcribe with spring boot backend websocket
import { Client, Stomp } from '@stomp/stompjs';
import { Button, Stack } from '@mui/material';
import SockJS from 'sockjs-client';
const topic = '/topic/messages';
const WS_URL = 'ws://103.173.155.**...
0
votes
0
answers
66
views
spring boot and react-use-websocket message not received in React TS
i am using spring boot with WebSocket to send message to a react TS application.
spring boot code =>
@Service
@EnableScheduling
@RequiredArgsConstructor
public class MessageService {
private ...
0
votes
1
answer
2k
views
Websocket connection with spring boot and react.js
I am trying to connect my react.js socks client to my spring boot backend web socket but I can not connect them it gives me some errors on chrome console like that :
chrome-console-error
I do not have ...
0
votes
1
answer
108
views
How to use HTTPS in development?
I'm working on a simple chat app. App is created with ReactJS and uses REST api from Spring Boot app. Communication between client and server is based on both HTTP and WebSocket. I need to upgrade ...
1
vote
1
answer
172
views
Spring @SubscribeMapping being called
i am trying to make a webpage for multiplayer games similar to the jackbox party pack series.
I want to do this by creating sessions/rooms which are identified by a randomly generated 4 letter ...
0
votes
0
answers
52
views
Spring + ReactJS ERRCONNRESET
i am working on a ReactJS app with a Spring backend server which provides the data. The data is passed via Websockets. Some Snippets from the Spring side of things:
@Autowired
private ...