Hi all,
We’ve built a Figma plugin that converts frames into MJML/HTML using a WebAssembly module. On some machines the plugin works fine, but on others (mostly Macs with Apple Silicon) it crashes part-way through with this error:

What happens:
-
Some components (usually text) render successfully.
-
As soon as the plugin hits a problematic component, it throws the error and everything after that fails to generate.
-
The issue isn’t consistent — some users/accounts never see it, while others hit it frequently.
What we’ve tried:
-
Clearing Figma caches and reinstalling the desktop app.
-
Testing on multiple accounts and machines.
-
Disabling Cloudflare/WAF rules on our API.
-
The problem still persists.
Impact:
Users can’t reliably export frames — exports stop midway and produce incomplete output.
Suspected cause:
It looks like the WASM module is running out of memory or hitting a bug with certain text inputs. The error consistently comes from the WASM runtime.
Has anyone run into this before with plugins that use WASM?
-
Are there known memory limits in Figma’s plugin environment that could explain this?
-
Any best practices for handling text safely to avoid these crashes?
-
Would recompiling the WASM with different memory settings help?
Any guidance would be greatly appreciated — we’d love to make the plugin more reliable for users across all machines.
Thanks!