-
Notifications
You must be signed in to change notification settings - Fork 64
Not able to use library inside html5 web worker #7
Comments
This is still affected. Error: No secure random number generator found app.js:25281 Which is related to
I am looking into this |
This is not only a problem for us. The web worker does not have access to the window.crypto Problem description: possible solutions: |
The problem is that webworkers do not have access to the dom, where window.crypto is accessible. lisk-js uses the cryptographic functions from the window.crypto.getRandomValues function. There is currently no way to use window.crypto within a webworker or pass it to the webworker. As discussed here: http://stackoverflow.com/questions/13004375/running-window-crypto-getrandomvalues-from-inside-a-web-worker The solution I could think of is using the lisk-js functions before the webworker, then pass in the necessary information to the webworker and let it do its job. Note that only cryptographic functions are not available in the webworker, but it makes whole lisk-js fail at this point. |
Lisk JS does not work when required inside of a html5 web worker, affecting any 3rd party integration which rely on them.
The text was updated successfully, but these errors were encountered: