My extension works well under the dev mode,but when i want to pack it this time ,there comes an error which said:"Manifest file missing or unreadable", i don't know why!
{
"name": "DoTask",
"version": "1.0",
"description": "DoTaskv2个人任务管理系统--谷歌浏览器插件",
"options_page": "option.html",
"icons": { "16": "favicon.ico", "32": "favicon.ico", "128": "favicon.ico"},
"browser_action": {
"default_icon": "favicon.ico",
"popup": "popup.html"
},
"permissions": [
"http://*/*"
]
}
The manifest file must be named manifest.json (notice: json not js), must be in the root of the zip file or directory and it also must be saved as UTF-8.
Related
I have problem with my extension. It is working for me unpacked and when I download it from Chrome store.
However, some users reported that after update extension is corrupted. That's happen after they update it to newer version.
Difference between old and new version is background page and some logic.
I was able to replicate that issue, by packing extension and than drop it into extensions tab. After that I saw the same message as extension users. I also tried that with another extensions and everything worked fine, so maybe there is some issue in manifest file.
{
"manifest_version": 2,
"name": "Cryptocurrency Price Tracker",
"description": "This simple extension allows you to track price changes of Bitcoin and other cryptocurrencies.",
"version": "2.5",
"icons": {
"16":"icon16.png",
"48":"icon48.png",
"128":"icon128.png"
},
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"options_ui": {
"page": "options.html",
"chrome_style": true
},
"background": {
"scripts": ["background.js"]
},
"permissions": [
"storage",
"notifications",
"https://api.coinmarketcap.com/v1/*"
]
}
I use background page, not event page. So maybe I should add something in the manifest...
P.S. Packaging doesn't work for older version of extension... One more important thing. Users reported that after clicking on options page they saw that error. It didnt happend in my case, when I drag and drop extension file, I saw error immediately.
You need to put in a link to an update url in the manifest. The problem was mentioned in this forum:
https://productforums.google.com/forum/?hl=en#!topic/chrome/kGgLwnrDKpQ;context-place=forum/chrome
So you add update_url into your manifest. It can be any valid url if you are not making use of the feature. So like this:
"name": "Cryptocurrency Price Tracker",
"description": "This simple extension allows you to track price changes of Bitcoin and other cryptocurrencies.",
"version": "2.5",
"icons": {
"16":"icon16.png",
"48":"icon48.png",
"128":"icon128.png"
},
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"options_ui": {
"page": "options.html",
"chrome_style": true
},
"background": {
"scripts": ["background.js"]
},
"permissions": [
"storage",
"notifications",
"https://api.coinmarketcap.com/v1/*"
],
"update_url": "http://www.example.com/update.xml"
I'm trying to make a google chrome extension, but I'm having a problem. Please answer as basic as possible as I'm really bad at code. Whenever I upload something as a zip file, it says
"An error occurred: Failed to process your item. manifest.json:5:26:
unexpected char."
This is my code :
{
"name": "ROBLOX Character Asset ID",
"version": "1.9.0", // version
"manifest_version": 2,
"description": "This extension is for GFX artists who need their customer's character asset ID",
"browser_action": {
"default_icon": "icon.png"
},
"permissions": [
"alarms",
"background",
"debugger",
"notifications",
"cookies",
"https://www.roblox.com/"
],
"background": {
"scripts": ["bgWork.js", "jQuery-ver3.js"]
},
"icons": { "16": "icon.png",
"48": "icon.png",
"128": "icon.png" }
}
This has to do with the content in your scripts and when you load the extension it not being able to be processed as I loaded your manifest.json just fine (though with blank js files). So don't look towards your manifest.json, you must have an illegal character in your js file.
When I tried to upload the zip file, it shows 'manifest.json:26:1: unknown syntax error'
My json file:
{
"manifest_version": 2,
"name": "Real French Toast",
"version": "0.0.1",
"description": "hahaha",
"browser_action": {
"default_icon": "RealFrenchToast.png",
"default_popup": "popup.html",
"default_title": "Click here!"
},
"background": {
"scripts": ["background.js"],
"persistent": false
},
"permissions": [
"tabs",
"activeTab",
"https://ajax.googleapis.com/"
]
}
Thanks in advance.
I've tried installing a dummy extension with this manifest successfully. BTW the file has only 25 lines. Apparently your manifest.json has a bad character on the last line. You may investigate it in a hex viewer/editor.
Fix: copypaste the contents into a new file and save it as manifest.json overwriting the old file.
Chrome API for sockets is not working now for me.
I've got following manifest:
{
"name": "My name",
"version": "0.1",
"manifest_version": 2,
"background": {
"page": "background.html"
},
"browser_action": {
"default_icon": "ico16.png",
"default_title": "My extension",
"default_popup": "popup.html"
},
"description": "bla bla bla",
"minimum_chrome_version": "23",
"icons": {
"ico128": "ico128.png",
"ico16": "ico16.png",
"icon_logo": "icon_logo.png"
},
"options_page": "options.html",
"permissions": ["experimental",
{"socket": [
"udp-send-to"
]},
"notifications",
"background"]
}
but following warning it's been displayed when loading the extension:
'socket' is not allowed for specified package type (theme, app, etc.).
I've tested with Version 23.0.1246.0 canary and 23.0.1246.0 dev-m
This is expected behavior, the socket API is only available to packaged apps, and based on the manifest you're working on an extension.
If you will communicate this extension with a NodeJs application, you can use Socket.iO for this. Check how: https://www.thirdrocktechkno.com/blog/node-js-socket-io-chrome-extension-integration/
I'm learning to write extensions for Chrome. In their tutorial on Hello World, I copied their manifest.json file and followed instructions to the letter, but when I go into the extensions panel and try to load an unpacked extension, I get an error that says the manifest file is missing or unreadable. I'm not well-versed in json, but I cut and pasted their code, and it still isn't working. Has anyone else had this problem? How do I fix it?
You have a semi-colon after the permissions array that should not be there:
Change this from:
{
"name": "My First Extension",
"version": "1.0",
"description": "The first extension that I made.",
"browser_action": { "default_icon": "icon.png" },
"permissions": [ "api.flickr.com/"; ]
}
To:
{
"name": "My First Extension",
"version": "1.0",
"description": "The first extension that I made.",
"browser_action": { "default_icon": "icon.png" },
"permissions": [ "api.flickr.com/" ]
}
Also, if you do not have an image with the name icon.png in the root folder of your extension then you will either need to create one of remove the reference to the image.