Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized manifest key 'applications'. warning for Google Chrome

Tags:

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?

like image 957
John Sewell Avatar asked May 10 '16 00:05

John Sewell


People also ask

What is manifest Chrome?

Manifest V3 is the latest set of changes to the Chrome browser's rules for browser extensions. Each extensions manifest version update introduces backwards-incompatible changes to ostensibly move the platform forward.

How do I see manifest of Chrome extensions?

You can just use chrome. runtime. getManifest() to access the manifest data - you don't need to GET it and parse it.

Is manifest V2 still supported?

Manifest V2 support ends in June of 2023 for all Chromium-based browsers.


2 Answers

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).

like image 85
Xan Avatar answered Sep 28 '22 01:09

Xan


Running 68.0b13 (64-bit), I just deleted the "applications" key and body

//  "applications": { //      "gecko": { //          "strict_min_version": "58.0a1" //      } //  }, 

and it works fine without it.

Documentation says:

Note that the ability to develop and debug WebExtensions that don't include an ID is new in Firefox 48. If you need to use an earlier version of Firefox, then you must use the applications key to set an ID explicitly.

My interpretation of that is that the "application" key is NOT necessary for >= Firefox 48.

like image 27
Craig Hicks Avatar answered Sep 28 '22 03:09

Craig Hicks