On Thursday, September 15, 2016 at 11:07:42 AM UTC+2, Thomas Lacroix wrote:
> Hi,
> I have an app that automatically reports "Uncaught exception" encountered 
> by users.
> It has been compiled with GWT2.8RC2 and in prod for a few days and it has 
> been reporting a couple of "Uncaught exception" as follow:
>  - Uncaught exception: 
> com.google.gwt.useragent.client.UserAgentAsserter$UserAgentAssertionError: 
> Possible problem with your *.gwt.xml module file.
> The compile time user.agent value (safari) does not match the runtime 
> user.agent value (gecko1_8).
> Expect more errors.
>  - User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 
> (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
> I am not sure what that means, if this is a serious error and I am not 
> able to reproduce it in my environnement. Any help ?
> I didn't get this error reported prior to compliation with GWT2.8RC2 (I 
> used 2.4, 2.6, and 2.7) but that might be a coincidence.

That error generally means that you have compiled your app with a limited 
set of supported user.agent values (e.g. only one, during development) but 
run it in a user agent that's not in the list.
The "compile time user.agent value" comes from the permutation that's being 
used, and the "runtime user.agent value" is computed at runtime.
They should generally be the same value, because the same computation is 
done to select the appropriate permutation; but if you somehow "bypass" 
that computation by only compiling for a single user.agent (generally to 
speed up compilation during development / debugging), then you might be in 
that situation that they're different.

What's strange here is that the "runtime user.agent value" is gecko1_8 
whereas you're using Chrome (so should be "safari").

Could it be, maybe, someone spoofing his user agent in Chrome to look like 
Firefox and only reloading the hidden iframe after changing the user agent? 
(so the permutation has already been selected for Chrome, but the runtime 
value is now for Firefox)
Or maybe a Firefox user spoofing to look like Chrome but in a broken way 
such that the hidden iframe the GWT code runs in does not see the spoofed 
user.agent (so the top-level window looks like Chrome and selects the 
'safari' permutation –compile time user.agent value– but the iframe sees 
the real user.agent and looks like Firefox –runtime user.agent value) ? 
(that very old Chrome version hints that this could be the case)

FYI, you can disable this with <set-configuration-property 
name="user.agent.runtimeWarning" value="false"/> but I would keep it if I 
were you.

Maybe add the permutation ID (
to the log so you can later compare with your compilation-mappings.txt and 
access logs to see if it's possibly a bug in GWT (I doubt it, but who 
Also, based on compilation-mappings.txt, maybe have a look at your access 
logs to see if some user agents load an unexpected permutation, and 
possibly cross-check with other requests from the same user agent (or if 
you trace users with a cookie and have that in your logs, use that to 
possibly find if some people are spoofing the user agent: multiple requests 
by the same user/session with different user agents for instance)

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+unsubscr...@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.

Reply via email to