Implementation issues in the data structures returned by the plugin API can cause penpot.ui.sendMessage to fail with an error like this:
plugin sendMessage: the message could not be cloned. Ensure the message does not contain functions, DOM nodes, or other non-serializable values. DataCloneError: Failed to execute 'structuredClone' on 'Window': [object Array] could not be cloned.
sendMessage is used to provide the content to be sent back to the MCP server over the WebSocket by the MCP server.
If sendMessage fails, the MCP server thus never gets a response, triggering a timeout on the MCP server side.
This should be prevented, i.e. the operation should fail fast.
Implementation issues in the data structures returned by the plugin API can cause
penpot.ui.sendMessageto fail with an error like this:sendMessageis used to provide the content to be sent back to the MCP server over the WebSocket by the MCP server.If
sendMessagefails, the MCP server thus never gets a response, triggering a timeout on the MCP server side.This should be prevented, i.e. the operation should fail fast.