com.google.gwt.core.client.JavaScriptException: (InvalidCharacterError) on IE 10

1,029 views
Skip to first unread message

fermierul

unread,
Aug 23, 2013, 5:23:00 AM8/23/13
to google-we...@googlegroups.com
Hi,

I use GWT 2.2.0 (because PagingScrollingTable from incubator is not supported on later versions) and I get a java script error on IE 10 (it still works on Firefox, Chrome or IE 9) on a very basic (and mandatory) line of code:
                       private Button loginButton = new Button("Login");

The error is:

com.google.gwt.core.client.JavaScriptException: (InvalidCharacterError): InvalidCharacterError
 code: 5
 ABORT_ERR: 20
 DATA_CLONE_ERR: 25
 DOMSTRING_SIZE_ERR: 2
 HIERARCHY_REQUEST_ERR: 3
 INDEX_SIZE_ERR: 1
 INUSE_ATTRIBUTE_ERR: 10
 INVALID_ACCESS_ERR: 15
 INVALID_CHARACTER_ERR: 5
 INVALID_MODIFICATION_ERR: 13
 INVALID_NODE_TYPE_ERR: 24
 INVALID_STATE_ERR: 11
 NAMESPACE_ERR: 14
 NETWORK_ERR: 19
 NOT_FOUND_ERR: 8
 NOT_SUPPORTED_ERR: 9
 NO_DATA_ALLOWED_ERR: 6
 NO_MODIFICATION_ALLOWED_ERR: 7
 PARSE_ERR: 81
 QUOTA_EXCEEDED_ERR: 22
 SECURITY_ERR: 18
 SERIALIZE_ERR: 82
 SYNTAX_ERR: 12
 TIMEOUT_ERR: 23
 TYPE_MISMATCH_ERR: 17
 URL_MISMATCH_ERR: 21
 VALIDATION_ERR: 16
 WRONG_DOCUMENT_ERR: 4
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
    at java.lang.Thread.run(Thread.java:662)

Jens

unread,
Aug 23, 2013, 5:40:50 AM8/23/13
to google-we...@googlegroups.com
Does it work if you force IE10 into IE9 mode?

-- J.

fermierul

unread,
Aug 23, 2013, 5:47:32 AM8/23/13
to google-we...@googlegroups.com
Yes, I mentioned that. It works with IE9 or {IE10 in compatibility mode}.

Jens

unread,
Aug 23, 2013, 6:38:43 AM8/23/13
to google-we...@googlegroups.com
Well then you have to force IE 10 always into IE 9 mode (X-UA-Compatible meta tag) if you can not update to a newer GWT version. Or you try to figure out how the Button implementation of GWT 2.5.1 differs from 2.2 because I haven't seen the above issue in IE 10 with the current GWT version.

-- J.

fermierul

unread,
Aug 23, 2013, 8:36:03 AM8/23/13
to google-we...@googlegroups.com
Thanks for the suggestion Jens, you opened a new lead but I still could not make it work. I added:
 <meta http-equiv="x-ua-compatible" content="IE=9"/>
as the first line in <head> but it did not make a difference.

Using Browser Mode = IE9 and Document Mode = IE9 standards gave me different results after restarting the application with the same settings, I could not understand this.
I tried all sorts of permutations and I noticed that it always works only if in IE i choose Document Mode = IE5 Quirks, while Browser Mode can be anything (even IE10).
I think this is related to my Doctype declaration:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- The HTML 4.01 Transitional DOCTYPE declaration-->
<!-- above set at the top of the file will set     -->
<!-- the browser's rendering engine into           -->
<!-- "Quirks Mode". Replacing this declaration     -->
<!-- with a "Standards Mode" doctype is supported, -->
<!-- but may lead to some differences in layout.   -->

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

I tried using <!DOCTYPE HTML"> as suggested on msdn site, but in this case the application layout was completely messed up.

Any idea how to enforce IE from the application to use Document Mode = IE 5 Quirks?

Thanks


fermierul

unread,
Aug 23, 2013, 8:55:30 AM8/23/13
to google-we...@googlegroups.com
I made it work, I added:
<meta http-equiv="x-ua-compatible" content="IE=5/>

Only now I realized that this tag refers to IE Document Mode and not to Browser Mode.

Jens

unread,
Aug 23, 2013, 8:58:13 AM8/23/13
to google-we...@googlegroups.com

Any idea how to enforce IE from the application to use Document Mode = IE 5 Quirks?

<meta http-equiv="x-ua-compatible" content="IE=5"/>

should do it. That way you should get the quirkiest quirk mode available ;-) 


If you stick to GWT 2.2 just because of that one Incubator widget you should consider rewriting that code using GWT's DataGrid along with GWT's SimplePager. That way you are not stuck on an old GWT release. The incubator project is deprecated.

-- J.

 
Reply all
Reply to author
Forward
0 new messages