Cesium not running in WPF WebBrowser

I am a Cesium beginner. My attempt to navigate to the Cesium viewer (https://cesiumjs.org/Cesium/Build/Apps/CesiumViewer/index.html) via the WPF WebBrowser control (.NET 4.7) ends with the following error message:


Any idea what I’m doing wrong?
Thanks in advance!

Is this an embedded browser in a C# application? From that error message it looks like it doesn’t support some basic JavaScript functionality (like adding an event listener). Do other web applications work in this browser? Like perhaps the ThreeJS examples here: https://threejs.org/examples/#webgl_animation_cloth

Yes, it ist the default MS WebBrowser control (MS WebBrowser class documentation) embedded in a simple VB.Net application. This application is only navigating to the mentionend URL.
Yes, the ThreeJS example is running after adding the tag <meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge">.
Other libraries such as Openlayers run reasonably well. However, Openlayers does not respond to mouse events; these must be intercepted in VB and dealt with in JS.

Can you check if this simpler “Hello World” cesium app runs?

It would also be helpful if you can run it using the unminified version of CesiumJS to display a useful stack trace. If you need a hosted URL to run it, you can try the getting started guide here: https://cesium.com/docs/tutorials/getting-started/

And instead of:

<script src="https://cesium.com/downloads/cesiumjs/releases/1.70.1/Build/Cesium/Cesium.js"></script>

You can replace it with the following to get the unminified version:

<script src="https://cesium.com/downloads/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js"></script>

Here is the result:
Exception in row 285930, column 428 in https://cesium.com/downloads/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js
0x800a139e - runtime error in JavaScript: Browser doesn’t support addEventListener or attachEvent

I had to shorten the links so that the editor accepts the input:

An error occurred while rendering. Rendering has stopped.

TypeError: The property “update” of an undefined or null reference cannot be retrieved.
. at Viewer.prototype._onTick (…/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js:300085:5) at Event.prototype.raiseEvent (…/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js:13927:9) at Clock.prototype.tick …/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js:50085:5) at CesiumWidget.prototype.render (…/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js:293826:7) at render (…/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js:293111:13)

It looks like this error is coming from Knockout.js, which is a third party dependency for CesiumJS.

Obviously the name says it - k.o. .-)

Has there been any update to this? I’m running into the same issue now.

I think this is WPF specific issue because I’ve been using WKWebview to create a cesium app for the iPhone and it works great.