question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Edge and IE lose context to 'Window' with webpack-example

See original GitHub issue

Observe

  1. Clone https://github.com/AnalyticalGraphicsInc/cesium-webpack-example
  2. Replace cesium declaration in the package.json: Replace this: "dependencies": { "cesium": "http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/no-import-meta/cesium-1.62.0-no-import-meta32711.tgz" }, with: "dependencies": { "cesium": "^1.63.1" },
  3. Run npm install
  4. Run npm start
  5. Navigate to localhost:8080 using IE, Edge, Firefox, and Chrome.
  6. Observe the following: IE & Edge report a Web GL problem. FireFox and Chrome has no issues.

Error in IE & Edge dev console:

Error constructing CesiumWidget. Visit a href="http://get.webgl.org">http://get.webgl.org/a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below: TypeError: Invalid calling object TypeError: Invalid calling object at requestAnimationFramePolyFill (eval code:68:9) at startRenderLoop (eval code:93:9) at useDefaultRenderLoop.set (eval code:549:25) at CesiumWidget (eval code:354:13) at Viewer (eval code:417:9) at componentDidMount (eval code:65:9) at wrappedMethod (eval code:704:7) at commitLifeCycles (eval code:21963:13) at commitLayoutEffects (eval code:25287:7) at callCallback (eval code:363:9)

Work Around

Edit requestAnimationFramePolyFill function in node_module code: cesium/Source/Core/requestAnimationFrame.js

replace return implementation(callback) with:

var boundImplementation = implementation.bind(window);
return boundImplementation(callback); `

This works because the context within requestAnimationFrame is lost for some reason before function call.

My Browser Versions

Edge: 41.16299.1419.0 EdgeHTML 16.16299

IE: 11.1451.16299.0CO Update Versions: 11.0.155

Chrome: 78.0.3904.97

Firefox: 68.2.0esr

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
OmarShehatacommented, Nov 11, 2019

Thanks for posting the exact steps to reproduce @e-dong. I’m marking this as a bug here until we can verify if this is an issue with the webpack example perhaps missing something in the build step or an issue that should be resolved in CesiumJS itself.

0reactions
ggetzcommented, Sep 22, 2022

Closing this due to the fact that we’ve dropped support for IE, and https://github.com/CesiumGS/cesium-webpack-example has since been updated.

@e-dong If you are still seeing this issue when building with the latest recommendations for webpack, please open an issue in https://github.com/CesiumGS/cesium-webpack-example. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Edge and IE lose context to 'Window' with webpack-example
This works because the context within requestAnimationFrame is lost for some reason before function call. My Browser Versions. Edge: 41.16299.
Read more >
Tree Shaking - webpack
Tree shaking is a term commonly used in the JavaScript context for dead-code elimination. It relies on the static structure of ES2015 module...
Read more >
An in-depth guide to performance optimization with webpack
A good understanding of webpack's underlying principles can vastly improve your bundle size, application performance, and user experience.
Read more >
React Development and Build version not working in IE 11 ...
Development and build version not working in IE 11 and Edge. Here are my webpack config and package json file.
Read more >
WebPack For Visual Studio Developers - Telerik Blogs
That will put the Kendo UI CSS files in Content and the JavaScript in Scripts . Add A package.json File. Open up a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found