Freshdesk: Server Method Invocation (SMI) MessagePort Error

Hello dear Community,

I am currently facing an issue when invoking a server method from the frontend app. The browser returns an error “Uncaught (in promise) DOMException: Failed to execute ‘postMessage’ on ‘MessagePort’: Event object could not be cloned.”


I attached the app as it is just the base app created from fdk with a changed manifest file and added server.js.
new-ticket-background.zip (4.7 KB)

I tried to publish the app and run it on our site directly to see if it’s not an issue with the local “debugger” but that didn’t fix it, it just didn’t do or log anything.

Any help would be appreciated :slight_smile:

Thank you kindly

Wesely

@Wesely,
Seems like there is an issue with adding the script in template.html,
you had added async for freshclient and defer for app.js, I had modified in the below script :point_down:

<!DOCTYPE html>

<html lang="en">

<head>
  <title>A Template App</title>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <script defer src="https://static.freshdev.io/fdk/2.0/assets/fresh_client.js"></script>
  <link rel="stylesheet" type="text/css" href="styles/style.css" />
</head>

<body id="body"></body>
<script defer type="module" src="https://unpkg.com/@freshworks/crayons@3/dist/crayons/crayons.esm.js"></script>
<script defer nomodule src="https://unpkg.com/@freshworks/crayons@3/dist/crayons/crayons.js"></script>

<script defer src="scripts/app.js"></script>

</html>

kindly revert back if if is not worked.

Thanks