vaadin / framework

Vaadin 6, 7, 8 is a Java framework for modern Java web applications.
http://vaadin.com/
Other
1.78k stars 730 forks source link

SEVERE: Error processing layoutscom.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'ph' of null #7939

Closed vaadin-bot closed 4 years ago

vaadin-bot commented 7 years ago

Originally by christoph.wilhelms


Vaadin version: 7.7.5 Java Version: 1.8 Tomcat: 7.11 Theme: Valo (customized), but also in vanilla valo and standard reindeer Browser: Google Chrome Version 54.0.2840.59 m, but other browsers have the same problem

We have a fairly huge UI build with Vaadin designer in declarative layout. On one of the screens we have multiple tabs. On one of the tabs there is a gridlayout and this is where the problem is! If your browser screen has a specific size, it happens, that the gridlayout is corrupt - all grid content is placed in cell 0, 0 and many of the components rendered below are misplaced aswell.

Further investigation showed, that the Grid-Cell DIV-tags all have:

.v-gridlayout-slot {
    position: absolute;
    line-height: 1.55;
}

but the

element.style {
}

is empty, where normaly the calculated fixed positions are.

In the JavaSript console I see this exception (in addition to some rendering information):

Tue Nov 29 13:34:57 GMT+100 2016 com.vaadin.client.LayoutManager
INFO: Starting layout phase
com.vaadin.DefaultWidgetSet-0.js:6175 Tue Nov 29 13:34:58 GMT+100 2016 com.vaadin.client.LayoutManager
INFO: Measured 51 non connector elements
com.vaadin.DefaultWidgetSet-0.js:6175 Tue Nov 29 13:34:58 GMT+100 2016 com.vaadin.client.ApplicationConfiguration
SEVERE: Exception caught: (TypeError) : Cannot read property 'ph' of nullcom.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) : Cannot read property 'ph' of null
    at Unknown.Hg(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.Lg(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.Rg(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.Lx(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.Ox(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.jx(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.ox(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown._w(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.qib(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.oi(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.ri(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'ph' of null
    at Unknown.C6c(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.QDb(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.kEb(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.RDb(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.iEb(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.ZSc(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.fTc(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.$w(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.sx(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.jx(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.ox(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown._w(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.qib(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.oi(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.ri(com.vaadin.DefaultWidgetSet-0.js)
    at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
zeb @ com.vaadin.DefaultWidgetSet-0.js:6175kfb @ com.vaadin.DefaultWidgetSet-0.js:5594jfb @ com.vaadin.DefaultWidgetSet-0.js:4172LUd @ com.vaadin.DefaultWidgetSet-0.js:1860Zyb @ com.vaadin.DefaultWidgetSet-0.js:6176vi @ com.vaadin.DefaultWidgetSet-0.js:4193ri @ com.vaadin.DefaultWidgetSet-0.js:5243(anonymous function) @ com.vaadin.DefaultWidgetSet-0.js:4767

We'd be greatful for a solution, because our users are already a bit upset ;-). For further information do not hesitate to contact me. I can provide screenshots along with code snippeds or even web remote sessions.


Imported from https://dev.vaadin.com/ issue #20486

vaadin-bot commented 7 years ago

Originally by christoph.wilhelms


Attachment added: GridLayout.png (41.5 KiB) GridLayout.png https://trac-attachments.vaadin.com/trac/20486/GridLayout.png As is and should - sorry for the anonymization...

vaadin-bot commented 7 years ago

Originally by christoph.wilhelms


I forgot to mention, that I've already tried with fix sizes for the GridLayout, which just resulted in more space for the same result as shown in the screeshot... So all Components in the same place.

wiekern commented 7 years ago

will this defect be fixed? I have met a similar defect using Server-Side Grid with Drag and Drop feature. On JS console: Tue May 23 11:09:07 GMT+200 2017 com.vaadin.client.communication.MessageHandler INFO: * Performing server to client RPC calls com.vaadin.DefaultWidgetSet-0.js:6118 Tue May 23 11:09:07 GMT+200 2017 com.vaadin.client.ApplicationConfiguration SEVERE: (TypeError) : Cannot read property 'yb' of undefined com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'yb' of undefined at Unknown.Lgb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.kSb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.OSb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.yvb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.hIb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.aIb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.HHb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.IHb(com.vaadin.DefaultWidgetSet-0.js) at Unknown.FJb(com.vaadin.DefaultWidgetSet-0.js) at Unknown._s(com.vaadin.DefaultWidgetSet-0.js) at Unknown.mt(com.vaadin.DefaultWidgetSet-0.js) at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js) at Unknown.Rh(com.vaadin.DefaultWidgetSet-0.js) at Unknown.Uh(com.vaadin.DefaultWidgetSet-0.js) at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)

hdb @ com.vaadin.DefaultWidgetSet-0.js:6118 oSd @ com.vaadin.DefaultWidgetSet-0.js:5655 nSd @ com.vaadin.DefaultWidgetSet-0.js:3606 uSd @ com.vaadin.DefaultWidgetSet-0.js:3121 ftb @ com.vaadin.DefaultWidgetSet-0.js:6119 Xh @ com.vaadin.DefaultWidgetSet-0.js:4357 Uh @ com.vaadin.DefaultWidgetSet-0.js:5265 (anonymous) @ com.vaadin.DefaultWidgetSet-0.js:3706

Artur- commented 7 years ago

"Cannot read property 'xyz' of null" basically means a NullPointerException on the client side. Most likely a NPE in ph and an NPE in yb are two completely different problems.

To find out the real cause of the problem(s) and a real stack trace, you should run the application using super dev mode. That will produce a stack trace with Java classes and makes it possible to investigate and fix the issue.

When an NPE occurs on the client side, rendering will be interrupted and layout will look broken. It does not indicate where the NPE happened though - can be in any component on the page

wiekern commented 7 years ago

Thanks, is there a tutorial which tells us how to build vaadin project with Super Dev. I just use the DefaultWidget of vaadin 8. I have tried to google "vaadin super dev", it seems that all tutorials teach create a project via building own widget. In addition, I created a GWT config for running my project in Intellij, but there is no GWT module found. If u could give me a tipp, it would be very happy to me.

Artur- commented 7 years ago

If you have a Maven project, it should be enough to run mvn vaadin:run-codeserver, wait for it to compile and then open the application using an additional "?superdevmode" parameter in the URL

wiekern commented 7 years ago

Sorry for disturb. it there a demo pom.xml which i could reference, aiming at running mvn vaadin:runcode-server fluently. I still got errors as follow:

[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:8.1-SNAPSHOT:run-codeserver (default-cli) on project interactiveStance: Command [[ [ERROR] /bin/sh -c '/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/bin/java' '-Xmx512M' '-Xss1024k' '-Dgwt.persistentunitcache=false' 'com.google.gwt.dev.codeserver.CodeServer' '-logLevel' 'INFO' '-sourceLevel' 'auto' [ERROR] ]] failed with status 1 [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:8.1-SNAPSHOT:run-codeserver (default-cli) on project interactiveStance: Command [[ /bin/sh -c '/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/bin/java' '-Xmx512M' '-Xss1024k' '-Dgwt.persistentunitcache=false' 'com.google.gwt.dev.codeserver.CodeServer' '-logLevel' 'INFO' '-sourceLevel' 'auto' ]] failed with status 1 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) at org.codehaus.classworlds.Launcher.main(Launcher.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

stale[bot] commented 6 years ago

Hello there!

It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe.

There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):

Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!

stale[bot] commented 4 years ago

The issue was automatically closed due to inactivity. If you found some new details to it or started working on it, comment on the issue so that maintainers can re-open it.