Problems with user agent property in GWT 2.6

2,606 views
Skip to first unread message

manya mohanan

unread,
Mar 19, 2014, 11:59:39 AM3/19/14
to google-we...@googlegroups.com

Hi all,

 

I just migrated our project from GWT 2.5.0 to GWT 2.6.0.   We are using Java 6.

 

The application works fine after the migration in Firefox, but does not work in IE9.

 

The gwt module fails to load and I get the below error in IE9:

 

00:45:05.664  [ERROR] Error while executing the JavaScript provider for property 'user.agent'

00:45:05.665  [ERROR] Unable to find value for 'user.agent'

00:45:05.665  [ERROR] Deferred binding failed for 'com.google.gwt.useragent.client.UserAgent'; expect subsequent failures

00:45:05.739  [ERROR] Unable to load module entry point class com.google.gwt.useragent.client.UserAgentAsserter (see associated exception for details)

<pre>java.lang.RuntimeException: Deferred binding failed for 'com.google.gwt.useragent.client.UserAgent' (did you forget to inherit a required module?)

                at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)

                at com.google.gwt.core.shared.GWT.create(GWT.java:72)

                at com.google.gwt.core.client.GWT.create(GWT.java:86)

                at com.google.gwt.useragent.client.UserAgentAsserter.onModuleLoad(UserAgentAsserter.java:41)

               .........

 

Has anyone faced this issue before?

 

Thanks!

               

Thomas Broyer

unread,
Mar 19, 2014, 12:43:54 PM3/19/14
to google-we...@googlegroups.com


On Wednesday, March 19, 2014 4:59:39 PM UTC+1, manu wrote:

Hi all,

 

I just migrated our project from GWT 2.5.0 to GWT 2.6.0.   We are using Java 6.

 

The application works fine after the migration in Firefox, but does not work in IE9.

 

The gwt module fails to load and I get the below error in IE9:

 

00:45:05.664  [ERROR] Error while executing the JavaScript provider for property 'user.agent'


Do you see such an error in Internet Explorer Developer Tools (F12) ?

While you're in the Developer Tools, what are the reported browser compatibility and document compatibility?
Is you HTML host page triggering "standards mode"? ("quirks mode" could possibly cause such an error, given that IE would switch to IE5.5 Quirks mode; in previous versions of GWT that would use the ie6 permutation, but in 2.6 it's disabled by default)

manya mohanan

unread,
Mar 19, 2014, 2:43:42 PM3/19/14
to google-we...@googlegroups.com
Thanks for your reply.

The html host page was triggered  in Quirks mode. When I changed to standards mode the error was gone. But as expected , now there are some formatting issues in IE9 that need to be taken care of in Standards mode.


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

manya mohanan

unread,
Mar 19, 2014, 3:38:51 PM3/19/14
to google-we...@googlegroups.com
Do you know which <!DOCTYPE declaration should be added, so that it doesn't cause any formatting issues in IE9?

Patrice De Saint Steban

unread,
Mar 20, 2014, 6:01:04 AM3/20/14
to google-we...@googlegroups.com
You can use the html5 doctype :
<!DOCTYPE html>

And I also add this meta tags :
<meta http-equiv="X-UA-Compatible" content="IE=9">


Le mercredi 19 mars 2014 20:38:51 UTC+1, manu a écrit :
Do you know which <!DOCTYPE declaration should be added, so that it doesn't cause any formatting issues in IE9?
On Wed, Mar 19, 2014 at 7:43 PM, manya mohanan <manyam...@gmail.com> wrote:
Thanks for your reply.

The html host page was triggered  in Quirks mode. When I changed to standards mode the error was gone. But as expected , now there are some formatting issues in IE9 that need to be taken care of in Standards mode.
On Wed, Mar 19, 2014 at 5:43 PM, Thomas Broyer <t.br...@gmail.com> wrote:


On Wednesday, March 19, 2014 4:59:39 PM UTC+1, manu wrote:

Hi all,

 

I just migrated our project from GWT 2.5.0 to GWT 2.6.0.   We are using Java 6.

 

The application works fine after the migration in Firefox, but does not work in IE9.

 

The gwt module fails to load and I get the below error in IE9:

 

00:45:05.664  [ERROR] Error while executing the JavaScript provider for property 'user.agent'


Do you see such an error in Internet Explorer Developer Tools (F12) ?

While you're in the Developer Tools, what are the reported browser compatibility and document compatibility?
Is you HTML host page triggering "standards mode"? ("quirks mode" could possibly cause such an error, given that IE would switch to IE5.5 Quirks mode; in previous versions of GWT that would use the ie6 permutation, but in 2.6 it's disabled by default)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

manya mohanan

unread,
Mar 20, 2014, 6:02:12 AM3/20/14
to google-we...@googlegroups.com
Switching to standards mode and fixing minor formatting issues did the trick.

Patrice De Saint Steban

unread,
Mar 20, 2014, 6:02:45 AM3/20/14
to google-we...@googlegroups.com
You can find these informations in : 

manya mohanan

unread,
Mar 20, 2014, 6:03:33 AM3/20/14
to google-we...@googlegroups.com
I added the following lines in my host html page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="X-UA-Compatible" content="IE=8,9" >


Thank you so much for your help!!

Thomas Broyer

unread,
Mar 20, 2014, 6:18:30 AM3/20/14
to google-we...@googlegroups.com


On Thursday, March 20, 2014 11:03:33 AM UTC+1, manu wrote:
I added the following lines in my host html page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Why make things more complex than they need to be: just stick to <!DOCTYPE html>, it's the smallest DOCTYPE that triggers Standards Mode; easy to remember, hard to get wrong.
 
<meta http-equiv="X-UA-Compatible" content="IE=8,9" >

I don't think you can use that value, or possibly IE will read it as IE=8 and discard the 9.
If you really need to, then just use IE=9, and IE8 will pick its highest mode.
But GWT 2.6.0 works well with IE10 and IE11 in their respective modes, so I'd just not use that tag, or use IE=Edge (or possibly IE=11 if you're worried about breakages when IE12 will be out the doors).

manya mohanan

unread,
Mar 20, 2014, 6:32:07 AM3/20/14
to google-we...@googlegroups.com
True, I changed the DOCTYPE tag and also removed the compatibility tag from the host page.
It works well.

Thanks again!


--
Reply all
Reply to author
Forward
0 new messages