aries-framework-go
aries-framework-go copied to clipboard
Aries WebAssembly - call stack issues
Currently running aries wasm in browsers like iOS safari is causing:
maximum call stack size exceeded while performing JSON LD related operations for credentials.
Similar issues found in few other modules in aries.
I'm seeing this with even the simplest of Aries actions such as establishing a connection, but it could be down to using more stack in the JS side. This does seem to be recent, maybe a solution is to run on a secondary thread and up the stack to 4 MB. IIRC, main thread gets only 1 MB of stack.
To give more details, well, not sure how useful, the error is:
Unhandled Promise Rejection: RangeError: Maximum call stack size exceeded.
mono for example has had issues like these before on iOS.
I'm seeing this with even the simplest of Aries actions such as establishing a connection
Can you describe briefly how to reproduce this.
Can you describe briefly how to reproduce this.
There's not really much to describe, it's now happening with the Aries WASM loaded, and the browser console error log reports it as the main function entrypoint into the WASM code.
If you think it could be helpful to open up to the code to you, I believe I can do it. But I also think a minimal reproducible example could be made just by having a limited recursive function in JS whose sole job is to occupy stack before invoking anything from the WASM side.