flow
flow copied to clipboard
UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 3, got 4
Description of the bug
I posted this issue on an old, closed thread. Perhaps that was not the right place for me to post it. Therefore I am now posting it on this new thread.
For reference, the old thread is: https://github.com/vaadin/flow/issues/14232#issuecomment-1859207755
and I had posted there b/c the error mentioned there seems similar to the one I am seeing now. Here are the details:
I see this error intermittently when trying to login to my Vaadin Flow application. I see it only in my production environment. Thanks an advance for any help/feedback/input.
Intermittently, in PROD environment only, I am seeing: UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 3, got 4
JDK 17 Spring Boot 3.2.0 Vaadin 24.2.4
Please help. Here is most of the stacktrace:
2023-12-17T04:58:32.360Z ERROR 7 --- [dbME] [nio-6386-exec-9] c.v.flow.server.DefaultErrorHandler :
java.lang.UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 3, got 4. more details logged on DEBUG level.
at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:313) ~[flow-server-24.2.3.jar!/:24.2.3]
at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:114) ~[flow-server-24.2.3.jar!/:24.2.3]
at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-24.2.3.jar!/:24.2.3]
at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1522) ~[flow-server-24.2.3.jar!/:24.2.3]
at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) ~[flow-server-24.2.3.jar!/:24.2.3]
at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) ~[vaadin-spring-24.2.3.jar!/:na]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:642) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:408) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:178) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:51) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.1.1.jar!/:6.1.1]
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.16.jar!/:na]
at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.2.0.jar!/
Expected behavior
I would expect this error to not happen at all. It is totally within Vaadin... my code is not in the stacktrace so I have no way to even catch it.
Minimal reproducible example
It is intermittent. It happens when I am trying to login to my application using a LoginView that is integrated with Spring Security and which works fine locally, and even works most of the time in PROD.
Versions
JDK 17 Spring Boot 3.2.0 Vaadin 24.2.4 Chrome Browser 120.0.6099.109 (Official Build) (64-bit) running on Windows 10 Enterprise 64bit
@dbMe1 thanks for the issue! Could you please provide us your reverse proxy configuration and, if possible, the minimal reproducible code example?
Thanks for trying to help.
AFAIK I am not using any reverse proxy, and as I said, it is not something that I can reproduce at-will. I realize this makes it really hard, if not impossible, to solve. When I reported it, all I was doing was logging into my Vaadin Flow application. My LoginView has code starts off like this:
===
@SpringComponent @UIScope @Route("/login") @PageTitle("Login") @AnonymousAllowed public class LoginView extends VerticalLayout implements BeforeEnterObserver {
===
So far today, it has not happened. You see the stacktrace has no mention of my own code.. it is all happening between the Vaadin Client Engine and the Vaadin back-end.
I enter username and password, hit the Login button and the issue would occur. The behavior in the UI was as if pressing the Login Button did nothing other than to clear out the user/pass fields, but no error in the UI about the user/pass being wrong or anything like that. Just nothing... and on the server side I had the stacktrace I have shared.
Matt M.
On Tue, Dec 19, 2023 at 7:09 AM Mikhail Shabarov @.***> wrote:
@dbMe1 https://github.com/dbMe1 thanks for the issue! Could you please provide us your reverse proxy configuration and, if possible, the minimal reproducible code example?
— Reply to this email directly, view it on GitHub https://github.com/vaadin/flow/issues/18326#issuecomment-1862642284, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEHRLVIPU5OF5CMFMEKGHWTYKF7WFAVCNFSM6AAAAABAZW2DOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGY2DEMRYGQ . You are receiving this because you were mentioned.Message ID: @.***>
I am wondering if maybe it could be related to network latency and if so... if there might be some vaadin setting that I could configure to help ensure it either stops happening (best) or becomes much less likely to happen (2nd best).
Matt M.
On Tue, Dec 19, 2023 at 11:00 PM Matthew McGinty @.***> wrote:
Thanks for trying to help.
AFAIK I am not using any reverse proxy, and as I said, it is not something that I can reproduce at-will. I realize this makes it really hard, if not impossible, to solve. When I reported it, all I was doing was logging into my Vaadin Flow application. My LoginView has code starts off like this:
===
@SpringComponent @UIScope @Route("/login") @PageTitle("Login") @AnonymousAllowed public class LoginView extends VerticalLayout implements BeforeEnterObserver {
===
So far today, it has not happened. You see the stacktrace has no mention of my own code.. it is all happening between the Vaadin Client Engine and the Vaadin back-end.
I enter username and password, hit the Login button and the issue would occur. The behavior in the UI was as if pressing the Login Button did nothing other than to clear out the user/pass fields, but no error in the UI about the user/pass being wrong or anything like that. Just nothing... and on the server side I had the stacktrace I have shared.
Matt M.
On Tue, Dec 19, 2023 at 7:09 AM Mikhail Shabarov @.***> wrote:
@dbMe1 https://github.com/dbMe1 thanks for the issue! Could you please provide us your reverse proxy configuration and, if possible, the minimal reproducible code example?
— Reply to this email directly, view it on GitHub https://github.com/vaadin/flow/issues/18326#issuecomment-1862642284, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEHRLVIPU5OF5CMFMEKGHWTYKF7WFAVCNFSM6AAAAABAZW2DOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGY2DEMRYGQ . You are receiving this because you were mentioned.Message ID: @.***>
It just happened again 2023-12-20T22:46:16.011Z ERROR 7 --- [dbME] [nio-6386-exec-3] c.v.flow.server.DefaultErrorHandler : @replica: 8176016e-94a8-4e52-8b46-0b5ccb4161c3
java.lang.UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 3, got 4. more details logged on DEBUG level.
I cleared my browser cookies and tried login again and then it worked. I'm not sure if that is really what solved it or not b/c when the issue was happening a few days ago, I did not clear cookies and after 3 or 4 attempts it would work.
I (and all my users) logout by clicking this logout button:
Button logout = new Button("Logout", click -> authContext.logout());
authContext in this case is an instance of import com.vaadin.flow.spring.security.AuthenticationContext;
so I think I will adjust my code for the Button to something like this and see if it helps:
Button logout = new Button("Logout", click -> {
authContext.logout();
ViewUtil.killSession();
});
where the killSession method does this:
public static void killSession() {
if (VaadinSession.getCurrent() == null) {
return;
}
WrappedSession wrappedSession = VaadinSession.getCurrent().getSession();
if (wrappedSession != null) {
wrappedSession.invalidate();
}
}
upon closer examination I see that the call to authContext.logout() is already killing the session for me (which is what I would expect anyway). So I suppose the issue has nothing to do with the session.
this appears to be the same elusive issue reported here: https://github.com/vaadin/flow/issues/16664
surely you guys can catch this and do something to have the client and server sides get synced up and recover on their own?? This keeps happening to me (intermittent). If I wait about 3 or 4 minutes and try again, it will often work.
I will need to keep testing, but after about 1 hour of testing it appears that I may have just fixed this issue by sidestepping it... by removing this code from my LoginView:
loginForm.addLoginListener(event -> { try { ViewUtil.recaptchaChallenge(reCaptchaService, Constants.SITE_ACTION_NAME_LOGIN, () -> { }); } catch (Exception e) { ViewUtil.notifyFailure(e); }
The recaptchaChallenge method is one that I used in other Views and it works fine there, but since it has consistently been the LoginView that shows this issue I figured to remove that block from LoginView just trying to simplify it and see.
The recaptchaChallenge involves invoking some javascript from the backend/java side, and using Vaadin's support for doing that, and even getting the return value from the javascript function... so surely that would be some back and forth between the client engine and the server side. So by removing it from the LoginView, so far I'm no longer seeing the error.
Time will tell.
I am getting the same error once the user log out after first login and tries to login again. login screen is displayed again. using spring boot with spring security. any updates or work around ?
java.base/java.lang.Thread.run(Thread.java:833) 2024-01-14T23:20:03.205+01:00 TRACE 35264 --- [nio-8080-exec-4] c.v.flow.component.internal.UIInternals : Increment syncId 2 -> 3: com.vaadin.flow.component.internal.UIInternals.incrementServerId(UIInternals.java:331) com.vaadin.flow.server.communication.UidlWriter.createUidl(UidlWriter.java:200) com.vaadin.flow.server.communication.UidlRequestHandler.createUidl(UidlRequestHandler.java:155) com.vaadin.flow.server.communication.UidlRequestHandler.writeUidl(UidlRequestHandler.java:145) com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:115) com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1522) com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:642) org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:408) org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313) org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277) org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:178) org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:51) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011) org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:117) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) java.base/java.lang.Thread.run(Thread.java:833)
Unsure if this is all the same problem, but this has started to appear as well in our QA environment since a couple of weeks. Locally it never happens, we deploy on openshift so it could point to a network component in the middle doing something. However, this is a very recent issue, we have been deploying in our QA for over six months and it never happened. There is no login page involved here and it happens upon first access. JDK17, Vaadin 24.3.0 as well as 24.3.2
exception: {"detailMessage":"Unexpected message id from the client. Expected sync id: 1, got 2. more details logged on DEBUG level.","exceptionClass":"java.lang.UnsupportedOperationException","fileName":"ServerRpcHandler.java","lineNumber":"314","methodName":"handleRpc"} logger: com.vaadin.flow.server.DefaultErrorHandler message: java.lang.UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 1, got 2. more details logged on DEBUG level. at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:314) at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:114) at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1573) at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)
I have this problem related. Only happens at the login page in production behind a proxyreversed, if i execute without a proxy goes well.
2024-01-27T12:59:56.335+01:00 DEBUG 64759 --- [nio-8099-exec-6] c.v.f.s.communication.ServerRpcHandler : Eager UI close ignored for @PreserveOnRefresh view 2024-01-27T13:00:57.629+01:00 DEBUG 64759 --- [nio-8099-exec-9] c.v.f.s.communication.ServerRpcHandler : UI closed with a beacon request 2024-01-27T13:01:08.377+01:00 DEBUG 64759 --- [nio-8099-exec-9] c.v.f.s.communication.ServerRpcHandler : Unexpected message id from the client. Expected sync id: 5, got 6. Message start: 2024-01-27T13:01:08.380+01:00 ERROR 64759 --- [nio-8099-exec-9] c.v.flow.server.DefaultErrorHandler :
java.lang.UnsupportedOperationException: Unexpected message id from the client. Expected sync id: 5, got 6. more details logged on DEBUG level. at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:314) ~[flow-server-24.3.3.jar!/:24.3.3] at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:114) ~[flow-server-24.3.3.jar!/:24.3.3] at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-24.3.3.jar!/:24.3.3] at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1573) ~[flow-server-24.3.3.jar!/:24.3.3] at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398) ~[flow-server-24.3.3.jar!/:24.3.3] at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106) ~[vaadin-spring-24.3.3.jar!/:na] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:642) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:408) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:277) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:141) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:178) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:51) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.0.13.jar!/:6.0.13] at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:117) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.1.5.jar!/:6.1.5] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268) ~[spring-web-6.0.13.jar!/:6.0.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.13.jar!/:6.0.13] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.13.jar!/:6.0.13] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:340) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1744) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.15.jar!/:na] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.15.jar!/:na] at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
2024-01-27T13:04:55.940+01:00 DEBUG 64759 --- [nio-8099-exec-5] c.v.f.s.communication.ServerRpcHandler : UI closed with a beacon request 2024-01-27T13:04:58.182+01:00 DEBUG 64759 --- [nio-8099-exec-6] c.v.f.s.communication.ServerRpcHandler : UI closed with a beacon request 2024-01-27T13:05:26.499+01:00 DEBUG 64759 --- [nio-8099-exec-8] c.v.f.s.communication.ServerRpcHandler : UI closed with a beacon request
I have testesd with a spring vaadin 24.3.3 vaadin starter, where the view /about is set to permitall, if i sign behind a proxy in apache does not work, without a proxy goes well, is there a good configuration for a proxy in a apache that works?