Design broken with Firefox 15 and beta 2

I’m trying the beta2 and had some issues porting my app to it. After all I got stuck with some JavaScript Errors after my login Screen. When I finally got logged in I could only see my header and menu Bar but the whole content layout was squeezed to one single line. After spending a whole day with it I opened the page today not in my default development browser (firefox 15) but in Google Chrome 22 and finally there was not only my login Screen at the right position (firefox couldn’t center it and showed it in the top left corner) but there was only one JavaScript error left and the whole app rendered absolutely normally as expected.

Are there any known issues with an actual firefox?

There is no known such severe issues with Firefox or any other browser. It sounds like either you are getting a javascript exception in Firefox and this aborts the rendering in the middle, causing everything to look broken, or there is a problem with the new layouts in certain configurations. The first thing you should check is the Firebug console and see if you get a javascript exception. If not, you could investigate the DOM tree and see if there is anything wrong there. If you can extract a test for this, please create a ticket at http://dev.vaadin.com/newticket and attach the test so somebody can take a look.

I got the gwt devmode working with firefox and it tells me the following:


00:00:13,800 [ERROR]
 Failed to load module 'com.vaadin.DefaultWidgetSet' from user agent 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1' at localhost:53426
java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference 	at 
com.google.gwt.dev.javac.JdtCompiler.getCompilerOptions(JdtCompiler.java:411) 	at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.<init>(JdtCompiler.java:228) 	at 
com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:717) 	at 
com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:248) 	at 
com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:463) 	at 
com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:388) 	at 
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:373) 	at 
com.google.gwt.dev.DevModeBase$UiBrowserWidgetHostImpl.createModuleSpaceHost(DevModeBase.java:108) 	at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:197) 	at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) 	at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) 	at java.lang.Thread.run(Thread.java:722)

You have Tomcat or some other jar which contains a conflicting JDT class on your classpath before Vaadin jars. Change the order and you should get the real error.

You were right. I put the Vaadin dependencies now on top of my dependency list in the pom file and now it renders in firefox but there stay some JavaScript problems that I can’t interpret correctly. It shows me an uncaught client side exception and GWT Dev mode gives me the following


java.lang.NullPointerException
	at com.vaadin.client.ui.tabsheet.VTabsheet.isDynamicHeight(VTabsheet.java:651)
	at com.vaadin.client.ui.tabsheet.VTabsheet.updateContentNodeHeight(VTabsheet.java:956)
	at com.vaadin.client.ui.tabsheet.TabsheetConnector.layout(TabsheetConnector.java:93)
	at com.vaadin.client.LayoutManager.doLayout(LayoutManager.java:358)
	at com.vaadin.client.LayoutManager.layoutNow(LayoutManager.java:233)
	at com.vaadin.client.ApplicationConnection$9.execute(ApplicationConnection.java:1349)
	at com.vaadin.client.ApplicationConfiguration.runWhenDependenciesLoaded(ApplicationConfiguration.java:459)
	at com.vaadin.client.ApplicationConnection.handleUIDLMessage(ApplicationConnection.java:1901)
	at com.vaadin.client.ApplicationConnection.handleReceivedJSONMessage(ApplicationConnection.java:1140)
	at com.vaadin.client.ApplicationConnection.handleJSONText(ApplicationConnection.java:792)
	at com.vaadin.client.ApplicationConnection.access$7(ApplicationConnection.java:777)
	at com.vaadin.client.ApplicationConnection$3.onResponseReceived(ApplicationConnection.java:746)
	at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
	at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:570)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:278)
	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
	at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
	at java.lang.Thread.run(Thread.java:722)
java.lang.NullPointerException
	at com.vaadin.client.ui.tabsheet.VTabsheet.isDynamicHeight(VTabsheet.java:651)
	at com.vaadin.client.ui.tabsheet.VTabsheet.updateContentNodeHeight(VTabsheet.java:956)
	at com.vaadin.client.ui.tabsheet.TabsheetConnector.layout(TabsheetConnector.java:93)
	at com.vaadin.client.LayoutManager.doLayout(LayoutManager.java:330)
	at com.vaadin.client.LayoutManager.layoutNow(LayoutManager.java:233)
	at com.vaadin.client.ApplicationConnection$9.execute(ApplicationConnection.java:1349)
	at com.vaadin.client.ApplicationConfiguration.runWhenDependenciesLoaded(ApplicationConfiguration.java:459)
	at com.vaadin.client.ApplicationConnection.handleUIDLMessage(ApplicationConnection.java:1901)
	at com.vaadin.client.ApplicationConnection.handleReceivedJSONMessage(ApplicationConnection.java:1140)
	at com.vaadin.client.ApplicationConnection.handleJSONText(ApplicationConnection.java:792)
	at com.vaadin.client.ApplicationConnection.access$7(ApplicationConnection.java:777)
	at com.vaadin.client.ApplicationConnection$3.onResponseReceived(ApplicationConnection.java:746)
	at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
	at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:570)
	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:278)
	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
	at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
	at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)
	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
	at java.lang.Thread.run(Thread.java:722)

Any idea what could trigger this?

Looks like a hierarchy problem or something similar. VTabsheet is trying to find its connector but the connector is not found. Your best bet would be either to try and figure out why this happens using dev mode or create a reduced test case and post a ticket so somebody else is able to figure something out.

That sounds more of a standard Vaadin bug then. Does everything work as expected? Is it just a JS exception?

Relevant code from VTabsheet is here:

    boolean isDynamicHeight() {
        ComponentConnector paintable = ConnectorMap.get(client).getConnector(
                this);
        return paintable.isUndefinedHeight();
    }

paintable == null would match up with the error message.

Maybe you should file a ticket to dev.vaadin.com. If it is just a stacktrace and everything works, then it might be a bug that has mostly gone unnoticed when it doesn’t affect anything.

Unfortunately it’s not just the stack trace. Everytime this happens I get an ErrorNotification telling me that there is an uncaught client side exception. When I close the notifications I have to refresh the browser and then there is the view shown that I expected.

Can you isolate the issue into a testcase?

I wrote a minimal example and on the way I discovered that my problem seems to be triggered because I’m using CDI/Weld in my application. I made a UI class that injects a window with a button. When you click the button a second window gets injected and shown and there you get the first javascript exception (no matter if you use chrome or firefox btw.). When you close the error Notification you will see that the ui won’t get refresehed. You have to hit f5 and then the second window is completely shown. In the second window I placed a button that should close the window itself when it is pushed. When you push it there will be another JacaScript exception and again the UI is not refresehd and the window stays there until you hot f5 (refresh your browser).

This behaviour looks very similar to something w had with Vaadin 6.7.0 (http://dev.vaadin.com/ticket/7774) but nothing like this happend in the Vaadin 7 alpha3. It came up again after switching to beta.

You can donwload the sample here https://github.com/areyouready/vaadin7betaTest

I upgraded the example to beta 3. Same behaviour as with beta 2.

This could be caused by some scoping issues with CDI which causes the same server-side component to have multiple identities or something like that. The guys working on
https://github.com/vaadin/vaadin-cdi-integration
discovered that various strange issues related to injected components disappeared once they implemented support for a UI specific scope and ensured that the components were injected with that scope (e.g. the default dependent scope should do this once the UI scope is in place).

You could have a look at their code or maybe even use their integration directly?

Thanks for the information. We were just a little surprised as there were no such errors with th alpha versions when we used CDI (we knew of some limitations for which we want to provide an own scope too). I’m not sure if it makes much sense to integrate the half done work there by hand if it will come to the framework as well. I think I will ive with that errors until that project is finished.

edit: Are there any chances that this will be done until the Vaadin 7 final release?

Though I can’t really tell what it is that has changed since alpha versions so that these problems have appeared, I do still suspect that the problem is somehow related to the identify of injected components. To investigate further, I suggest adding some logging to track when injected instances are instantiated and used with special attention on their component ids.

The Vaadin-CDI project will most likely be released as an official add-on quite soon. The core functionality should be quite stable at this point and the only features that are planned but not yet implemented are related to maybe integrating support for JAAS.

Thanks for the information, I will checkout the CDI-Integration Project and try it on monday.