How to avoid "Confirmed duplicate message from the client." and "RPC for no

I see these errors occasionally. It seems to happen more often (perhaps only, but not sure) on more complex forms including:

  • Pages with tabs (the tabs set div elements to visible/not visible based on tab selection)
  • Pages that include a mix of polymer and server-side added components
  • Pages that include lazy-loaded components/data (e.g. components are not added until tab is clicked)

It also seems to be more likely to happen if the user navigates “really fast”. For example, clicking a tab immediately after the form has loaded.

Are there any clues to what can be done to prevent these errors?


2019-03-15 22:07:37.745  WARN 30240 --- [nio-8080-exec-7]
 c.v.f.s.c.r.AbstractRpcInvocationHandler : Got an RPC for non-existent node: 603
2019-03-15 22:07:37.797 ERROR 30240 --- [io-8080-exec-10]
 c.v.flow.server.DefaultErrorHandler      : 

java.lang.UnsupportedOperationException: Confirmed duplicate message from the client. Expected sync id: 24, got 23. Message start: {"csrfToken":"0a0f9d3f-abec-49d0-b72f-a9e4ecdf3a15","rpc":[{"type":"publishedEventHandler","node":603,"templateEventMethodName":"select","templateEventMethodArgs":["3"]
},{"type":"publishedEventHandler","node":603,"templateEventMethodName":"setDetailsVisible","templateEventMethodArgs":["3"]
}],"syncId":23,"clientId":23}
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:303) ~[flow-server-1.4.2.jar:1.4.2]

	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:89) ~[flow-server-1.4.2.jar:1.4.2]

	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-1.4.2.jar:1.4.2]

	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1507) ~[flow-server-1.4.2.jar:1.4.2]

	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:242) [flow-server-1.4.2.jar:1.4.2]

	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:81) [vaadin-spring-11.0.0.jar:na]

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]


I would be interested in this as well.

There’s a github ticket for it here:

https://github.com/vaadin/flow/issues/3809#issuecomment-486197580

see https://vaadin.com/forum/thread/17497392/18278820