flow icon indicating copy to clipboard operation
flow copied to clipboard

Using Push with long-polling gives "Resynchronizing UI by client's request"

Open mshabarov opened this issue 2 years ago • 1 comments

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.

mshabarov avatar Oct 27 '21 07:10 mshabarov

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 :)

liubin508 avatar Dec 28 '21 03:12 liubin508

Reproducable on 23.3.1 and 24.0.0-alpha6 as well.

tepi avatar Dec 23 '22 10:12 tepi

It seems the issue has been resolved by #15517 Cannot reproduce anymore with 14.9.5, 23.3.3 and 24.0.0.alpha9

mcollovati avatar Jan 26 '23 13:01 mcollovati