Vaadin XS - Problem with the Browser Update Button in Firefox and Chrome

I have just got the addon working in my project. Unfortunately it does not run properly.
If I update the site over the browser, there is a chance of 40% that I get an error message in a popup:

Server drops Exception:

Jan 25, 2012 12:19:53 AM com.vaadin.Application terminalError
Schwerwiegend: Terminal error:
java.lang.RuntimeException: Decryption of client messaged failed
	at com.vaadin.addons.xs.server.JsonpCommunicationManager.decryptMessage(JsonpCommunicationManager.java:167)
	at com.vaadin.addons.xs.server.JsonpCommunicationManager.getRequestPayload(JsonpCommunicationManager.java:141)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1279)
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:763)
	at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
	at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
	at com.vaadin.addons.xs.server.XSApplicationServlet.service(XSApplicationServlet.java:97)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Missing argument
	at javax.crypto.spec.SecretKeySpec.<init>(SecretKeySpec.java:93)
	at com.vaadin.addons.xs.server.JsonpCommunicationManager.decryptMessage(JsonpCommunicationManager.java:158)
	... 27 more

After that the loading indicator inside my vaadin application is loading and changing its color (green 1second, yellow 1second, red 1second). After that the red popup appears with the message: Communication problem… could not connect to application server. After clicking on the popup or reloading the page in the browser the application loads normally without any errors. But if I update the application over the browser, the same story happens again.
I have produced this behavior with servers tomcat and jetty and browsers firefox (50% chance for the error) and chrome (30%). I have also tried IE9, but with IE9 was everything fine. Ive tried the vaadin application embedded in a website and in standard version, the behavior did not changed.
I run vaadin 6.7.1 with Spring Roo.
My Widgetset:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>

    <inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
    <inherits name="com.vaadin.addons.xs.gwt.XSWidgetSet" />
    
</module>

I havent tried it without Spring Roo, but I do not think thats a Roo problem, because in IE9 works everything fine.
Between my tests I cleared the browser cache, used ?restartApplication, but it did not change anything.
Anybody knows where the problem is?

// Edit I have forgotten to say, that I have used Firefox 9.0.1 and Chome 16.0.012.75 m
// And the Problem seems to effect not only the browser update button. Sometimes after some clicking through the gui the problem occures too.

kind regards

Vlad

Hi,

As you might have noted, the XS encrypts the payload from client to server (due to it ends up into the server log). Based on the stack trace it looks like the encryption key is missing for some reason.

I have never seen this kind of issue (and neither have never heard about this). If I could reproduce it somehow (even just with browsers), I might get an idea what happens here. If you need quick help with this, I’d suggest to
go for Pro
and contact one of our Vaadin experts directly.

cheers,
matti

Vlad, did you solve the problem? I’m stuck with something similar.