Native Messaging extension in firefox not working

70 Views Asked by At

I am testing native messaging in Firefox extensions using the example at https://github.com/mdn/webextensions-examples/tree/main/native-messaging.

I have the add-on directory copied into a ~/extensions directory on my machine, and I have copied the app directory into the ~/.mozzila/native-messaging-hosts directory and changed the path in ping_pong.json to point to the new path of ping_pong.py. Performing ./ping_pong.py from within this directory will successfully run the native application.

However, running the extension as a temporary add-on causes the error of: AbortError: Native application start canceled by user NativeMessaging.sys.mjs:178 and NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINativeMessagingPortal.closeSession] in the browser console.

My version of Firefox is 122.0, and is ran from /usr/bin/firefox. I am on Ubuntu 23.04. Any idea on what I am doing wrong and how to fix it?

0

There are 0 best solutions below