1

I am using Windows 10 64Bits, Mozilla Firefox 76.0.1 and building a native messaging plugin. Works perfect on Chrome, but not in Firefox.

Now after I hit this bugreport describing my issues with 64bits Windows and Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1494709 I found this documentation https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests#Windows

So, I adjusted my register script to:

:: Change HKCU to HKLM if you want to install globally.
:: %~dp0 is the directory containing this bat script and ends with a backslash.
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.testapp" /ve /t REG_SZ /d "%~dp0com.testapp.json" /f
REG ADD "HKCU\Software\Mozilla\NativeMessagingHosts\com.testapp" /ve /t REG_SZ /d "%~dp0com.testapp.json" /f
REG ADD "HKLM\Software\WOW6432Node\Mozilla\NativeMessagingHosts\com.testapp" /ve /t REG_SZ /d "%~dp0com.testapp.json" /f

I checked the values in my registry and they are correct. The have the correct name and pointing to the manifest file with a full path and file extension. I use the below Native Messaging manifest:

{
    "name": "com.testapp",
    "description": "Test FF/Chrome plugin",
    "path": "C:\\Temp\\NativeHost.exe",
    "type": "stdio",
    "allowed_origins": [
        "chrome-extension://inommcgcdahcocksfinofjgoeaodehnbno/"
    ],
    "allowed_extensions": [
        "c2bc27e2-933a-1337-1337-45de27457976@wearewunder.com"
    ]
}

For some reason Firefox is still giving me this error:

Error: "No such native application com.testapp"

What am I missing?

halfer
  • 19,824
  • 17
  • 99
  • 186
Digital Human
  • 1,599
  • 1
  • 16
  • 26

1 Answers1

0

You probably have comments in your host manifest json file.

Remove the comments and try, for me it was the solution...