Add ALLOW_MEMORY_GROWTH=1
To Reproduce Steps to reproduce the behavior: Encrypt a large file like a video 20 MB using wasm-themis library. Runs out of memory buffer.
- Convert File to Uint8
- Encrypt File using Secure Cell
const bytes = new Uint8Array(file.arrayBuffer());
let symmetricKey = new themis.SymmetricKey()
let sealCell = themis.SecureCellSeal.withKey(symmetricKey)
let contextImprintCell= themis.SecureCellContextImprint.withKey(symmetricKey);
let encryptedWithSeal = sealCell.encrypt(bytes); // this line causes issue
let context = Uint8Array(...)
let encryptedWithContextImprintCelll = contextImprintCell.encrypt(bytes,context); // the same issue
See the following error:

Expected behavior Encryption to work for files
OS: Windows Hardware: not relevant browser computer Themis version: 0.14.6 Installation way: npm
suggested fix: Add ALLOW_MEMORY_GROWTH=1 to fix the issue #928
@radetsky here is an example ^
Thanks for the investigation and the patch, @djaffer!
WasmThemis tests are currently failing for Node v16. I'd wait for that to be fixed first before merging this...
'kay, master should have WasmThemis build fixed by now. If CI tests pass, this should good to merge 👍
Thank you for your contribution, @djaffer!
thank you @djaffer
we are releasing Themis hotfix with this patch today (hopefully, 🤞)
Awesome guys! Thank you! If you guys have any other alternatives like breaking files into chunks etc. Please share that too in the documentation.
Also, a humble suggestion/request, if you guys can come up with docker, nodejs alpine builds or any ubuntu alpine with workable themis binaries compiling it will be a huge help. Especially for people who are new to this, it will help with how to compile, etc. We can then be a working hand to you in cases like these. Installing the BoringSSL was a nightmare for me I am not sure if I got it.
we do support docker image, mainly for building themis android https://docs.cossacklabs.com/themis/languages/java/installation-android/#using-docker
but it's based on ubuntu https://github.com/cossacklabs/dockerfiles/blob/master/android-build/Dockerfile
i totally agree that refreshing it + adding alpine makes sense. would you mind creating a separate issue for that? @djaffer
Sure. Thanks @vixentael