I'm trying to update my Chrome Extension but when I upload the new one at the Chrome Web Store I get this error.
I tried version: 1.0, 0.1.1, 0.1.2.3 etc..
An error occurred: Failed to process your item.
Invalid version number in manifest: 0.1. Please make sure the newly
uploaded package has a larger version in file manifest.json than the
published package: 2.0.
{
"name": "Stylish Eve",
"description": "Fashion, Hairstyles, Outfits, Home Design and Architecture Blog Magazine",
"browser_action": {
"default_icon": {
"16": "icon-16.png",
"38": "icon-38.png",
"128": "icon-128.png"
},
"default_title": "Stylish Eve",
"default_popup": "labnol.html"
},
"manifest_version": 2,
"update_url": "http://clients2.google.com/service/update2/crx",
"content_security_policy": "script-src 'self' https://www.google.com; object-src 'self'",
"version": "0.1"
}
Try to set the version number to something larger than 2.0 (as it says in the error). 2.0 was probably the last version that you published and the next one has to be bigger.
Related
I'm making a Chrome Extension (using manifest v3) but when I try to "Load Unpacked" I get an error and all it says is Service worker registration failed. Status code: 2. Any help would be much appreciated!
manifest.json
{
"name": "Test",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
}
}
background.js
console.log('MY SERVICE WORKER')
Probably doesn't matter but I'm on
Chrome Version 109.0.5414.87 (Official Build) (x86_64)
and macOS BigSur
I'm currently migrating from Manifest v2 to Manifest v3 for a chrome extension. My extension uses public API served over HTTPS. I use a local instance of that API to test my extension which is served at https://0.0.0.0:8080/. However, for reasons I cannot understand, my extension fails to fetch anything from this URL. and the error displayed on the service worker's log is
TypeError: Failed to fetch
If I switch my local API to be served at http://0.0.0.0:8080/, then the extension works fine. So basically, the extension works fine with all API URLs except for https://0.0.0.0:8080/ on Manifest v3. I tried switching back to Manifest v2 and it worked so I'm not sure why it doesn't work on v3.
My manifest file looks like this
{
"name": "...",
"description": "...",
"manifest_version": 3,
"version": "1.0.0",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
},
"action": {
"default_icon": {
"16": "icon16.png",
"48": "icon48.png"
},
"default_title": "..."
},
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["content.js"],
"css": ["App.scss"]
}
],
"permissions": ["storage"],
"host_permissions": ["http://*/*", "https://*/*", "*://*/*"],
"web_accessible_resources": [
{
"resources": ["App.css"],
"matches": ["http://*/*", "https://*/*"]
}
]
}
I've encountered the same problem. It turns out that if you open the workers console and view the fetch request it says that the error is ERR_CERT_AUTHORITY_INVALID. Unfortunately I have no idea why the transition to Manifest V3 causes this (the local host is served via Flask with a self signed certificate which is not a problem in Manifest V2).
Edit: registered this as a bug at Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1395343
i'm trying to update my manifest version for my extension but it gave me this problem:
default locale was specified, but _locales subtree is missing.
this is my manifest.json file, can anyone tell me where is the problem and what can i do?
{
"name": "Selected Text",
"version": "0.1",
"manifest_version": 2,
"description": "Selected Text and some changes",
"default_locale":"en",
"browser_action": {
"default_title": "S. Text",
"default_icon": "online.png",
"default_popup": "popup.html"
},
"permissions": [
"tabs",
"chrome://favicon/",
"http://*/*",
"https://*/*"
],
{
"matches": ["http://*/*"],
"js": ["selection.js"],
"run_at": "document_start",
"all_frames": true
}
}
It sounds like you are missing the required _locales directory in your extension root. Since you are specifying a default_locale, you need to provide a _locales directory, inside of which lie your internationalization options. In your case, you would need to at least have a folder titled _locales/en, inside of which you have a messages.json file, inside of which you would set your specific parameters (see here for more information).
I got the same issue.
Its "default_locate": "en",.
But then there is still an error. So just leave it out.
Please check the file hierarchy. It should be something like below,
- manifest.json
- 📂 _locales 👈
- 📂 en
- messages.json
- 📂 es
- messages.json
- 📂 ...
- messages.json
Reference
chrome.i18n
manifest
messages.json
"default_locale":"en",
look at this code and think. you will get solution .
I am trying to create my first chrome extensions, here is my manifest.json
{
"name": "share2twitter",
"version": "0.1",
"manifest_version": 2,
"browser_action":{
"default_icon": "icon.png",
"default_popup": "index.html"
},
"background": {"page": "index.html"},
"permissions": [
"https://www.googleapis.com/*",
"tabs"
],
"content_scripts": [{
"matches": [ "http://*/*", "https://*/*" ],
"js": [ "jquery.min.js","index.js" ]
}],
"content_security_policy": "script-src https://www.googleapis.com/urlshortener/ 'self'; object-src 'self'; connect-src https://www.googleapis.com/"
}
https://github.com/kracekumar/share2twitter/blob/master/manifest.json and in debug mode I get the following error .
Refused to load script from 'https://www.googleapis.com/urlshortener/v1/url?callback=jQuery17108621194534935057_1344774835421&{%22longUrl%22:%22https://groups.google.com/a/chromium.org/forum/?fromgroups' because of Content-Security-Policy.
I looked into reference for mappy, stackoverflow.com and google official docs, nothing worked out. So I am asking help here.
Expected behaviour:
When I click on the extension , it tries to connect to goo.gl url shortner and displays alert box.
Paths in source URLs are not allowed in Content Security Policy values. You'll need to use this in your manifest:
"content_security_policy": "script-src https://www.googleapis.com 'self'; object-src 'self'; connect-src https://www.googleapis.com"
A Chromium bug has been filed (and has some ongoing work) to better warn in this situation.
Sorry, found answer by myself (at the bottom of question)
I'm implementing simple google chrome addon (shows alert on android market, for now), and i'm facing with problems. What do i have:
Manifest (see below)
Icon.png
2 JS files (jquery and mine)
css file
permissions seem to be ok
Contents of each:
Manifest:
{
"name": "My first app",
"version": "1.0",
"description" : "My frist app",
"browser_action":
{
"default_icon": "icon.png"
},
"permissions":
[
"https://market.android.com/*"
],
"content_scripts":
[
{
"matches": ["https://market.android.com/*"],
"css": ["styles.css"],
"js": ["scripts.js", "jquery.js"]
}
]
}
My css file:
*
{
color:gray !important;
}
Scripts.js file:
$(document).ready(function() {
alert("!");
});
Jquery version is 1.7.1.
And now comes the sugar:
All items on android market are grayed. But no alert.
Thank you in advance, Nick.
OMG!
Just needed jquery before my script running. Sorry.
you need to load jquery in your manifest before your script