[BUG] Uncaught TypeError: Illegal invocation with react-dom
See original GitHub issue- I have searched for existing issues that already reported this problem and found none
Describe the bug
when react-dom is @required to a user script,
react-dom will use window.event
, and access window.event
will cause Illegal invocation
and after I attach window.__t__ = t
don’t know how to trigger this behavior, after this error
following setState
calls will fail
To Reproduce Note that issues without a reproduction may be closed immediately! Steps to reproduce the behavior: 1. 2. 3.
Expected behavior A clear and concise description of what you expected to happen.
Actual behavior If applicable, add screenshots to help explain your problem.
What is the result in the upcoming release? WARNING! Do an export in settings before testing!
Environment:
- OS: macOS
- Browser: chrome
- Browser Version: 100.0.4896.127
- Violentmonkey Version: 2.13.0 & Violentmonkey BETA 2.13.0.18
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Error: "Uncaught TypeError: Illegal invocation" · Issue #986
When scrolling in a List component, do I get the exception Uncaught TypeError: Illegal invocation in Chrome. The error is thrown at ...
Read more >TypeError: Illegal Invocation - Stack Overflow
This error seems to be generated by a number of browsers (Chrome, Opera, Safari, mobile browsers) on many platforms (Android, Windows 10, OS...
Read more >[Solved]-TypeError: Illegal Invocation-Reactjs - appsloveworld
In our case, we only saw Type Error: Illegal Invocation, but didn't see the other error message variants based on different browsers that...
Read more >"Illegal invocation" errors in JavaScript - Matias Kinnunen
An "illegal invocation" error is thrown when calling a function whose this keyword doesn't refer to the object where it originally did. In...
Read more >destroy is not a function at safelycalldestroy - You.com
Today or yesterday this bug started showing up, where when React hot-loads in response to a change in a file, it crashes every...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks, fixed in bc08540a. Test build: zip
source repo https://github.com/magicdawn/violentmonkey-react-issue