I am trying to build a Firefox extension using Native Messaging on MacOS.
I was referring to this example.
When I have only one line in my background.js:
let port = browser.runtime.connectNative("ping_pong");
Loading the extension gives the following errors:
DataCloneError: Exception object could not be cloned. subprocess_worker_common.js:203:15
onmessage resource://gre/modules/subprocess/subprocess_worker_common.js:203
NotSupportedError: ClonedErrorHolder constructor: We can only clone DOM Exceptions and native JS Error objects: onConnect/<@resource://gre/modules/NativeMessaging.sys.mjs:140:48
handler@resource://gre/modules/EventEmitter.sys.mjs:91:19
emit@resource://gre/modules/EventEmitter.sys.mjs:154:20
_cleanup@resource://gre/modules/NativeMessaging.sys.mjs:291:12
NativeApp/this.startupPromise<@resource://gre/modules/NativeMessaging.sys.mjs:116:14
EventEmitter.sys.mjs:158
undefined NativeMessaging.sys.mjs:115
startupPromise resource://gre/modules/NativeMessaging.sys.mjs:115
I am not sure if Firefox is bugged.
- Firefox version: 118.0.2 (64-bit)
- MacOS: Ventura 13.5.1