How to fight with a browser (Internet explorer) trivial problem?

202 views
Skip to first unread message

ghi...@gmail.com

unread,
Nov 17, 2014, 2:21:47 AM11/17/14
to google-we...@googlegroups.com
Hi I'm facing a problem that I think it's quite trivial but I can't really understand it in the whole dimension:

Start point is a quite complex GWT project but I guess with a simpler will be the same, the project has 2 modules , the second inherits the first but again I doubt it could be important.
The resulting web app works great in chrome and safari but doesn't work in IE (both IE11 and Safari using the i.e. 10 or 9 engine as development option enables to) and doesn't work because can't identify the browser, indeed compiling in detailed mode and looking at JS inside IE I can see that the method

function computePropValue(propName) {
    var value_0 = providers[propName](), allowedValuesMap = values[propName];
    if (value_0 in allowedValuesMap) {
        return value_0;
    }
    var allowedValuesList = [];
    for (var k in allowedValuesMap) {
        allowedValuesList[allowedValuesMap[k]] = k;
    }
    if (propertyErrorFunc) {
        propertyErrorFunc(propName, allowedValuesList, value_0);
    }
    throw null;
}
throws null because while checking the browser $doc.documentMode is "undefined" and then it can't retrieve the correct nocache.js


my get.xml is something like

<module rename-to="XDSViewerCore">

    <inherits name="com.google.gwt.user.User" />

<inherits name="com.google.gwt.user.theme.standard.Standard" />


<!-- <set-property name="user.agent" value="ie8,ie9,ie10,trident,gecko1_8,safari"/> -->

<entry-point ....



and my html starts as

<!doctype html>

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">


Naturally I also tried to set user-agent to just safari and gecko and beside it works I have a warning that is telling me about the fact the browser isn't supposed to exist opening the page...

so:
1) why it can't find document mode? what I'm missing?
2) It's possible and how can I say that if the browser can't be identified must be used (without warnings!) a default permutation?
3) there's something I can do to better understand the behaviour?


Anyone?






Mohammed Sameen

unread,
Nov 17, 2014, 5:30:58 AM11/17/14
to google-we...@googlegroups.com
IE11 uses the same permutation as Firefox, i.e. gecko1_8.Try with this user agent..I hope it solves your issue

Jens

unread,
Nov 17, 2014, 5:36:39 AM11/17/14
to google-we...@googlegroups.com
Whats the user.agent of that IE 11 that does not work? ( http://whatsmyuseragent.com/ )

-- J.

Giuseppe Parrinello

unread,
Nov 17, 2014, 5:38:45 AM11/17/14
to google-we...@googlegroups.com
Already tried but no result...white page and JS errors, even in compatibility mode 

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/S38VPsspl20/unsubscribe.
To unsubscribe from this group and all its topics, 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.

Giuseppe Parrinello

unread,
Nov 17, 2014, 5:57:35 AM11/17/14
to google-we...@googlegroups.com
the agent is Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko, 


On Mon, Nov 17, 2014 at 11:36 AM, Jens <jens.ne...@gmail.com> wrote:
Whats the user.agent of that IE 11 that does not work? ( http://whatsmyuseragent.com/ )

-- J.

--

Mohammed Sameen

unread,
Nov 17, 2014, 6:04:56 AM11/17/14
to google-we...@googlegroups.com
Check your compilation-mappings.txt File Wether its generating js for "user.agent gecko1_8" or not...


On Monday, November 17, 2014 12:51:47 PM UTC+5:30, ghi...@gmail.com wrote:

Giuseppe Parrinello

unread,
Nov 17, 2014, 6:09:14 AM11/17/14
to google-we...@googlegroups.com
Ok, I'm going to check, in the mean time I can say that forcing the user.agent to gecko make the webapp project work in safari emulating IE but no result in a real IE11, safari emulating IE works as:

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)


Giuseppe Parrinello

unread,
Nov 17, 2014, 6:14:45 AM11/17/14
to google-we...@googlegroups.com
I have no compilation-mappings.txt in my project war...is it a/the problem? I see that file is present in examples project but isn't available in mine!

On Mon, Nov 17, 2014 at 12:04 PM, Mohammed Sameen <samee...@gmail.com> wrote:

Mohammed Sameen

unread,
Nov 17, 2014, 7:20:44 AM11/17/14
to google-we...@googlegroups.com
Are you created as maven project ?


On Monday, November 17, 2014 12:51:47 PM UTC+5:30, ghi...@gmail.com wrote:

Thomas Broyer

unread,
Nov 17, 2014, 7:30:49 AM11/17/14
to google-we...@googlegroups.com


On Monday, November 17, 2014 12:14:45 PM UTC+1, Giuseppe Parrinello wrote:
I have no compilation-mappings.txt in my project war...is it a/the problem? I see that file is present in examples project but isn't available in mine!


This file is created by the xsiframe linkers family.
If you're not using 2.7 (where it's the default), you can (and should, unless you have a specific reason not to) activate it by adding <add-linker name="xsiframe"/> to your gwt.xml.

Giuseppe Parrinello

unread,
Nov 17, 2014, 7:31:52 AM11/17/14
to google-we...@googlegroups.com
no it's an eclipse-plugin based project

Giuseppe Parrinello

unread,
Nov 17, 2014, 7:34:43 AM11/17/14
to google-we...@googlegroups.com
well i'm using 2.7 RC1...but I'll try adding the linker

--

Giuseppe Parrinello

unread,
Nov 17, 2014, 7:43:32 AM11/17/14
to google-we...@googlegroups.com
ok, now I have the txt

51EB80673473B0C445C778D444BE5985.cache.js
user.agent safari

5A23EEC935721AEE9265887BD4DAE861.cache.js
user.agent ie10

6648437DF1F0BC7843597C303E9BEB46.cache.js
user.agent gecko1_8

92F1E75E5979668D4C47BE389EC2C239.cache.js
user.agent ie9

A4D1F2EC5B35D23C223FB9F58D61CE84.cache.js
user.agent ie8

Devmode:devmode.js



On Mon, Nov 17, 2014 at 1:30 PM, Thomas Broyer <t.br...@gmail.com> wrote:

--

Giuseppe Parrinello

unread,
Nov 17, 2014, 7:54:34 AM11/17/14
to google-we...@googlegroups.com
So, I have the agent for gecko for sure and i can see it but still that problem...debugging JS seems it accepts the user agent as IE but since can't find the version (that is unknown) all goes wrong

Mohammed Sameen

unread,
Nov 17, 2014, 8:05:24 AM11/17/14
to google-we...@googlegroups.com
Hi,
I am using GWT 2.6 with same <set-property> but i am able to load the Application in IE 11.My suggestion .. try with GWT 2.6..


On Monday, November 17, 2014 12:51:47 PM UTC+5:30, ghi...@gmail.com wrote:

Jens

unread,
Nov 17, 2014, 8:05:32 AM11/17/14
to google-we...@googlegroups.com
1) why it can't find document mode? what I'm missing?

No idea. Every IE 11 should have document.documentMode and GWT assumes that this is the case. Maybe your IE is somehow broken. You could try to use one of Microsofts free to use virtual machines to test against a fresh IE 11 installation. https://www.modern.ie

 
2) It's possible and how can I say that if the browser can't be identified must be used (without warnings!) a default permutation?

If you use GWT 2.7 you can do so using <set-property-fallback>.

 
3) there's something I can do to better understand the behaviour?

You need to figure out why document.documentMode does not exist in your IE 11.


-- J.

Giuseppe Parrinello

unread,
Nov 17, 2014, 8:10:38 AM11/17/14
to google-we...@googlegroups.com
Thanks Jens, I will try the point 2 suggestion but you must be wrong in other points since the problem is present in 3 different windows machines not related anyhow, in a virtual machine with a fresh IE 11 installation and happens also when I'm using IE emulation in Safari at any version...the problem must be in my GWT configuration..but I can't figure out where I have to search it. 

--

Giuseppe Parrinello

unread,
Nov 17, 2014, 8:19:16 AM11/17/14
to google-we...@googlegroups.com
I just noticed that in eclipse project properties I don't have any App Engine selected but all works...in other browser..any reason to select app engine? it's anyhow related to my IE problem?

Jens

unread,
Nov 17, 2014, 8:34:27 AM11/17/14
to google-we...@googlegroups.com
and happens also when I'm using IE emulation in Safari at any version...

You can not emulate IE in Safari / Chrome / Firefox because all these browsers only emulate the user agent value but do not emulate IE specific DOM properties like document.documentMode. So it is expected that GWT apps will fail if you use an IE user agent value with Safari / Chrome / Firefox since GWT now thinks it is an IE and tries to use documentMode to figure out which exact version of IE you are using.

You should only focus on real IE browsers.

-- J.

Giuseppe Parrinello

unread,
Nov 17, 2014, 8:56:55 AM11/17/14
to google-we...@googlegroups.com
&%$&** you right ! I wasted lot of time investigating in the wrong direction, the actual problem is 

"Object doesn't support property or method 'addEventListener'" a totally different question!!

--

Giuseppe Parrinello

unread,
Nov 17, 2014, 9:49:11 AM11/17/14
to google-we...@googlegroups.com
Ok, starting back now i'm facing the fact IE says "Invalid argument" on <!DOCTYPE HTML>

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">


any guess?

Giuseppe Parrinello

unread,
Nov 17, 2014, 2:48:31 PM11/17/14
to google-we...@googlegroups.com
after wasting a lot of time in the horrible java dev mode of IE i found was a set of cell height to 0%....in a wide application it's impossible to make guess using the basic support of IE...anyway...that's it..all right in the GWT project just IE don't like 0% as value....
Reply all
Reply to author
Forward
0 new messages