flow: Full resynchronization of client is not implemented

Occasionally, due to connectivity issues, client RPCs might get duplicated (?) or lost (?) (according to the ServerRpcHandler.handleRpc). The server must initiate client resync in this case, but it’s not there yet.

No matter what, the exception is thrown instead.

java.lang.UnsupportedOperationException: FIXME: Implement resync and call it above
at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:298)
at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:87)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 25 (18 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you, @mpilone, for sharing.

I implemented a very poor workaround that handles the resynchronization request and simply sends a full refresh command to the client. It is far from perfect and not the correct implementation, but I rather have the user’s page reload than have them see an internal error notification and call our help desk. You might be able to use it directly or at least get some ideas for your own workaround.

You can use it by implementing VaadinServiceInitListener and adding the handler in the serviceInit method like:

// This is a workaround for bug:
// https://github.com/vaadin/flow/issues/2210
serviceInitEvent.addRequestHandler(new RefreshingResynchronizeHandler());

RefreshingResynchronizeHandler.java.zip