Tuesday, September 27, 2016

Re: [GWT 2.8 SHNAPSHOT] missing stack trace for 'Should only call onDetach when the widget is attached to the browser's document'

Thanks for reaching out. I only need the stack trace in SDM for now, and I am using the latest GWT 2.8-SNAPSHOT. 
I know about the -XmethodNameDisplayMode flag and tried all its options to no avail, which makes me think that the issue is somewhere else ...

I googled the exception root, and it seems to come from:

java.lang.IllegalStateException: Should only call onDetach when the widget is attached to the browser's document
at com.google.gwt.user.client.ui.Widget.onDetach

When you look at c.g.g.user.client.ui.Widget.onDetach(), one could question if it is really all that necessary to throw exception when the widget is not attached (instead of just do nothing), but that is beyond the point.

The real issue is that SDM (or Chrome Version 53.0.2785.116 m) fails to map the stack trace back to Java sources, making it impossible to trace issues like that. The obfuscated stack trace is not even clickable and i do not understand how it maps back to Java to do this manually . I can see all of my, generated and GWT source codes in the Chrome/Sources tab,  which makes me believe that all source maps are available to the SDM server.


On Tuesday, September 27, 2016 at 6:05:37 AM UTC-7, Paul Stockley wrote:
Is this in a production build or SDM? In SDM you can pass the flag -XmethodNameDisplayMode ABBREVIATED. Then in chrome you will see class/method names in the call stack

On Monday, September 26, 2016 at 5:24:25 PM UTC-4, Hristo Stoyanov wrote:
Hi all,
I wonder if anyone can help me figure out what is causing this - I am getting java.lang.IllegalStateException: Should only call onDetach when the widget is attached to the browser's document . See below. I suspect this is a GWT exception of some kind, but the stack trace is obfuscated and I can not figure out where the problem is. I tried installing my exception handler with no success - the stack trace is still useless:

 Console.log("Exception logger INSTALLED!!!");
        GWT.setUncaughtExceptionHandler(e -> {
            GWT.log("Unhandled exception", e);

This is happening with Errai 4 SNAPSHOT randomly, but if I figure out the stack trace I can get better understanding of what is going on. How do I get the stack trace ? How do I verify that the gwt Code server has all source maps it needs???



Current content widget vanished or changed. Not delivering pageHiding event to HomePage.
ErraiConsoleLogHandler.java:87 14:11:26 WARNING [DefaultNavigatingContainer] Got invalid page name "AboutPage". Redirecting to default page.
ErraiConsoleLogHandler.java:87 java.lang.IllegalStateException: Should only call onDetach when the widget is attached to the browser's document
at Unknown.nC_g$(myApp-0.js@8:16163)
at Unknown.TC_g$(myApp-0.js@9:16405)
at Unknown._C_g$(myApp-0.js@9:16452)
at Unknown.kLf_g$(myApp-0.js@9:47908)
at Unknown.WBe_g$(myApp-0.js@18:37314)
at Unknown.aCe_g$(myApp-0.js@14:37371)
at Unknown.nCe_g$(myApp-0.js@14:37481)
at Unknown.ZPj_g$(myApp-0.js@8:114529)
at Unknown.ZBe_g$(myApp-0.js@36:37344)
at Unknown.WPj_g$(myApp-0.js@16:114507)
at Unknown.aOj_g$(myApp-0.js@17:113981)
at Unknown.iAi_g$(myApp-0.js@3:88783)
at Unknown.jAi_g$(myApp-0.js@15:88755)
at Unknown.y2i_g$(myApp-0.js@32:98783)
at Unknown.A2i_g$(myApp-0.js@17:98822)
at Unknown.c6i_g$(myApp-0.js@45:99823)
at Unknown._5i_g$(myApp-0.js@10:99802)
at Unknown.KAi_g$(myApp-0.js@32:88955)
at Unknown.L6i_g$(myApp-0.js@16:100106)
at Unknown.B7i_g$(myApp-0.js@54:100343)
at Unknown.AJj_g$(myApp-0.js@225:112594)
at Unknown.PDj_g$(myApp-0.js@30:110774)
at Unknown.QDj_g$(myApp-0.js@8:110787)
at Unknown.SDj_g$(myApp-0.js@8:110800)
at Unknown.FDj_g$(myApp-0.js@10:110638)
at Unknown.Sii_g$(myApp-0.js@261:83179)
at Unknown.lambda_0_g$(myApp-0.js@27:96)

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment