Running pretty much any asynchronous code will result in the error:
Uncaught (in promise) RuntimeError: function signature mismatch
Is my env setup wrong? I’ve gone through three brand new project setups and get this error every time. Has anyone else faced this issue?
For context: I have an async function at the root of my project plugin code, even running await new Promise(resolve => setTimeout(resolve, 1000)); will result in the error.
As far as I can tell the code will keep running, as long as it doesn’t rely on the asynchronous piece.
The error will only happen on the return from the await-ed funciton.
I had the same issue and solved it with “await”.
I called “figma.loadFontAsync” in an async function, but I didn’t add the “await” statement when calling that function. So adding the “await” solved the problem for me.