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.

Error: "Uncaught TypeError: Illegal invocation"

See original GitHub issue

When scrolling in a List component, do I get the exception Uncaught TypeError: Illegal invocation in Chrome. The error is thrown at https://github.com/bvaughn/react-virtualized/blob/9.18.0/source/utils/requestAnimationTimeout.js#L33.

My setup:

  "dependencies": {
    "babel-core": "^6.25.0",
    "babel-loader": "7.x",
    "babel-plugin-add-module-exports": "^0.2.1",
    "babel-plugin-syntax-dynamic-import": "^6.18.0",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-polyfill": "^6.23.0",
    "babel-preset-env": "^1.5.2",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.22.0",
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "webpack": "^3.0.0",
    "webpack-dev-server": "^2.5.0"
    ...
  }

This issue seems to be related: https://github.com/fritz-c/react-sortable-tree/issues/230

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
vlebedeffcommented, Feb 13, 2018

@bvaughn I got the same error. I think the reason is the fact that raf and caf from utils/animationFrame are not bound to window and lose context.

1reaction
joeandrewscommented, Apr 23, 2018

After more investigation this is a webpack issue. Global functions get called in the wrong context in Webpack 3. If you upgrade to Webpack 4 (you will also need to update any webpack plugins) this is fixed.

https://github.com/webpack/webpack/issues/5111

Hope this helps people and thanks for the library! @bvaughn

Read more comments on GitHub >

github_iconTop Results From Across the Web

JQuery: 'Uncaught TypeError: Illegal invocation' at ajax ...
My illegal invocation error on $.getJSON was caused by passing undefined as one of the values for the data object.
Read more >
Uncaught TypeError: Illegal invocation
Hi, I am getting the above error and can't figure our why? kindly help.. This is my code: var formData = new FormData(); ......
Read more >
Uncaught TypeError: Illegal invocation in Ajax function
Uncaught TypeError: Illegal invocation in Ajax function. I'm trying to send a form to my handler, but I get an error "Uncaught TypeError:...
Read more >
Getting the Error Illegal Invocation at Object - JavaScript
“Uncaught TypeError: 'querySelector' called on an object that does not implement interface Element. findOne selector-engine.js:26”. In Edge I'm ...
Read more >
"Uncaught TypeError: Illegal invocation" error thrown in js- ...
I've seen a few reports of this before “Uncaught TypeError: Illegal invocation” and it turned out to be a third-party script that was ......
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