Cesium and Safari

Obviously according to the previous posts, Cesium and Safari has been an issue as of late.

Firefox and Chrome work famously, and a few of us were under the impression that the latest OSX update to Safari would fix. But...

TypeError: undefined is not an object (evaluating 'this._dataSourceDisplay.update')

So, is it safe to say we need to apply a workaround? Is there a workaround that is best, as I've seen a couple?

kind regards

We added a workaround to a Safari bug in Cesium 1.14. What version are you using?


I was actually trying to figure that out, since I didn’t do the original installation. I don’t see a version number in the comments of cesium.js

I test my app ( using Cesium 1.14 on device worked on iOS 9.0.2.
The App run OK when the device hold on Landscape mode. However, error occurred on Portrait mode!

The error message:

Jon, the Cesium.VERSION property can be used to programatically retrieve the version at runtime. That being said, your callstack does not look like the particular Safari bug we recently worked around (because it was a WebGL shader compilation error and a problem with update). It does vaguely remind me of an old Safari bug we worked around a while ago, so the best recommendation I can give you is to make sure you are running the latest versions of both Safari and Cesium and see if that has any affect.

Unfortunately, in addition to a poor WebGL implementation, Safari also has JavaScript engine bugs which causes valid code to simply fail. In our experience the only way to address these is to tweak the code so it doesn’t trigger whatever bug exists in Safari. Bugs like this are hard to track down so if updating to the latest version doesn’t fix your issue, if you could provide some source code that triggers the problem that would be great. Let us know.

Kevin, does this problem also happen with the default Cesium Viewer example application?


If the answer is yes, I’ll try and reproduce on my end and write up a bug.

Hi, Matthew

Your example app runs ok on my iOS device!


After modifying my code as the following, our apps also run ok on iOS devices!

Taking up the full browser screen solve my previous problem!

many thanks!


Thanks Kevin. Did you not have a viewport meta tag before? Assuming that’s what fixes it, I would still like to look into this to make sure it’s not a bug on our end.

We do not have a viewport meta tag before.