Error: Cannot unwrap symbol

Hello! Met plugin error in development process:

figma_app.min.js.br:5 Error: in postMessage: Cannot unwrap symbol
    at Object.postMessage (eval at <anonymous> (eval at createScopedEvaluatorFactory (03b877b0-1906-4ddd-92e2-48a05c2b4ecd:1:6906)), <anonymous>:23:21)
    at figma.ui.onmessage (controller.ts:23:1)
    at uar.callFunction (figma_app.min.js.br:707:4755)
    at Lee.iframeMessageHandler (figma_app.min.js.br:1436:5769)
    at UNo.toplevelWindowMessageChannel.port2.onmessage (figma_app.min.js.br:1404:5229)

at figma.ui.onmessage (controller.ts:23:1) I am using figma.listAvailableFontsAsync and have following code:

figma.ui.onmessage = (msg) => {
  if (msg.type === 'parse-system') {
    figma.listAvailableFontsAsync().then((res) => {    <<<< 23 line
      figma.ui.postMessage({
        type: 'pass-systemFontNames',
        message: res,
      });
    });
  }
};

I was testing this method inside my ‘playground’ Figma file. On newly created pages it works fine, but on pages that I created a year ago I see this error. How can I fix this? Thanks!

Setup:

  • mac m1, os: Ventura 13.0.1 (22A400)
  • Figma Desktop App version 116.5.18
  • (Figma) “api”: “1.0.0”
  • “webpack”: “^5.74.0”
  • “react”: “^18.2.0”