-
Notifications
You must be signed in to change notification settings - Fork 175
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
Resynchronizing UI by client's request #14232
Comments
Difficult. |
Same on Vaadin version 14.8.14 WARN com.vaadin.flow.server.communication.ServerRpcHandler [http-nio-8080-exec-3] Resynchronizing UI by client's request. Under normal operations this should not happen and may indicate a bug in Vaadin platform. If you see this message regularly please open a bug report at https://github.com/vaadin/flow/issues |
Apparently no one from Vaadin is watching here.. 2 - Does it happen in development, when running with Intelij or similar? 3 - Does it happen in production? |
I was hoping to be a conflict between two applications. And the same problem happened: This is very bad, it is a very serious problem. |
I would suggest to post your nginx and push configuration. |
Push detault:
NGINX file:
About the timeouts in NGINX, I added more time, it didn't make any difference with or without this part of the code:
|
I don't see anything related to push in the configuration. Cuba has a example for nginx that you could try: https://doc.cuba-platform.com/manual-latest/server_push_settings.html#server_push_settings_using_proxy - important is the part about I'm more experienced with apache httpd and there it is a must have to configure websockets corretly to work in corporate networks. |
I added your suggestion in NGINX. Thank you very much! |
Sorted out! I share here my NGINX that I'm using for other users, and I won't close the ticket so that someone from Vaadin can evaluate if any improvement is needed in relation to the theme. Here's the complete file:
|
How to configure a reverse proxy should be an important topic inside the docs (cc: @tarekoraby) |
I have bad news. |
Same here |
That is terrible. We never had problems like this in the old Vaadin 8 application. Please someone help us! Remove the documentation topic, not only that, it's something very serious that needs to be investigated. |
I would personally try to obtain a debug log of nginx to try to understand what's happening. |
I am fully available to collect the data needed to resolve this issue. Help me, how do I do this? |
I'm not an nginx expert, but I'd check the docs for instructions on that: https://nginx.org/en/docs/debugging_log.html. |
Any update? Still happens sometimes and needs to refresh the page for the application work |
We are going to investigate it more closely in the upcoming development iteration. |
I've managed to reproduce this issue almost consistently. There are a couple of interesting factors that lead into this. I have a pcap and a google chrome debug output and the code that generates the issue.
On the following above, I noticed that in both pcap and and the Google Developer network tab that only a sync for 8 and 10 were generated from the server. In the PCAP I can see that the Websocket port actually generates a FIN packet in between of both the id 8 packet being generated and id 10. Further data however is still being sent on the socket, which is technically fine. I am unclear why the server thinks that Id 9 got generated. But in the specific instance I looked up the FIN was generated and might be related. As a general note, in reading about this issue in other places, it mentions network quality, and I agree to this fact. We're having latency around 300ms to the server and client and slightly high packet loss ~30%. As this is TCP however, it really shouldn't be impacting the order and number of packets being finally received by server and client as re-transmissions should end up succeeding. For most of my code I am already using my UI code as I moved to using I have a PCAP for this I would prefer to hand it over to someone at Vaadin directly as there is likely confidential data within the data. My suspicion therefore is that the Push automated sync messages logic has some server side bug. This was tested on version |
@kagian Please share it, if you wanna see steady progress in this topic. |
Our multi-years Vaadin 7->14 migration work just went in production. During dev/tests period, we had occasionnally this problem, principally when remote working, with a bad network. This problem is very critical, and as someone said, it wasn't observable with the old 7/8 vaadin platform |
This ticket/PR has been released with Vaadin 14.9.0.beta1 and is also targeting the upcoming stable 14.9.0 version. |
This issue has not been resolved. This is complicated, it's been 6 months since my report and it keeps happening, version comes in, version comes out and there is no solution or definitive explanation. |
I've also seen it a few times with 23.3.1 :( |
I just updated to 23.2.9, and the finding is that it's much worse. I will need to go back to the previous version.
|
This item needs to be re-opened, it has not been resolved. |
See the browser log messages, when they happen: Tue Jan 10 2023 16:00:58 GMT-0400 (Horário Padrão do Amazonas) Atmosphere: Firing onClose (closed case) vaadinPush-min.js?v=23.2.3:1 Tue Jan 10 2023 16:00:58 GMT-0400 (Horário Padrão do Amazonas) Atmosphere: invoking .close() on WebSocket object 2vaadinPush-min.js?v=23.2.3:1 Tue Jan 10 2023 16:00:58 GMT-0400 (Horário Padrão do Amazonas) Atmosphere: Firing onReconnect vaadinPush-min.js?v=23.2.3:1 Invoking executeWebSocket, using URL: wss://portal.upcampo.com.br/?v-r=push&v-uiId=0&v-pushId=c72c1567-11f6-4e9f-81ab-d51fd96ba37e&X-Atmosphere-tracking-id=725954af-eeb4-42ca-94a0-7905083d0fec&X-Atmosphere-Framework=3.1.2-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json; charset=UTF-8&X-atmo-protocol=true vaadinPush-min.js?v=23.2.3:1 Websocket successfully opened 2vaadinPush-min.js?v=23.2.3:1 Tue Jan 10 2023 16:01:05 GMT-0400 (Horário Padrão do Amazonas) Atmosphere: Firing onReopen generated-flow-imports.81274417.js:894 WARNING: Since Vaadin 23, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes. notifyResize @ generated-flow-imports.81274417.js:894 |
Curious that it happens a lot more on Mac computers. (in promise) Error: Client is resynchronizing at FlowClient.42a5821f.js:1:42438 We need an urgent solution for this, the situation is becoming unsustainable, many customers are complaining. There are several tickects open for this and no solution: I am ready to help you by providing information. |
If you can reproduce the problem locally, that would probably help a lot. Additionally you can enable trace logging to https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java which would print all information why the server side count increases (A LOT) to find the cause why / how it happens. (This should not be added to a production env) |
@jonasrotilli thanks for willing to help on this issue. Would you be up for a call to discuss and see what is happening on your side? Please email me mikhail@vaadin.com and we can then arrange a meet. We are working on the other issues related to client-server resynchronisation, but since this one is getting worse, we'll work on it asap. |
I don't have the problem locally, only when it's production. |
I sent my data, so we can talk, thanks! |
Could you help me to put this TRACE? It would help me a lot, thanks. |
In Spring Boot for example add this to your application.yml (you probably already have the top level entries): logging:
level:
com.vaadin.flow.component.internal.UIInternals: TRACE
|
I don't use application.yml, I use application.properties, if you have the lines ready, help me! |
@jonasrotilli |
After help from @mshabarov and @mcollovati , they guided me to put version 23.2.13. Thanks for the help! I won't close, so that someone with more knowledge can assess what has been done between these versions. |
#14887 was fixed in 23.2.12 and 23.3.2. There does not seem to be any comments here about newer versions experiencing the problem |
Closed because the issue is not reproduced for author. If anyone would experience the same issue again, please report it here, so we can re-open and investigate, or make a new issue in Flow. |
Intermittently, in PROD environment only, I am seeing: JDK 17 Please help. 2023-12-17T04:58:32.360Z ERROR 7 --- [dbME] [nio-6386-exec-9] c.v.flow.server.DefaultErrorHandler : java.lang.UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 3, got 4. more details logged on DEBUG level. at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:313) ~[flow-server-24.2.3.jar!/:24.2.3] at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:114) ~[flow-server-24.2.3.jar!/:24.2.3] at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-24.2.3.jar!/:24.2.3] at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1522) ~[flow-server-24.2.3.jar!/:24.2.3] at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) ~[flow-server-24.2.3.jar!/:24.2.3] at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) ~[vaadin-spring-24.2.3.jar!/:na] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:642) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:408) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:178) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:51) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.1.1.jar!/:6.1.1] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.16.jar!/:na] at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.2.0.jar!/ |
Description of the bug
I am often getting the message in the log of Resynchronizing UI by client's request.
The full message is:
Resynchronizing UI by client's request. The 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
It's not connection, apparently it's session related.
I have on the same linux server running another Vaadin 8 application.
They have different names, different ports, in different folders and are NGINX-mapped with different subdomains.
I have already evaluated the other problems related to the topic:
#12640
There was no clear solution, someone raised some possibilities:
#12173
In this problem the user uses long duration push. Not my case, I use simple, default @Push.
#11645
In this problem as I understand it was the slow connection. It's not my case, everything is flying here.
#12173
In this problem the user uses long duration push. Not my case, I use simple, default @Push.
#10096
This is a very similar scenario. But there was no conclusion, the user closed without informing how the issue was resolved and if it was resolved.
#9399
This one he solved by changing the server, it is difficult to assess what the problem was
Anyway, this problem is quite recurrent and should be better explained in the documentation. I downloaded the example available from the site, nothing out of the ordinary, little or no extra configuration.
Expected behavior
The expectation is that it doesn't lock the user's screen, it's terrible to have to ask him to refresh the page, because after it's broken it doesn't come back.
Minimal reproducible example
It's hard to simulate, because it doesn't always happen.
The impression is that it happens after a while without changes on the page, but sometimes it happens right after logging in or during some slower operation.
Versions
Vaadin / Flow version: 23.2.0.alpha1
Java version:
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.10.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.10.1, mixed mode, sharing)
OS version:
-Ubuntu
Browser version (if applicable):
Chrome
The text was updated successfully, but these errors were encountered: