# Cesium not running in WPF WebBrowser

**URL:** <https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883>\
**Category:** CesiumJS\
**Created:** [June 12, 2020, 8:10am UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883 "2020-06-12T08:10:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RalphL](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ralphl/32/2517_2.png) [@RalphL](https://community.cesium.com/u/RalphL)\
**Post date:** [June 12, 2020, 8:10am UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/1 "2020-06-12T08:10:30Z")

</div>

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

 ![WebBrowser](https://global.discourse-cdn.com/cesium/original/2X/0/056d0eaa400ad651d0ed302e342af98849b5a180.jpeg)  
Any idea what I’m doing wrong?  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [June 15, 2020, 5:59pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/2 "2020-06-15T17:59:48Z")

</div>

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](https://threejs.org/examples/#webgl_animation_cloth)

---

<div class="post-metadata">

**Author:** ![RalphL](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ralphl/32/2517_2.png) [@RalphL](https://community.cesium.com/u/RalphL)\
**Post date:** [June 16, 2020, 7:12am UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/3 "2020-06-16T07:12:59Z")

</div>

Yes, it ist the default MS WebBrowser control ([MS WebBrowser class documentation](https://docs.microsoft.com/de-de/dotnet/api/system.windows.controls.webbrowser?view=netcore-3.1)) embedded in a simple [VB.Net](http://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.

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [June 16, 2020, 2:55pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/4 "2020-06-16T14:55:12Z")

</div>

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

> <https://github.com/CesiumGS/cesium/blob/master/Apps/HelloWorld.html>

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/](https://cesium.com/docs/tutorials/getting-started/)

And instead of:

```auto
<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:

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

```

---

<div class="post-metadata">

**Author:** ![RalphL](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ralphl/32/2517_2.png) [@RalphL](https://community.cesium.com/u/RalphL)\
**Post date:** [June 19, 2020, 12:05pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/5 "2020-06-19T12:05:40Z")

</div>

Here is the result:  
Exception in row 285930, column 428 in [https://cesium.com/downloads/cesiumjs/releases/1.70.1/Build/CesiumUnminified/Cesium.js](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

---

<div class="post-metadata">

**Author:** ![RalphL](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ralphl/32/2517_2.png) [@RalphL](https://community.cesium.com/u/RalphL)\
**Post date:** [June 19, 2020, 12:11pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/6 "2020-06-19T12:11:59Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [June 19, 2020, 6:38pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/7 "2020-06-19T18:38:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RalphL](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/ralphl/32/2517_2.png) [@RalphL](https://community.cesium.com/u/RalphL)\
**Post date:** [June 20, 2020, 1:58pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/8 "2020-06-20T13:58:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kbnave](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kbnave/32/3458_2.png) [@kbnave](https://community.cesium.com/u/kbnave)\
**Post date:** [June 1, 2021, 10:31am UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/9 "2021-06-01T10:31:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![henryqng](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/henryqng/32/1987_2.png) [@henryqng](https://community.cesium.com/u/henryqng)\
**Post date:** [June 1, 2021, 1:10pm UTC](https://community.cesium.com/t/cesium-not-running-in-wpf-webbrowser/9883/10 "2021-06-01T13:10:10Z")

</div>

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.
