-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
await sodium.ready
never resolves
#188
Comments
Oh, it might be CSP related in the browser:
Not sure about jest, maybe it's not happy with the webassembly loader either. |
If I add |
Does version 0.7.5 load for you? I could not get However, I am now getting this I am not sure what this CSP error means for the overall behavior of the library. The library does seem to load. I can run sodium.ready. But it does seem like a bad idea to add the directive to the CSP that's necessary to get rid of this error. |
Good question--I can't test easily since I've since left the project where I was working on this problem. As the project progressed, I put the libsodium machinery inside a WebWorker, which seemed to have fixed (or at least silenced?) the CSP issue. But yes I agree, it would be nice if the WebAssembly were shipped as a separate |
Hi all!
I can use libsodium-wrappers 0.7.4 just fine in the node console--the
sodium.ready
promise resolves and everything works as promised.But if I try to use it in Chrome or in my jest (jsDOM) tests, I get an uncaught exception "TypeError: f is not a function" on column 12449 and the promise just hangs.
The text was updated successfully, but these errors were encountered: