Open StigNygaard opened 1 month ago
Okay, I see I'm not the first one reporting this: https://github.com/microsoft/MicrosoftEdge-Extensions/issues/136 https://github.com/microsoft/MicrosoftEdge-Extensions/issues/165
Hi @StigNygaard, we want to express our gratitude for your understanding and patience. Please be assured that the similar feedback has already been forwarded to our engineering team, and they are diligently working on it. Your patience during this process is greatly appreciated.
We understand the importance of this issue and once we have an update or need further information, we will get back to you promptly. We appreciate your contribution to improving the platform.
Bonus question/comment. A bit off-topic. But only a bit, it is still about cross-browser flexibility in manifest file and what Partner Center will allow me to upload...
I have another extension which requests the two related permissions "menus" and "contextMenus". Safari recognize "menus" as an alias for "contextMenus" and in Firefox "menus" represents a superset of "contextMenus" adding support for finding the exact DOM-element a context-menu was opened from. I don't think Chromium browsers recognize the "menus" permission(?), but I can still manually install and use the extension of mine in Chromium browsers.
My extension takes advantage of the extra feature (in Firefox) of "menus" when available, but also works without the extra feature. I use it by eventually redefining contextMenus like this:
globalThis.browser ??= chrome;
if (browser.menus?.getTargetElement) {
browser.contextMenus = browser.menus;
}
So the question is, would Partner Center accept a manifest defining permissions something like this (with both "menus" and "contextMenus"):
"permissions": [
"scripting",
"contextMenus",
"menus",
"storage"
],
I can install the extension manually in Edge. It works fine.
Maybe I should just try it, but there's some more work I want to do on extension and especially documentation (introduction) before eventually making it "officially" available for Chromium browsers.
Hey @StigNygaard, thank you for providing additional information. We will respond with an update once we hear back from our team. We appreciate your patience in the meantime.
The issue
Google/Chrome, Mozilla/Firefox and Apple/Safari all allow MV3 webextensions defining both
background.service_worker
andbackground.script
in the manifest. In such cases browser will use only one of them and prefer the service_worker if the browser supports it. As documented here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_supportWhile making the latest version of my Flickr Fixr webextension, I didn't even consider there could be a problem when uploading to MS Partner Center. I have tested the extension by manually installing in Edge, and it works perfect.
However when I upload to Partner Center, I get "package failed certification" error:
To Reproduce
I'm guessing issue can be reproduced by uploading any MV3 webextension having both
background.service_worker
andbackground.script
defined in the manifest.Expected behavior
I had hoped/assumed it would accept the extension. Maybe with a warning, but not an error stopping me from publishing it.
Screenshots
Desktop
Probably not relevant, but I logged into Partner Center using Firefox 128 on Windows 11.
Additional context
https://discourse.mozilla.org/t/mv3-background-scripts-vs-serviceworkers-ms-edge-didnt-get-the-memo/133613 https://blog.mozilla.org/addons/2024/03/13/manifest-v3-manifest-v2-march-2024-update/ https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_support https://github.com/StigNygaard/Stigs_Flickr_Fixr https://github.com/StigNygaard/Stigs_Flickr_Fixr/blob/master/WebExtension/manifest.json Current Flickr Fixr available for Edge: https://microsoftedge.microsoft.com/addons/detail/ieinimkepkfmmpeakdgnoikimokffneh