I've been making this chrome extension for a while now. It's finally done and i went to upload it. Then it went "manifest.json:5:23: unexpected char. Can someone please help me figure out the mistake? i've tried almost everything but i cant seem to figure it out..
Heres the manifest.json file:
{
"name": "ROBLOX Catalog Helper v2",
"version": "1.9.0", // version
"manifest_version": 2,
"description": "Notifies you whenever an item is selling for under its RAP",
"browser_action": {
"default_icon": "icon.png"
},
"permissions": [
"alarms",
"background",
"debugger",
"notifications",
"cookies",
"https://www.roblox.com/"
],
"background": {
"scripts": ["bgWork.js", "jQuery-very3.js"]
},
"icons": { "16": "icon_png",
"48": "icon_png",
"128": "icon_png" }
}
Related
I was getting errors while trying to upload a chrome extension because I had to update the manifest to version 3. I was using a JSON error checker but it was confusing. I'm pulling my hair out over this and would be cool if someone could help me thanks!
(By the way I've never really done much JSON before so don't blame me)
{
"manifest_version": 3,
"name": "FreeRice AutoFarm",
"description": "AutoFarm rice at freerice.com.",
"version": "1",
"author": "Dex",
"icons": {
"48": "favicon48.png",
"128": "favicon128.png",
"256": "favicon256.png"
},
"permissions": [
"tabs",
"activeTab",
],
"host_permissions" : [
"http://freerice.com/*",
"https://freerice.com/*",
"http://*.freerice.com/*",
"https://*.freerice.com/*"
]
"action": {
"default_popup": "popup.html",
"default_icon": "favicon48.png",
"default_title": "FreeRice AutoFarm"
}
}
I have developed a extension primarily focused on chrome which works but now i need that extension to work in firefox either so I checked by loading the extension by going to about:debugging page and loading temporary addons. Currently, I go an error. I got error something like this
Reading manifest: Error processing options_page: An unexpected
property was found in the WebExtension manifest.
Reading manifest: Error processing oauth2: An unexpected property
was found in the WebExtension manifest.
Reading manifest: Error processing key: An unexpected property was
found in the WebExtension manifest.
Here is what my manifest file looks like(I removed options_page)
manifest.json
{
"version": "1.0",
"name": "Browser Extension",
"manifest_version": 2,
"description":
"This extension allow the user to select the text and redirect to the application",
"page_action": {
"default_title": "Select Text",
"default_popup": "index.html"
},
"icons": {
"16": "img/browser16.png",
"48": "img/browser48.png",
"128": "img/browser128.png"
},
"background": {
"scripts": ["extension/js/background.js"],
"persistent": true
},
"content_scripts": [
{
"matches": [
"https://mail.google.com/mail/*/*",
"http://mail.google.com/mail/*/*"
],
"js": ["extension/js/jquery.min.js", "extension/js/content.js"],
"css": ["extension/css/main.css"],
"run_at": "document_end"
}
],
"permissions": [
"contextMenus",
"tabs",
"storage",
"webNavigation",
"notifications",
"cookies",
"identity",
"*://mail.google.com/mail/*/*",
"https://www.googleapis.com/*",
"https://*.googleusercontent.com/*"
],
"web_accessible_resources": ["img/browser128.png", "img/ios-link.svg"],
"oauth2": {
"client_id":
"114446495690-8ejpdgvmn8vc9pblteupetas.apps.googleusercontent.com",
"scopes": ["profile", "https://www.googleapis.com/auth/gmail.readonly"]
},
"key":
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnqFjzbt+LtejD1JhOyMUbejOHdLoemzryr+ZQHK2CEKuI0yVVYToFs7eNusH/hfxhnyF27G4BU8apsTc695EpVQGD0ANKdt6BjubRnA/4VcdkmfdD3D9nsdCc+fHkINRU5e05grfs/BETWW/JAUULduaNWGfhT7"
}
How do i resolve above issues to make it firefox compatible as well?
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.
I have an extension that gets JSON data from a site for a list of characters and their resources when chosen from a menu. I'm using a single html page and trying to update it with javscript to modify the code for the menu. The only thing is that I can't get the content script injected/loaded into the html page.
When my extension is run, the path for the rem.htm file is shown as 'moz-extension://a02e52b1-e41d-4d28-844b-a8466a1dd67b/rem.htm' which gives an invalid error for the 'matches' key in the console.
What else can I use?
manifest.json:
{
"description": "Resource Manager for Path of Exile",
"manifest_version": 2,
"name": "Path of Exile Resource Manager",
"version": "1.0",
"content_scripts":
[
{
"matches": ["file:///rem.htm"],
"js": ["modify-page.js"]
}
],
"background":
{
"scripts": ["background.js"]
},
"browser_action":
{
"default_icon":
{
"16": "icons/rem_16.png",
"32": "icons/rem_32.png",
"64": "icons/rem_64.png"
}
},
"permissions":
[
"*://www.pathofexile.com/",
"webRequest",
"tabs",
"activeTab"
]
}
I figured it out. I didn't realize I had modify-page in a separate directory. I was then able to add '' to matches and it finally worked!
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.