manifest file for native messaging app

Steinhour, Wayne W.Steinhour at
Thu Sep 28 14:18:56 UTC 2017

I'm porting a Chrome extension to a Firefox extension that will use the WebExtension API.  These extensions use Native Messaging to communicate with an application.  I had expected to be able to use the same manifest (json) file for the application.  The specs for the manifest in Chrome and Firefox are very similar, differing only in the keywords used to set the IDs of the extensions that the application can communicate with.

Chrome uses this in the json:
     "allowed_origins": [ "<ID of the extension>" ]

Firefox uses:
    "allowed_extensions": [ "<ID of the extension>" ]

I had expected that I could just add the "allowed_extensions" keyword and array to the manifest, allowing the use of a single manifest file for both browsers.  Chrome seems happy to have both keywords present in the file.  It just ignores the one it does not care about.  Firefox does not like it so much.  It refuses to establish the Port connection between the extension and the app when the "allowed_origins" is present.

Is this the expected behavior or is it a bug in how Firefox is parsing the json?

The work-around is no big deal.  I will need to use a separate manifest file for Chrome and Firefox.  It just seems unexpected to me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Webextensions-support mailing list