Is my manifest.json fully compliant to Manifest v3? - google-chrome-extension

Recently, I have been working on a Chrome plug-in with co-workers and I must admit that I do not have much experience with Chrome extensions. We already published one version. Now, I just submitted a second release.
I am aware that following the Manifest v3 rules helps to speed up the review process. Also, I believe we are following the rules and we really need to have a fast review process.
However, I keep seeing this message:
It points to the official documentation on the topic: Migrating to Manifest v3 which includes a check-list.
This message makes me suspicious that I might have made some mistakes.
Hence, I would like to show my manifest.json:
{
"name": "My plug-in name",
"description": "Auto-fill some specific forms",
"version": "0.0.22",
"manifest_version": 3,
"action": {
"default_popup": "src/importer/popup.html",
"default_icon": "src/importer/img/company-logo.png"
},
"icons": {
"128": "src/importer/img/company-icon.png"
},
"permissions": ["activeTab", "scripting"],
"background": {
"service_worker": "src/importer/background.js"
},
"content_scripts": [
{ "js": ["src/importer/content-script.js"],
"matches": ["https://*.onewebsite.com/*"] }
]
}
It seems to be correct.
Am I missing something? Is the extension Manifest V3 compliant?
Should I ignore Chrome Web Store alert?

Related

Package load error when migrating Chrome extension from Manifest v2 to Manifest v3

I built a small Chrome extension that works properly using the Chrome extension Manifest v2; however, support for v2 has been deprecated and updates must be published using Manifest v3.
Seems straightforward enough but Chrome throws an error when trying to load the unpacked extension with the new Manifest. Moreover, the error that it throws seems unrelated to the code I wrote and refers to one of the common libraries that I imported. The libraries I import include debounce for lodash, get from lodash, cheerio, and axios.
Here are both versions of the manifest followed by the error that Chrome throws when loading the extension via the new manifest.
Any pointers would be greatly appreciated. Thank you so much!
Manifest v2
{
"name": "LastBottle Price Checker",
"version": "1.0.0",
"description": "Fact-check the retail and web prices advertised on LastBottleWines.com by viewing crowd-sourced from consumers.",
"manifest_version": 2,
"icons": {
"128": "icon128.png"
},
"permissions": ["*://www.vivino.com/*", "*://api.vivino.com/", "unlimitedStorage", "activeTab"],
"content_scripts": [
{
"matches": ["https://www.lastbottlewines.com/*"],
"js": ["contentScript.js"]
}
],
"background": {
"scripts": ["bgScript.js"],
"persistent": false
}
}
Manifest v3
{
"name": "LastBottle Assistant",
"version": "1.0.0",
"description": "Fact-check the retail and web prices advertised on LastBottleWines.com by viewing crowd-sourced from consumers.",
"manifest_version": 3,
"icons": {
"128": "icon128.png"
},
"permissions": ["unlimitedStorage", "activeTab"],
"host_permissions": ["*://www.vivino.com/*","*://api.vivino.com/"],
"content_scripts": [
{
"matches": ["https://www.lastbottlewines.com/*"],
"js": ["contentScript.js"]
}
],
"minimum_chrome_version": "93",
"background": {
"service_worker": "bgScript.js",
"type": "module"
}
}
Error thrown by Chrome when loading unpacked extension
The first message is seemingly caused by the second...
I tried following Google's guide for migrating to Manifest v2, including the move from the background scripts to the service_worker framework. The service_worker conforms to the single JS file requirement and unchanged from the single JS file that worked properly when run in the previous manifest. The service_worker also meets the stated requirement of not interacting with the DOM.

Chrome extension "fails" to register service worker in citrix

While developing a chrome extension and delivering to users via GPO, for some reason after the installation of the extension on chrome the service worker do not register on chrome in Citrix environment. That seems to be a problem only with Manifest V3.
Things to note:
Installation is successful on chrome, I can see the icon on chrome://extensions/, but the service worker appears "Inactive".
This particular extension is hosted on private web server.
After restarting chrome, sometimes the service worker is successfully registered.
To see if the service worker was registered, I checked on chrome://serviceworker-internals/.
What I have tried so far:
When the installation is successful, on the service worker I used this approach:
chrome.runtime.onInstalled.addListener(function (value) {
if (value.reason == 'install') {
setTimeout(function () {
chrome.runtime.reload();
console.log('Reload!');
}, 2000)
}
})
But since the service worker keeps "Inactive" and not registered on chrome://serviceworker-internals/, it didn't work.
I checked that the problem only happens in Citrix environment with non-permanent images, meaning that the extension will install in every user logon via GPO.
This extension does not have a default popup, it's supposed to work entirely on service workers, without a user interface.
I checked that with manifest V2 extensions, on the same environment, everything works fine.
If I add a popup, sometimes when the user clicks on the popup, the registration of the worker starts. Same behavior as restarting chrome.
I did not find any mention to this problem anywhere, since it's so specific.
Note: I can't share any part of the service worker since it's a private extension, but I'll share the manifest below, but keep in mind that the installation works fine as I mentioned before.
So, I'm looking for any idea on what is going on before sending an issue on chrome.
manifest.json:
{
"manifest_version": 3,
"name": "",
"description": "",
"version": "1.0",
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"matches": [ "<all_urls>" ],
"css": [ "logic.js" ]
}
],
"permissions": [ "storage", "declarativeContent", "activeTab", "scripting", "tabs", "webNavigation", "nativeMessaging" ],
"host_permissions": [ "https://*/*" ],
"action": {
"default_icon": {
"16": "/images/logo16.png",
"32": "/images/logo32.png",
"48": "/images/logo48.png",
"128": "/images/logo128.png"
}
},
"icons": {
"16": "/images/logo16.png",
"32": "/images/logo32.png",
"48": "/images/logo48.png",
"128": "/images/logo128.png"
}
}

Why does my chrome extension ask for history permissions?

In my manifest.json file, I have nothing explicitly listed for reading a user's history, however, this warning comes up when you try to install the extension.
Here is my manifest file:
{
"manifest_version": 2,
"name": "QueueTube for YouTube!",
"short_name": "QueueTube",
"description": "Search YouTube without stopping the video, and make your own playlists!",
"version": "1.5",
"author": "Dara Javaherian",
"permissions": ["tabs", "*://*.youtube.com/*"],
"background": {
"persistent":true,
"scripts": [
"bg/socket.io.js",
"bg/background.js"
]
},
"icons": {
"128": "icons/youtube-128.png"
},
"browser_action": {
"default_icon": "icons/icon.png",
"default_popup": "popup/popup.html"
},
"web_accessible_resources": [
"spinner.gif"
],
"content_scripts" : [{
"matches" :
["https://www.youtube.com/*",
"http://www.youtube.com/*"],
"js" : [
"js/jquery.js",
"js/inject.js"],
"css" : ["styles/styles.css"]
}]
}
Does anyone know why this permission is showing up?
This is the standard warning for the "tabs" permission.
It allows you to query, and be notified of changes, to URLs of all tabs. This allows you to spy on the user's history in real time - even if you don't have access to the browser's own history log.
Note that "tabs" permission is not required in most cases. Providing access to URLs is basically the only reason to include it. You can use most of the tabs API without it, and can get access to current tab without warning using the "activeTab" permission.
Warnings and their triggers
It can be surprising when adding a permission such as "tabs" results
in the seemingly unrelated warning that the extension can access your
browsing activity. The reason for the warning is that although the
chrome.tabs API might be used only to open new tabs, it can also be
used to see the URL that's associated with every newly opened tab
(using their tabs.Tab objects)
Source: https://developer.chrome.com/extensions/permission_warnings

How to change offeredby/developer information in chrome extension? [duplicate]

This question already has an answer here:
Change "from [name]"/"offered by [name]" in a Chrome extension's Webstore listing
(1 answer)
Closed 6 years ago.
I just created a chrome extension, I wanted to know how to change the "offered by" and "developer" information. Check the screenshot below I have underlined the information I am referring to.
I found this one old SO thread - How to specify author of Extension in Manifest file.
And I have tried something like this
{
"browser_action": {
"default_icon": "icons/logo.png",
"default_popup": "popup.html",
"default_title": "Timezone Convertor"
},
"description": "The all in one, timezone plugin you had been waiting for!",
"manifest_version": 2,
"name": "Timezone Convertor",
"permissions": [ "storage", "tabs", "http://*/*", "https://*/*" ],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "1.5",
"authors": [{"name": "Ali Rizvi", "email": "example#gmail.com"}, {"name": "Yasser R Shaikh", "email": "example#gmail.com"}]
}
But it doesnt work. Google's manifest documentation also doesnt have much information about it.
Those were in manifests v1 (Also explained here). For v2 and v3 extensions they are changed in the Chrome Web Store Developer Dashboard.
Instructions updated 2023:
Visit https://chrome.google.com/webstore/devconsole and login
Your account settings can be accessed by clicking the "Account" button in the upper left corner

Chrome extension to add event in google calendar('background_page' requires manifest version of 1 or lower.)

I am a beginner for the chrome extension. I have found a demo to add event to google calendar, I have solved some problems for this demo, but it doesn't word yet... Now I have a problem and I don't know how to fix it
L'installation de cette extension a généré des avertissements :
'background_page' requires manifest version of 1 or lower.
manifest.json :
{
"name": "Add Event to Google Calendar",
"version": "1.4.1",
"manifest_version": 2,
"description": "A user can add events to Google Calendar by simply highlighting dates that appear on a webpage.",
"icons": { "48": "calendar48.png", "128": "calendar128.png" },
"background_page": "background.html",
"permissions": [
"tabs", "http://*/*", "https://*/*", "http://www.google.com/"
],
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["jquery.js", "date.js", "content_script.js"]
}
]
}
background.html
I can not post background.html here, because it is too long...please download this here Add-to-Calendar-Chrome-Extension
Thank you very much!
Google are changing the manifest version requirements for Chrome as detailed in this link.
The warning is only visible with "Developer mode" active. They don't affect end-user. You can also consider using minimum_chrome_version to block users with older browsers from downloading your latest update. Downgrade to manifest_version: 1, wait for everyone to download downgraded version and, yet again, push update with manifest_version: 2 this time adding minimum_chrome_version: 18.
The background_page property has been replaced with a background. That property contains scripts, either a page or property. Details are available in the Event Pages documentation.
You may check this forum.

Resources