GWT and IE8

1,656 views
Skip to first unread message

mkn

unread,
Sep 29, 2011, 3:38:13 PM9/29/11
to Google Web Toolkit
Hi

I developed an application in GWT. It worked perfectly in Chrome and
Safari. However, when I tried it on IE8 I was shocked because it
didn't work anymore.

So when I browse to the application I just see a blank page and at the
bottom left there is this warning sign. When I click on it says:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/
4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; InfoPath.2)
Timestamp: Thu, 29 Sep 2011 19:31:40 UTC

Message: Exception thrown and not caught
Line: 657
Char: 5
Code: 0
URI: http://something.com/test_light/test_light/658EB31931BDA704313D9668F70CF983.cache.html


So I opened the Developer Tools and there is a message: Exception
thrown and not caught on line 657. This is the line 653 until 663:



function entry_0(jsFunction){
return function(){
try {
return entry0(jsFunction, this, arguments);
}
catch (e) {
throw e;
}
}
;
}


The most weird thing is, that when I click on refresh button of the
browser, then the application works.
I also put a <meta http-equiv="X-UA-Compatible" content="IE=8"> (as
suggested here http://code.google.com/p/google-web-toolkit/wiki/IE8Support)
in my .html file and it didn't change anything.

I always thought that GWT is compatible with IE6,7,8. I hope someone
can help me solving this issue. Many thanks in advance for any kind of
help.

Juan Pablo Gardella

unread,
Sep 29, 2011, 3:51:25 PM9/29/11
to google-we...@googlegroups.com
What gwt version are you use? Are you modify user.agent property in your module?

2011/9/29 mkn <m.kh...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


mkn

unread,
Sep 29, 2011, 4:29:28 PM9/29/11
to Google Web Toolkit
I use GWT 2.4.0
I added to the project's myProject.gwt.xml (just in front of the </
module> tag) the following lines:

<!-- Browser-sensitive code should use the 'user.agent' property -->
<define-property name="user.agent" values="ie6" />
<extend-property name="user.agent" values="ie8" />
<extend-property name="user.agent" values="gecko1_8" />
<extend-property name="user.agent" values="safari" />
<extend-property name="user.agent" values="opera" />
<extend-property name="user.agent" values="ie9" fallback-
value="ie8" />
<property-provider name="user.agent"
generator="com.google.gwt.user.rebind.UserAgentPropertyGenerator"/>

whereas I changed the first line from <define-property ...> to <extend-
property ...>. If I use <define-property..> then I got the error:
[ERROR] The deferred-binding property named user.agent may not be
redefined.
[ERROR] Line 40: Unexpected exception while processing element 'define-
property'



On Sep 29, 9:51 pm, Juan Pablo Gardella <gardellajuanpa...@gmail.com>
wrote:
> What gwt version are you use? Are you modify user.agent
> <http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/...>property
> in your module?
>
> 2011/9/29 mkn <m.kho...@gmail.com>
>
>
>
>
>
>
>
> > Hi
>
> > I developed an application in GWT. It worked perfectly in Chrome and
> > Safari. However, when I tried it on IE8 I was shocked because it
> > didn't work anymore.
>
> > So when I browse to the application I just see a blank page and at the
> > bottom left there is this warning sign. When I click on it says:
>
> > Webpage error details
>
> > User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/
> > 4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
> > 3.0.30729; Media Center PC 6.0; InfoPath.2)
> > Timestamp: Thu, 29 Sep 2011 19:31:40 UTC
>
> > Message: Exception thrown and not caught
> > Line: 657
> > Char: 5
> > Code: 0
> > URI:
> >http://something.com/test_light/test_light/658EB31931BDA704313D9668F7...

Juan Pablo Gardella

unread,
Sep 29, 2011, 11:11:42 PM9/29/11
to google-we...@googlegroups.com

mkn

unread,
Sep 30, 2011, 3:02:46 AM9/30/11
to Google Web Toolkit
Now I have only the line:
<set-property name="user.agent" value="gecko1_8"/>

I'm not so sure why this should fix the problem. By specifying that
line I speed up the compiler because it doesn't compile all the
versions anymore.
If run my application in IE8 now, then I just see a blank page and no
sign indicating any java script errors. However, when I click on the
refresh button. I get an error box with message: " ERROR: Possible
problem with your *.gwt.xml module file. The compile time user.agent
value (gecko1_8) does not match the runtime user.agent value (ie8).
Expect more errors.

Thank you for helping me Juan! I appreciate it a lot.

P.S. If it helps you I can send you the link to the application.

On Sep 30, 5:11 am, Juan Pablo Gardella <gardellajuanpa...@gmail.com>
wrote:
> Seehttp://stackoverflow.com/questions/1011863/how-do-i-speed-up-the-gwt-...,
> how set user agent.
>
> 2011/9/29 mkn <m.kho...@gmail.com>

Thomas Broyer

unread,
Sep 30, 2011, 4:45:11 AM9/30/11
to google-we...@googlegroups.com


On Friday, September 30, 2011 9:02:46 AM UTC+2, mkn wrote:
Now I have only the line:
<set-property name="user.agent" value="gecko1_8"/>

I'm not so sure why this should fix the problem.

No, it'll be worse.

Juan Pablo asked you *whether* you were doing such things (because that could have triggered the issue), not that you change you module.
 
By specifying that
line I speed up the compiler because it doesn't compile all the
versions anymore.
If run my application in IE8 now, then I just see a blank page and no
sign indicating any java script errors. However, when I click on the
refresh button. I get an error box with message: " ERROR: Possible
problem with your *.gwt.xml module file. The compile time user.agent
value (gecko1_8) does not match the runtime user.agent value (ie8).
Expect more errors.

Yes, you only compiled for Firefox, so its' no longer working in other browsers (IE, Chrome/Safari, Opera)

P.S. If it helps you I can send you the link to the application.

That could help, yes. 

mkn

unread,
Sep 30, 2011, 9:12:22 AM9/30/11
to Google Web Toolkit
> No, it'll be worse.
>
> Juan Pablo asked you *whether* you were doing such things (because that
> could have triggered the issue), not that you change you module.

So the answer would be no, I haven't modified anything. How can I
found out what this function does (because obviously it throws the
Exception):

function entry_0(jsFunction){
return function(){
try {
return entry0(jsFunction, this, arguments);
}
catch (e) {
throw e;
}
}
;
}







mkn

unread,
Sep 30, 2011, 10:44:18 AM9/30/11
to Google Web Toolkit
to add some more information:
I think there is something wrong with the cache. Because when I clear
the cache, then it works. But then when I visit the page once again, I
get the java script error. And then, when I click on the refresh
button of the IE Browser, it works again.

mkn

unread,
Sep 30, 2011, 3:54:56 PM9/30/11
to Google Web Toolkit
Okay after hours for trying out different things I found out that the
problem should be something with RPC calls.
So if a RPC call is being executed I get the java script error. Then I
reload the the site and execute the RPC call again => it works.
I hope someone can help me further.
Reply all
Reply to author
Forward
0 new messages