stomp-js / stomp-websocket

Stomp client for Web browsers and node.js apps
https://stomp-js.github.io/stomp-websocket/
Apache License 2.0
141 stars 36 forks source link

No enum constant org.springframework.messaging.simp.stomp.StompCommand. #37

Open mrharel opened 6 years ago

mrharel commented 6 years ago

We are using stomp-websocket with spring on the server (RabbitMQ) in a react-native project. Everything was working on ios but on android it was not connecting. We found this related issue with this suggestion to be implemented on the backend: https://github.com/facebook/react-native/issues/12731#issuecomment-330182296

After this suggested patch, it was connected on android but then we started to get this messages both on ios and android:

>>> CONNECT
login:
passcode:
accept-version:1.2,1.1,1.0
heart-beat:10000,10000

<<< CONNECTED
server:RabbitMQ/3.7.4
session:session-lxopMotP6ERQq_z-is_ksw
heart-beat:10000,10000
version:1.2

connected to server RabbitMQ/3.7.4
send PING every 10000ms
check PONG every 10000ms
>>> SUBSCRIBE
id:sub-0
destination:/user/queue/messages

<<< PONG
>>> PING
<<< PONG
 >>> PING
 <<< PONG
 <<< ERROR
message:No enum constant org.springframework.messaging.simp.stomp.StompCommand.
content-length:0

Unhandled frame: 
content-length:84

RROR
message:No enum constant org.springframework.messaging.simp.stomp.StompCommand.
Unhandled frame: content-length:0

any idea what could it be?

kum-deepak commented 6 years ago

I can confirm that strings with NULL must work in order for STOMP to work (https://stomp.github.io/stomp-specification-1.2.html#STOMP_Frames).

I am unclear what all you are running on the back-end and what all on the front-end?

kum-deepak commented 6 years ago

Planning for next version of stompjs is on the way. Your participation will be really appreciated, please join at https://github.com/stomp-js/stompjs/issues/1