Search code examples
google-chromefirefoxgoogle-chrome-extensionchrome-web-storefirefox-addon-webextensions

Unrecognized manifest key 'applications'. warning for Google Chrome


I have created my Web Extension for Firefox which uses Chrome Extension API.

But Firefox requires application key in manifest.json

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json

If I load the same extension for Google Chrome, Chrome warns as:

There were warnings when trying to install this extension:
Unrecognized manifest key 'applications'.

Although the extension works, I am not sure if I can send a Firefox Web Extension to Google Chrome Store with this manifest file.

I can create another project for Google Chrome but I want to keep a single folder that may work for both Firefox and Google Chrome without any warnings.

How I am suppose to fix this warning while keeping Firefox requirements?


Solution

  • You probably want to generate separate manifest files even if everything else is unchanged. After all, the docs state:

    applications. Only supported in Gecko.

    My recommendation is a build script that copies over the files and the correct manifest for each version (or dynamically generates the correct manifest if you want fancy).