flow: Vaadin 23 Resynchronizing UI by client's request - If you are using push with a proxy, make sure the push timeout smaller proxy connection timeout
Description of the bug
Mostly on my iPhone I still receive the following error and my applications shows infinitive bold blue progress bar at the top of the page:
c.v.f.s.communication.ServerRpcHandler : Resynchronizing UI by client's request. A network message was lost before reaching the client and the client is reloading the full UI state. This typically happens because of a bad network connection with packet loss or because of some part of the network infrastructure (load balancer, proxy) terminating a push (websocket or long-polling) connection. If you are using push with a proxy, make sure the push timeout is set to be smaller than the proxy connection timeout
I understand that this issue maybe related to flaky mobile internet connection, but unfortunately it will be really hard to explain the same to every single user of my application. The application should be able to restore from such situation.
I use NGINX as a proxy and Spring Boot (Tomcat or Undertow) with Vaadin application.
In Vaadin application I use:
@Push(transport = Transport.WEBSOCKET_XHR)
My configs:
SpringBoot application.properties:
server.servlet.session.timeout=30m
server.servlet.session.tracking-modes = cookie
server.servlet.session.cookie.http-only=true
server.servlet.session.cookie.secure=true
server.servlet.session.cookie.max-age=365d
vaadin.heartbeatInterval=45
vaadin.pushLongPollingSuspendTimeout=180000
vaadin.maxMessageSuspendTimeout=5000
vaadin.compatibilityMode = false
NGINX:
proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “Upgrade”; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_send_timeout 300;
Atmosphere:
@Component
public class AtmosphereConfiguration implements ServletContextInitializer {
@Override
public void onStartup(ServletContext servletContext) {
servletContext.setInitParameter("org.atmosphere.cpr.AtmosphereConfig.getInitParameter", "true");
servletContext.setInitParameter("org.atmosphere.cpr.AtmosphereInterceptor", "org.atmosphere.interceptor.HeartbeatInterceptor");
servletContext.setInitParameter("org.atmosphere.interceptor.HeartbeatInterceptor.paddingChar", "{\"command\":\"serverInfo\", \"data\":{}}");
servletContext.setInitParameter("org.atmosphere.interceptor.HeartbeatInterceptor.heartbeatFrequencyInSeconds", "45");
}
}
Related SO questions:
https://stackoverflow.com/questions/74350932/vaadin-23-resynchronizing-ui-by-clients-request-if-you-are-using-push-with-a https://stackoverflow.com/questions/74418180/vaadin-23-websockets-iphone-updates-with-delays
Expected behavior
Application should not freeze and continue to operate normally
Minimal reproducible example
Try my application to use for some time on iPhone for example
Versions
- Vaadin / Flow version: 23.2.8
- Java version: OpenJDK 64-Bit Server VM Corretto-17.0.1.12.1 (build 17.0.1+12-LTS, mixed mode, sharing)
- OS version: Debian
- Application Server : Tomcat or Undertow
- Proxy - NGINX
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (2 by maintainers)
Commits related to this issue
- fix: preserve push messages in cache until they are seen by client (#15764) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does not reach ... — committed to vaadin/flow by mcollovati 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does not reach ... — committed to vaadin/flow by mcollovati 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does not reach ... — committed to vaadin/flow by mcollovati 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) (#15820) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does n... — committed to vaadin/flow by vaadin-bot 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) (#15819) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does n... — committed to vaadin/flow by vaadin-bot 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does not reach ... — committed to vaadin/flow by mcollovati 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does not reach ... — committed to vaadin/flow by mcollovati 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) (#15829) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does n... — committed to vaadin/flow by mcollovati 4 years ago
- fix: preserve push messages in cache until they are seen by client (#15764) (#15826) Atmospehere caches messages when the client is disconnected, but unfortunately it may happen that a message does n... — committed to vaadin/flow by mcollovati 4 years ago
I’m also experiencing this issue in Vaadin version 24.3.4. Interestingly it only occurs when the Session Replication Kubernetes Kit is active.
This issue came up again working with Vaadin 24.2.2. Previously in 24.1.4 was not recurring but now is constant.