-
Notifications
You must be signed in to change notification settings - Fork 144
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
Uncaught RangeError: WebAssembly.Instance(): Out of memory: wasm memory #301
Comments
The If a runtime doesn't allow using enough memory to match the parameters used by your application, you can reduce the memory parameter, and bump the number of iterations up as a counterbalance. |
I have the same issue. However, I can't change the parameters to the function in question since it's part of a dependency I use. Would it be possible to address this bug in this library? |
This is not a bug :) If you're calling a function that requires reserving a lot of memory, but the browser doesn't allow reserving that much memory, there are no ways to work around this. Your application needs to use less memory. |
Well, doing It may be worth mentioning that I only get the error when I run the code in an Intel SGX enclave (that has a size >8GB), so it may be related to that. However, I can't really investigate this because the error gives no stack trace. |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
Hi, when using function sodium.crypto_pwhash in webview on a mobile phone (tested on Samsung S21 and Pixel 3) we randomly get this error:
“Uncaught RangeError: WebAssembly.Instance(): Out of memory: wasm memory”
According to this article: https://blog.stackblitz.com/posts/debugging-v8-webassembly/ the only way to solve this is to optimize the code to not instantiate too many wasm modules. Do you think it would be possible to optimize the code in this library and fix the bug on mobile devices?
The text was updated successfully, but these errors were encountered: