Invalid manifest message by launching - google-chrome

By launching my extension I get this message:
Invalid manifest
My manifest file is loaded. Here is it:
{
"name": "GoogleMapToContact",
"short_name": "GoogleMTC",
"description": "Save Google Geopoints to Google Contact",
"manifest_version": 2,
"version": "1.0.1",
"start_url": "/?homescreen=1",
"background_color": "#000000",
"theme_color": "#0f4a73",
"icons": {
"src": "map.png",
"sizes": "256x256",
"type": "image/png"
}
}

You have incorrect tags in your manifest.json. First 4 lines are OK.
Bad tags, that are not allowed in extensions manifest, are:
start_url (do you want to specify you entry point?)
background_color (it should be done in your popup file)
theme_color
Icons are written in slightly wrong way :) Here is suggested file
{
"name": "GoogleMapToContact",
"short_name": "GoogleMTC",
"description": "Save Google Geopoints to Google Contact",
"manifest_version": 2,
"version": "1.0.1",
"browser_action": {
"default_icon": "map.png",
"default_popup": "popup.html"
},
"icons": {
"16": "map16x16.png"
}
}

Related

Chrome extension: extension logo image doesn't appear or get loaded although specified in manifest file

I click the button in https://chrome://extensions and it loads my extension. However the image/logo of the extension is the default one instead of the one I provided:
manifest.js:
{
"name": "My App",
"version": "1.0.0",
"description": "My extension doesn't do anything yet!",
"manifest_version": 2,
"background": {
"persistent": false,
"scripts": ["js/clear_history.js"]
},
"icons": {
"48": "images/logo.svg",
"96": "images/logo.svg"
},
"browser_action": {
"default_icon": "images/logo.svg"
},
"options_ui": {
"page": "options.html",
"chrome_style": true
},
"permissions": ["history", "storage"],
"web_accessible_resources": ["logo.svg"]
}
Project directory:
How do I fix it?
EDIT:

Why Chrome web store manifest?

Whats wrong chrome doesn't allow to upload a zip file
An error occurred: Failed to process your item.
manifest.json:17:2: unexpected char.
{
"manifest_version": 2,
"name": "TechnoSwift Launcher",
"description": "Quick launch TechnoSwift",
"version": "1.0.1",
"author":"Shareque",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html",
"default_title": "TechnoSwift Launcher"
},
"permissions": [
"activeTab"
],
}

Manifest is not valid JSON. Line: 10, column: 3, Unexpected data after root element

I'm learning about developing Google Chrome extensions. Upon attempting to load my extension, I receive the following message:
Manifest is not valid JSON. Line: 10, column: 3, Unexpected data after root element.
Below is my manifest.json file:
{
"manifest_version": 2,
"name": "ShowTime",
"description": "Extension to show the current date and time",
"version": "1.2",
"default_locale": "en",
"description": "A plain text description",
"icons": {
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
},
"browser_action": {
"default_title": "ShowTime",
"default_icon": "icon.png",
"default_popup": "popup.html"
}
}

How to program a manifest file for a chrome extention

I'm trying to upload a chrome extension, but I'm being returned an error that my json file has a syntax error, but I can't figure out what it is. Here's the file:
{
"manifest_version": 2,
"name": "Drive to Tumblr",
"version": "1",
"description": "Posts files from google drive to tumblr",
"icons": "Extention_Logo_48x48.png"
},
"browser_action": {
"default_title": "Drive to Tumblr",
"default_icon": "Extention_Logo_19x19.png",
"default_popup": "button.html"
}
}
I'm using the given syntax on the chrome developers guide, so could anyone tell me what I'm doing wrong?
You don't need the 1st close brace that you have because the browser_action is still part of the main manifest. This should work:
{
"manifest_version": 2,
"name": "Drive to Tumblr",
"version": "1",
"description": "Posts files from google drive to tumblr",
"icons": "Extention_Logo_48x48.png",
"browser_action": {
"default_title": "Drive to Tumblr",
"default_icon": "Extention_Logo_19x19.png",
"default_popup": "button.html"
}
}

My Chrome extension doesn't show the 48x48 icon in extension page

First of all, I apologize if the question has been already answered. But all solutions I checked are being taken care of on my part.
This is my manifest.json
{
"name": "extension name",
"short_name": "extension",
"description": "desc",
"browser_action": {
"default_icon": {
"19": "images/icon19.png",
"38": "images/icon38.png",
"48": "images/icon48.png",
"128": "images/icon128.png"
},
"default_title": "title",
"default_popup": "popup.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.3.4"
}
The icons are all created using Photoshop CC and each size corresponds.
Any ideas what am I doing wrong?
TIA
The default_icon field specifies the icon for the browser action button only, not the icon for the entire extension.
To specify an icon for the extension as a whole, use the top-level icons manifest field:
{
"name": "extension name",
"short_name": "extension",
"description": "desc",
"icons": {
"48": "images/icon48.png"
},
...