flow
flow copied to clipboard
Using Push with long-polling gives "Resynchronizing UI by client's request"
Steps to reproduce
- Download a starter for V14 + Springboot
- Add
@Push(transport = Transport.LONG_POLLING)
to the main layout - Add some background thread which updates something on the UI every second
Actual behavior
- When the browser is opened in dev mode, nothing happens in the UI (it is not updated by the background thread)
- When you trigger a server roundtrip (e.g. by clicking a button), then the behavior described by the @HayoBaanAtHand happens ("Resynchronizing UI by client's request" messages in the server, ...) until we refresh the page
- The same behavior happens sometimes when you have the application opened in several browser tabs and you restart the server
- Once the server is running, if you do open a new tab and navigate to the application, it works as expected
Original ticket https://github.com/vaadin/flow/issues/10931.
Hi, I met the same issue as you described, You might can't reproduce them again at pure V14+ following your steps, I upgraded from vaadin 7 and remain the old configuration codes like:
@WebServlet(urlPatterns = "/*", asyncSupported = true, initParams = { @WebInitParam(name = "UIProvider", value = "com.vaadin.cdi.CDIUIProvider"), @WebInitParam(name = "heartbeatInterval", value = "300"), @WebInitParam(name = "closeIdleSessions", value = "false"), @WebInitParam(name = "org.atmosphere.cpr.asyncSupport", value = "org.atmosphere.container.BlockingIOCometSupport"), @WebInitParam(name = "resourceCacheTime", value = "86400")
mainwhile still keep the vaadin 14+ configuration '@Push(transport = Transport.LONG_POLLING)', the errror shows successful.
So I remove the vaadin 7 configuration codes then it works well now 💯
I hope these clues can help you :)
Reproducable on 23.3.1 and 24.0.0-alpha6 as well.
It seems the issue has been resolved by #15517 Cannot reproduce anymore with 14.9.5, 23.3.3 and 24.0.0.alpha9