Problem with Websockets

Hello,

we are using the Push Mode for pushing data to the client
@Push(value = PushMode.AUTOMATIC , transport = Transport.WEBSOCKET)

By default (if i use @Push) the whole vaadin communication is handled over websocket. We use Iphone’s (safari) to call our application.
If the iphone goes in standby we get a exception:

Sometimes if this exception occur, and we wake up the iphone from standby, the communication doesn’t work anymore. We see the page and if we click a button or something, nothing happend.

What can i do to solve this?

My configuration is:
Vaadin 8.1.7
Touchkit 5.0.0
Tomcat 8.5.11

Dez 13, 2017 7:16:56 AM org.atmosphere.container.JSR356Endpoint onError
SCHWERWIEGEND:

java.io.EOFException
    at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1202)
    at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.isReadyForRead(NioEndpoint.java:1127)
    at org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:58)
    at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
    at org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

Hello Tatu,

thanks for your reply. We use the newest ios firmware 11.2. Is it a problem in combination with the touchkit and the offline-mode?
I think websocket is the best communication type for pushing data. If we use long polling what problems / issues or disadvantages we get?

Ben

Certain iOS version have been reported issues with WebScokets (when you Google this you will find bug reports), and EOFException is typical symptom of these. What iOS version you are using? At least some of those issues have been fixed in latest versions. If iOS is the main platform you are concerned, you could think about workaround solution using long polling transport mode instead.