DebugWindowConnection check causes problems on Liberty websockets
See original GitHub issueDescription of the bug
Open OpenLiberty 22 (and 19) you get
[err] [Atmosphere-Shared-2] ERROR com.vaadin.flow.server.communication.PushAtmosphereHandler - Exception in push connection
[err] java.lang.IllegalStateException: Request object no longer valid. This object has been cancelled
[err] at org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:422)
[err] at org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:436)
[err] at com.vaadin.flow.server.communication.PushHandler.isDebugWindowConnection(PushHandler.java:606)
[err] at com.vaadin.flow.server.communication.PushHandler.handleConnectionLost(PushHandler.java:360)
[err] at com.vaadin.flow.server.communication.PushHandler.connectionLost(PushHandler.java:333)
[err] at com.vaadin.flow.server.communication.PushAtmosphereHandler$AtmosphereResourceListener.onDisconnect(PushAtmosphereHandler.java:113)
[err] at org.atmosphere.cpr.AtmosphereResourceImpl.onDisconnect(AtmosphereResourceImpl.java:759)
[err] at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:650)
[err] at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:630)
[err] at org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:897)
[err] at org.atmosphere.cpr.DefaultBroadcaster$2.run(DefaultBroadcaster.java:474)
[err] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
Looks like it does not allow checking attributes from the request when it has been closed.
Expected behavior
No exception when a websocket connection is lost.
Minimal reproducible example
https://github.com/vesanieminen/sample-mpr-v14/tree/v23
Versions
- Vaadin / Flow version: 23.0.4
Issue Analytics
- State:
- Created a year ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Liberty collective troubleshooting - IBM
Cause : The servers might not be running. Verify that the collective controller and member servers are running. If the servers are running,...
Read more >WebSphere liberty web socket lost messages - Stack Overflow
I'm playing with web sockets on WebSphere Liberty 16.0.0.3 and seeing something odd. If I send a number of messages back to back...
Read more >Java WebSocket 1.1 :: Open Liberty Docs
2.0. 1.1. 1.0. This feature enables support for WebSocket applications written to the Java API for WebSocket 1.1 specification.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You are including Tomcat in the WAR which will cause Atmosphere to use Tomcat classes instead of Liberty. If you add
to the spring boot starter dependency, it works as expected
Eventually caught the error with Open Liberty 22 bundle: