2

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
1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.