lahsivjar / react-stomp

React websocket component for STOMP protocol over SockJs
https://www.npmjs.com/package/react-stomp
MIT License
135 stars 41 forks source link

InvalidStateError: The connection has not been established yet #114

Closed JimmyMultani closed 5 years ago

JimmyMultani commented 5 years ago

I seem to have this issue immediately after a user logs into our app.

Uncaught Error: InvalidStateError: The connection has not been established yet
    at SockJS.push.../node_modules/sockjs-client/lib/main.js.SockJS.send (main.js:158)
    at Client.push.../node_modules/stompjs/lib/stomp.js.Client._transmit (stomp.js:159)
    at Client.push.../node_modules/stompjs/lib/stomp.js.Client.subscribe (stomp.js:379)
    at SockJsClient._this._subscribe (client.js:85)
    at client.js:111
    at Array.forEach (<anonymous>)
    at Client.connectCallback (client.js:110)
    at SockJS.onmessage (stomp.js:276)
    at SockJS.push.../node_modules/sockjs-client/lib/event/eventtarget.js.EventTarget.dispatchEvent (eventtarget.js:51)
    at main.js:278
    at Array.forEach (<anonymous>)
    at SockJS.push.../node_modules/sockjs-client/lib/main.js.SockJS._transportMessage (main.js:276)
    at WebSocketTransport.push.../node_modules/sockjs-client/lib/event/emitter.js.EventEmitter.emit (emitter.js:50)
    at WebSocketTransport.ws.onmessage (websocket.js:35)

Any assistance would be greatly appreciated. Thank you.

owenn2106 commented 9 months ago

@JimmyMultani Hey, may I know how did you solve this issue?