Skip to main content
Wes_Barichak
New Participant
Jan 31, 2025 1:32 AM UTC
Question

RuntimeError: null function or function signature mismatch in plugin

Just updated my desktop app to and am getting runtime errors pretty consistently on plugins I’ve built that were previously running fine. 

Here’s the console error:

jsvm-cpp.wasm.br:0x23113 Uncaught (in promise) RuntimeError: memory access out of bounds
    at jsvm-cpp.wasm.br:0x23113
    at jsvm-cpp.wasm.br:0x3a412
    at jsvm-cpp.wasm.br:0x26724
    at jsvm-cpp.wasm.br:0x33106
    at jsvm-cpp.wasm.br:0x2c352
    at jsvm-cpp.wasm.br:0x2bab3
    at jsvm-cpp.wasm.br:0x11f6
    at jsvm-cpp.wasm.br:0x6188
    at 2430-23a15bad9b36a906.min.js.br:797:87469

Once I start seeing this error, the plugin refuses to open until I restart the app. After it restarts, I can open the app a few times before the error starts back up again.

The issue seems to be with loading fonts. If I remove all the font code, the plugin opens without complaint. Something has changed in the latest update that seems to be causing this issue.
 

const setup = async () => {

  console.log('Loading the necessary fonts... ');



  await figma.loadFontAsync({ family: 'Sun Life Sans', style: 'Regular' });

  await figma.loadFontAsync({ family: 'Sun Life Sans', style: 'Medium' });

  await figma.loadFontAsync({ family: 'Sun Life Sans', style: 'Bold' });

  await figma.loadFontAsync({ family: 'Sun Life New Text', style: 'Regular' });

  await figma.loadFontAsync({ family: 'Sun Life New Text', style: 'Bold' });

  await figma.loadFontAsync({ family: 'Sun Life New Text', style: 'Italic' });

  await figma.loadFontAsync({ family: 'Sun Life New Display', style: 'Bold' });

  await figma.loadFontAsync({ family: 'Sun Life New Display', style: 'Regular' });

  await figma.loadFontAsync({ family: 'Inter', style: 'Regular' });

  await figma.loadFontAsync({ family: 'Agenda', style: 'Bold' });

  await figma.loadFontAsync({ family: 'Agenda', style: 'Medium' });

  await figma.loadFontAsync({ family: 'Agenda Light', style: 'Regular' });

};



setup().then(async () => {

  // Show the UI

  figma.showUI(__html__, { width: 450, height: 600 });

});



figma.ui.onmessage = async (msg) => {

  if (blah blah) {

    // app logic

  } else {

    figma.closePlugin();

  }

};

 

 

    This topic has been closed for replies.

    2 replies

    y_toku
    Figmate
    Community Support
    Jan 31, 2025 2:20 AM UTC

    Hi  @Wes_Barichak , 

     

    Thanks for reaching out.  To look into this, could you please specify whether this issue is related to your published plugin or a local plugin in development? If it's a published plugin, could you also provide the name of the plugin?

    Do you also have issues with each of those fonts? I see a Sun Life one, Inter, and Agenda.  Our team confirmed there were no issues loading Inter, the others might be local fonts. 

    Thanks,

    Toku

    Wes_Barichak
    New Participant
    Feb 12, 2025 9:41 PM UTC

    ​@y_toku Apologies for the late reply! This was a local plugin in development.

    The issue magically resolved itself. And I don’t really know what changed!