flow: Unexpected message id from the client with Vaadin 24.7.3
Description of the bug
Since upgrading from Vaadin 24.5.3 to 24.7.3 I receive a UnsupportedOperationException: Unexpected message id from the client during the execution of automated tests using Vaadin’s Testbench.
The tests are running in parallel using a dynamic Selenium Grid that spawns new Firefox / Chrome containers for each individual test execution.
Similar bug reports have been made in the past (such as https://github.com/vaadin/flow/issues/12640) and according to https://github.com/vaadin/flow/issues/12640#issuecomment-2850005150 it should have been fixed in Vaadin 24.7+. For me it looks like the new logic introduced a new bug since my tests broke after updating the Vaadin version.
Expected behavior
The push mechanism should work without throwing exceptions
Minimal reproducible example
This seems to happen every time I execute the tests since upgrading to Vaadin 24.7.3 but my application is too big and complex to upload a reproducible example. In the logs I can see the following:
2025-05-22 11:45:04,434 DEBUG [com.vaadin.flow.server.communication.ServerRpcHandler] (default task-18) Received old duplicate message from the client. Expected: 16, got: 15. Resending previous response.
2025-05-22 11:45:04,605 DEBUG [com.vaadin.flow.server.communication.ServerRpcHandler] (default task-18) Unexpected message id from the client. Expected client id: 16, got 15. Message start: { type: event node: 71.0 feature: null }
2025-05-22 11:45:04,607 ERROR [com.motives.pulsepro.ui.infrastructure.UncaughtExceptionHandler] (default task-18) error: Caught <class java.lang.UnsupportedOperationException>:
Exception-Msg: <Unexpected message id from the client. Expected client id: 16, got 15. more details logged on DEBUG level.>
Add. Info: <Uncaught exception!>
java.lang.UnsupportedOperationException: Unexpected message id from the client. Expected client id: 16, got 15. more details logged on DEBUG level.
at deployment.SynapticaOS.ear.SynapticaOSUI.war//com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:365)
at deployment.SynapticaOS.ear.SynapticaOSUI.war//com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:138)
at deployment.SynapticaOS.ear.SynapticaOSUI.war//com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:63)
at deployment.SynapticaOS.ear.SynapticaOSUI.war//com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1664)
at deployment.SynapticaOS.ear.SynapticaOSUI.war//com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398)
at deployment.SynapticaOS.ear.SynapticaOSUI.war//com.vaadin.cdi.CdiVaadinServlet.service(CdiVaadinServlet.java:66)
at jakarta.servlet.api@6.0.0//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
at io.undertow.websocket@2.3.13.Final//io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:172)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at org.wildfly.security.elytron-web.undertow-server@4.1.0.Final//org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.lambda$handleRequest$1(ElytronRunAsHandler.java:68)
at org.wildfly.security.elytron-base@2.4.1.Final//org.wildfly.security.auth.server.FlexibleIdentityAssociation.runAsFunctionEx(FlexibleIdentityAssociation.java:103)
at org.wildfly.security.elytron-base@2.4.1.Final//org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:161)
at org.wildfly.security.elytron-base@2.4.1.Final//org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:73)
at org.wildfly.security.elytron-web.undertow-server@4.1.0.Final//org.wildfly.elytron.web.undertow.server.ElytronRunAsHandler.handleRequest(ElytronRunAsHandler.java:67)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.core@2.3.13.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.core@2.3.13.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
at io.undertow.core@2.3.13.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at org.wildfly.security.elytron-web.undertow-server-servlet@4.1.0.Final//org.wildfly.elytron.web.undertow.server.servlet.CleanUpHandler.handleRequest(CleanUpHandler.java:38)
at io.undertow.core@2.3.13.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:44)
at io.undertow.core@2.3.13.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:51)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)
at io.undertow.core@2.3.13.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:276)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:132)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1421)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1421)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1421)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1421)
at org.wildfly.extension.undertow@32.0.0.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1421)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:256)
at io.undertow.servlet@2.3.13.Final//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:101)
at io.undertow.core@2.3.13.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
at io.undertow.core@2.3.13.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at org.jboss.xnio@3.8.14.Final//org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
at java.base/java.lang.Thread.run(Thread.java:1583)
Versions
- Vaadin / Flow version: 24.7.3
- Java version: 21
- OS version: Windows 11
- Browser version (if applicable): Chrome 134.0.6998.35, Firefox 136.0
- Application Server (if applicable): Wildfly 32
- IDE (if applicable):
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 37
Commits related to this issue
- chore: prevent sync id to be updated on queued messages Makes sure that syncId is not updated when resending a queued message. Perhaps related to #21493 — committed to vaadin/flow by mcollovati a year ago
- chore: prevent sync id to be updated on queued messages (#21545) Makes sure that syncId is not updated when resending a queued message. Perhaps related to #21493 — committed to vaadin/flow by mcollovati a year ago
- chore: prevent sync id to be updated on queued messages (#21545) Makes sure that syncId is not updated when resending a queued message. Perhaps related to #21493 — committed to vaadin/flow by mcollovati a year ago
- chore: prevent sync id to be updated on queued messages (#21545) Makes sure that syncId is not updated when resending a queued message. Perhaps related to #21493 — committed to vaadin/flow by mcollovati a year ago
- chore: prevent sync id to be updated on queued messages (#21545) (#21550) Makes sure that syncId is not updated when resending a queued message. Perhaps related to #21493 Co-authored-by: Marco Coll... — committed to vaadin/flow by vaadin-bot a year ago
- chore: prevent sync id to be updated on queued messages (#21545) (#21551) Makes sure that syncId is not updated when resending a queued message. Perhaps related to #21493 Co-authored-by: Marco Coll... — committed to vaadin/flow by vaadin-bot a year ago
Feel free to ask everything - no, we don’t touch anything from
UIInternals.