Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stomp error when PongMessage is passed to StompSubProtocolHandler [SPR-12728] #17325

Closed
spring-issuemaster opened this issue Feb 18, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Feb 18, 2015

Mark Anderson opened SPR-12728 and commented

StompSubProtocolHandler cannot handle receiving a PongMessage.

ERROR Feb 18 11:15:47 (56612 [qtp300104620-57] org.springframework.web.socket.messaging.StompSubProtocolHandler) Failed to parse PongMessage payload=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], byteCount=0, last=true] in session 123f6cb6. Sending STOMP ERROR to client.
     [java] java.lang.IllegalArgumentException: Unexpected WebSocket message type: PongMessage payload=[java.nio.HeapByteBuffer[pos=0 lim=0 cap=0]], byteCount=0, last=true]
     [java] 	at org.springframework.web.socket.messaging.StompSubProtocolHandler.handleMessageFromClient(StompSubProtocolHandler.java:203)
     [java] 	at org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.handleMessage(SubProtocolWebSocketHandler.java:309)
     [java] 	at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:75)
     [java] 	at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:75)
     [java] 	at org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:75)
     [java] 	at org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.handleMessage(LoggingWebSocketHandlerDecorator.java:56)
     [java] 	at org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.handleMessage(ExceptionWebSocketHandlerDecorator.java:72)
     [java] 	at com.psymetrix.pdc.web.CustomJettyWebSocketHandlerAdapter.onWebSocketFrame(CustomJettyWebSocketHandlerAdapter.java:55)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:483)
     [java] 	at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:71)
     [java] 	at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72)
     [java] 	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onFrame(JettyAnnotatedEventDriver.java:149)
     [java] 	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:107)
     [java] 	at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:309)
     [java] 	at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214)
     [java] 	at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220)
     [java] 	at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258)
     [java] 	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:613)
     [java] 	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:468)
     [java] 	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
     [java] 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626)
     [java] 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546)
     [java] 	at java.lang.Thread.run(Thread.java:745)

Note that the CustomJettyWebSocketHandlerAdapter class in the stack trace is used to workaround #17324


Affects: 4.1.4

Issue Links:

  • #17324 Unhandled websocket error when unsolicited pong frame with zero length payload received from IE11

Referenced from: commits 917eb1d, 6fafe63

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 18, 2015

Rossen Stoyanchev commented

I've removed the ISE and pong messages should be ignored now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.