tried to move from states terminated to terminated which is not allowed

Ater updating my page I got the following error message :> “tied to move from states terminated to terminated which is not allowed” followed by message “Invalid JSON from server for(;;);[{“syncId”:1487,“clientId”:1,“meta”:{“async”:true},“timings”:[12746,0]

I only get this error on my deployed vaadin client, I do not have it in my development environment.
By observing the logs I have no error neither on my client nor on my server. Yet my client seems stuck with this error.
he is constantly repeating the same request : “”. it’s a 501 error type websocket

I get this error only if my user refreshes the page when he is logged in.
It is connected via a server that uses spring security and uses the session and cookie to retrieve its information. I thought it could be related to the information that is in session but as it works in development I do not believe it too much.
Do you have an idea of what may be causing this problem?

I had the same problem but then I was able to solve it.

In my project, I run Vaadin on an embedded Jetty server. Jetty adds WebSocket support via a ServletContainerInitializer, which is a Service Provider Interface (SPI) from the Servlet spec. Thus, the directory META-INF/services must contain a file called javax.servlet.ServletContainerInitializer which lists all classes implementing that interface. This is the case for the Jetty WebSocket module, so everything should work fine.

However, the problem arises during Maven build if you have multiple dependencies that provide implementations of the interface, since all of them contain a file of the same name in META-INF/services. In my case, this is how support for WebSockets was gone after the build.

I use the maven-shade-plugin to produce a jar file, and after some investigation I found that they already provide a solution to this problem. Namely, you have to tell it to use a ServicesResourceTransformer, which merges SPI files of the same name instead of overriding them (see []
( So your pom.xml should look similar to this:

          <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
        <!-- Other configuration -->