Migrate Chrome extension to Mozilla Addon

I just got started in Chrome extension development and got it published in the Chrome store and Edge marketplace.

Why isn’t the same code not getting accepted at Mozilla Addons ? manifest_version is 3, which Mozilla says should be 2 - but the upload fails even if I change to 2.

What should I be looking for, for FireFox specific addon development ?

Well, this is a very unfortunate time to migrate Chrome/Edge extension to Firefox.
Chrome now requires Manifest V3, but Firefox only supports V2. The V3 support should come by the end of the year though.

Also, there are some big differences between V2/V3, so unless you are releasing “hello world” extension :slight_smile: , there is only a small chance the Chrome extension will work in Firefox simply by changing Manifest file.

You need to study MV2 and make a changes to your manifest file and then depending on the API you use, make changes there.

See the MV2/3 changes here:

Alternatively, you can wait a few months till Firefox finishes MV3 support.

Well - I guess I’ll wait for end of year update from FireFox - that’s not far away.
I just don’t want to have a separate code base for FireFox.
I am also making use of chrome.storage so I guess I would still have to do

var browser = (window.browser)? window.browser : window.chrome;

when Mozilla launches MV3 ?

Firefox supports also “chrome” namespace so no need to use hacks like that :slight_smile:.
Once they have MV3 support, most things should work without any change.

But there is a chance you will still need to use a different manifest file since Chrome uses Service workers and Firefox will initially support only event pages (which is almost the same thing). So to simplify your build process, you may need a simple “build script” that will copy all files from your “src” folder into some “firefox_dist” folder and then replace the manifest file with Firefox specific one.

Anyway, there is no timeline yet (apart from “by the end of this year”), but there will be for sure article about it here: