[3.2.0] Illegal invocation at whatwgRNG
See original GitHub issueJust installed the newest version 3.2.0 and I get this error in Chrome:
Uncaught TypeError: Illegal invocation
at whatwgRNG (rng-browser.js:13)
at v4 (v4.js:13)
Just messed around a bit and it looks like you can not assign the method getRandomValue
from crypto
or msCrypto
to a variable (yeah…ugh, I guess it has to do with browser security).
if you go with
var myCrypto = crypto || msCrypto;
if (typeof myCrypto !== 'undefined') {
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
module.exports = function whatwgRNG() {
myCrypto.getRandomValues(rnds8);
return rnds8;
}
}
it should work.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[3.2.0] Illegal invocation at whatwgRNG · Issue #256 - GitHub
Just installed the newest version 3.2.0 and I get this error in Chrome: Uncaught TypeError: Illegal invocation at whatwgRNG ...
Read more >ajax - jQuery - Illegal invocation - Stack Overflow
Try to set processData: false in ajax settings like this $.ajax({ url : base_url+'index.php', type: 'POST', dataType: 'json', data: data, cache : false, ......
Read more >"Illegal invocation" errors in JavaScript - Matias Kinnunen
"Invocation" is the act invoking a function, which is the same as calling a function. Invoke = call. An "illegal invocation" error is...
Read more >Uncaught TypeError: Illegal invocation - jQuery Forum
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
I'm trying to send a form to my handler, but I get an error "Uncaught TypeError: Illegal invocation". When I try to send...
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 FreeTop 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
Top GitHub Comments
парни, можно как-то по-быстрее это залить?
Guys, you broke lib near our release. Happily we catch it before something bad happens. Stick to 3.1.0 now.