PlayN not compatible with Internet Explorer 9?

87 views
Skip to first unread message

Quan

unread,
Jan 12, 2012, 10:01:59 PM1/12/12
to PlayN
Hi guys!

I've just tried to run my game with ie9, but it failed ... throwing
the following message:
Object doesn't support property or method 'getContext'.
That's really confusing because with the google chrome browser
everything works.
So I took the PlayN example project "playn-showcase-html" and ran it
with ie9. And this is what happened:


INFO: Failed to create GL context. Falling back.
ERROR: init()
com.google.gwt.core.client.JavaScriptException: (TypeError): Object
doesn't support property or method 'getContext'
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
248)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
136)
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.dom.client.CanvasElement$.getContext2d$
(CanvasElement.java)
at playn.html.HtmlGraphics.<init>(HtmlGraphics.java:81)
at playn.html.HtmlGraphicsDom.<init>(HtmlGraphicsDom.java:31)
at playn.html.HtmlPlatform.<init>(HtmlPlatform.java:168)
at playn.html.HtmlPlatform.register(HtmlPlatform.java:100)
at playn.html.HtmlPlatform.register(HtmlPlatform.java:90)
at playn.showcase.html.ShowcaseHtml.start(ShowcaseHtml.java:27)
at playn.html.HtmlGame$2.execute(HtmlGame.java:32)
at com.google.gwt.core.client.impl.SchedulerImpl$Task
$.executeScheduled$(SchedulerImpl.java:50)
at
com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:
228)
at
com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:
388)
at com.google.gwt.core.client.impl.SchedulerImpl
$Flusher.execute(SchedulerImpl.java:78)
at
com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:
138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:
172)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
337)
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
218)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
136)
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:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:
172)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
292)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
546)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
363)
at java.lang.Thread.run(Unknown Source)

My question is: Am I the only one getting this error message. Or is it
because PlayN doesn't work with ie9?

Joel Webber

unread,
Jan 13, 2012, 3:21:23 PM1/13/12
to pl...@googlegroups.com
Looks like it's failing to get a proper <canvas> element. You're probably running in IE9's "compatibility mode". 

Try adding the following to your <head>:
<meta http-equiv="X-UA-Compatible" content="IE=9" >

(from http://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx)

We should probably add this to the samples.

Quan

unread,
Jan 13, 2012, 6:55:23 PM1/13/12
to PlayN
Wow thanks alot! Everything works now :)!

On Jan 13, 9:21 pm, Joel Webber <j...@google.com> wrote:
> Looks like it's failing to get a proper <canvas> element. You're probably
> running in IE9's "compatibility mode".
>
> Try adding the following to your <head>:
>
> <meta http-equiv="X-UA-Compatible" content="IE=9" >
>
> (fromhttp://msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspx)
>
> We should probably add this to the samples.
>
Reply all
Reply to author
Forward
0 new messages