property 'user.agent" was set to the unexpected value "unknown"

810 views
Skip to first unread message

james...@gmail.com

unread,
Mar 28, 2007, 3:25:54 PM3/28/07
to Google Web Toolkit
Hi,

I just install GWT v1.3.3, and had a problem when running sample apps
in host mode. When the app is starting, an Internet Explorer popup
window appears with the following message

While attempting to load module "com.mycompany.MyApp", property
'user.agent" was set to the unexpected value "unknown". Allow values:
gecko, gecko1_8, ie6, opera, safari

I am running Windows 200 with IE 5.5, could this be the problem?
Suppose I can't update to IE 6 easily (company computer), is there
anything else I can modify to use Firefox as the browser being used in
host mode?

The dev shell has the following log:

[DEBUG] Rebinding com.google.gwt.user.client.impl.DOMImpl
[DEBUG] Checking rule <replace-with
class='com.google.gwt.user.client.impl.DOMImplMozilla'/>
[ERROR] Unable to get value of property 'user.agent'
com.google.gwt.core.ext.BadPropertyValueException: Missing property
'user.agent' was not specified
at
com.google.gwt.dev.shell.ModuleSpacePropertyOracle.getPropertyValue(ModuleSpacePropertyOracle.java:
88)
at
com.google.gwt.dev.cfg.ConditionWhenPropertyIs.doEval(ConditionWhenPropertyIs.java:
48)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.ConditionAny.doEval(ConditionAny.java:36)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.ConditionAll.doEval(ConditionAll.java:37)
at com.google.gwt.dev.cfg.Condition.isTrue(Condition.java:36)
at com.google.gwt.dev.cfg.Rule.isApplicable(Rule.java:35)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.tryRebind(StandardRebindOracle.java:107)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:62)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
170)

Thanks,
James

abickford

unread,
Mar 28, 2007, 3:32:49 PM3/28/07
to Google Web Toolkit
The user agent is derived in the com/google/gwt/user/UserAgent.gwt.xml
file. You could try modifying that script and figuring out what is
going wrong. I'd take a look at the 'ua' var and see what your
browser is returning and why the logic isn't picking it up.

<property-provider name="user.agent">

var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("opera") != -1) {
return "opera";
}
else if (ua.indexOf("webkit") != -1) {
return "safari";
}
else if ((ua.indexOf("msie 6.0") != -1) ||
(ua.indexOf("msie 7.0") != -1)) {
return "ie6";
}
else if (ua.indexOf("gecko") != -1) {
var result = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
if (result && result.length == 3) {
var version = (parseInt(result[1]) * 10) + parseInt(result[2]);
if (version >= 18)
return "gecko1_8";
}
return "gecko";
}
return "unknown";

</property-provider>

abickford

unread,
Mar 28, 2007, 3:35:18 PM3/28/07
to Google Web Toolkit
Err, now that i look at the script, it looks like your flavor of IE
isn't supported.

james...@gmail.com

unread,
Mar 28, 2007, 5:41:02 PM3/28/07
to Google Web Toolkit

On Mar 28, 1:35 pm, "abickford" <adam.bickf...@gmail.com> wrote:
> Err, now that i look at the script, it looks like your flavor of IE
> isn't supported.

OK. Thanks! Is there a way to use Firefox as the browser in host mode?
I have difficulty to upgrade to IE 6 on my work computer.

Reinier Zwitserloot

unread,
Mar 28, 2007, 10:24:29 PM3/28/07
to Google Web Toolkit
As far as I know (which is quite far), that is non-trivial.

IE5.5 is flat out not supported by GWT.

bit of a pickle. Bring a linux boot CD? That doesn't sound like a
reasonable alternative, unfortunately.


On Mar 28, 11:41 pm, "james.c...@gmail.com" <james.c...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages