manifest.json validation error (confirmed manifest.json is valid) - manifest

I'm getting the following error with my manifest.json:
Manifest: Line: 1, column: 1, Unexpected token.
I've confirmed my manifest.json is valid and is encoded in UTF-8. Can anyone give me any tips on what might be causing this issue?

Is this an Angular project?
And are you trying to host this on Azure?
I had the same error, i posted my fix here:
Angular 6 application : Manifest: Line: 1, column: 1, Unexpected token
If this is not related to Azure, but it is an Angular project, check your angular.json/angular-cli.json and add manifest.json to "assets" as described by Honzik in this answer:
https://stackoverflow.com/a/51553047/7335211

Maybe you forgot to put a comma ","
Valid example:
{
"manifest_version": 2, <<comma
"version": "1.0", <<comma
"name": "my extension name" <<no comma
}
Invalid example:
{
"manifest_version": 2 << no comma
"version": "1.0" <<no comma
"name": "my extension name" <<no comma
}
Or you only forgot to put ", or ":"

Related

Parsing error while using web-ext tool (Firefox addon)

I'am working on an addon for firefox webbrowser. If I try to run the addon with web-ext run an error with the message Error parsing manifest.json file at C:...\manifest.json: JSONError: Unexpected token "�" (0xFFFD) in JSON at position 0 while parsing near "��{\u0000\r\u0000\n\u0000 \u0000 \u0000 \u0000 \u0000\"\u0000m\u0000... occured.
web-ext-lint also shows me that the first character in my json file is illegal. This first character is a curly brace. The linter displayed me a second error in line one of a javascript file, where also a curly brace is notated. My manifest file looks like this:
{
"manifest_version": 2,
"name": "Extension name",
"version": "1.0",
"description": "description line",
"permissions": [
"activeTab"
],
"icons": {
"48": "icons/key-solid-48.png",
"96": "icons/key-solid-96.png"
},
"background": {
"scripts": ["js/filename.js"]
},
"browser_action": {
"default_icon": "icons/key-solid-32.png",
"default_title": "AntToken",
"default_popup": "html/index.html"
}
}
Why this error happens? I'am not sure if this is a compatibility problem. I'am using WebExtension version 6.8.0.

Chrome Extension - Manifest is not valid JSON. Line: 1, column: 2, Dictionary keys must be quoted

I wanted to build my first extension so I copied some code from an online tutorial (https://www.sitepoint.com/create-chrome-extension-10-minutes-flat/) I found:
{
"manifest_version": 2,
"name": "GTmetrix Analyzer Plugin",
"description": "This extension will analyze a page using GTmetrix",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab"
]
}
When I try to upload the unpacked extension I always get this error:
Manifest is not valid JSON. Line: 1, column: 2, Dictionary keys must be quoted.
What exactly can I change to make it work?
(Please give me exact instructions, I'm a newbie!)

JSON: Trailing comma error still present after removing the trailing comma?

Here is my JSON file:
{
"name": "Testing",
"version": "1.0",
"description": "1, 2, 3",
"permissions": ["storage"],
"background": {
"scripts": ["script.js"],
"persistent": false
},
"page_action": {
"default_popup": "index.html",
},
"manifest_version": 2
}
I am trying to create chrome extensions, and I've run into an error. When I try to upload the project it gives me an error on line 12 (the last comma) in the manifest.json, saying that there's no trailing commas allowed, yet when I go to remove it, the error is still present. Any idea why?
Thanks!
Please try to remove the comma on line 11 behinde "index.html".
That's the only possible problem I see on this.

Deploy Cloudera cluster on azure FAILED , JSON/ARM template issue

I m trying to install cloudera on azure using the link below https://github.com/Azure/azure-quickstart-templates/tree/master/cloudera-on-centos It gave me a few errors, below deploy cloudera on centos Required property 'resources' not found in JSON
I solved it. BUT I m now stuck at some point. "message": "Deployment template validation failed: 'The template 'copy' definition at line '0' and column '0' is missing a copy input value.
I use copy for resources, not for properties, there is no need for input value.
{
"type": "Microsoft.Network/publicIPAddresses",
"name": "[concat(variables('publicIPAddressName'), copyIndex())]",
"location": "[parameters('location')]",
"copy": [{
"name": "publicIPLoop",
"count": "[parameters('vmCount')]"
}],
"properties": {
"publicIPAllocationMethod": "Dynamic",
"dnsSettings": {
"domainNameLabel": "[concat(parameters('dnsNamePrefix'), '-dn', copyIndex())]"
}
}
}
copy should look like this:
"copy": {
"name": "publicIPLoop",
"count": "[parameters('vmCount')]"
},
its an object, not an array
THANKS A LOT for your response,
Initially there was no bracket , it gave me another error:
"message": "Deployment template validation failed: 'The template resource 'master-node' at line '493' and column '9' is not valid: The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'."
I googled it, and I saw the post
copyindex() error in arm template
I put the brackets, to make it an array, and now it asks me for input, which does not make sense, according to
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple

Chrome Extension manifest error

I got following error Manifest is not valid JSON. Line: 5, column: 25, Syntax error.
My manifest.json file
{
"name":"webrun",
"manifest_version":0.5.1,
"description":"Let code run in web!",
"browser_action":{
"default_icon":"icon.png",
"default_title":"webrun",
"default_popup":"index.html"
}
}
Generally, http://jsonlint.com/ can be used to validate any JSON files. 0.5.1 is an invalid value in JSON.
manifest_version has to be an integer, it can take value 1 or 2. Check Documentation.
To specify the version of your Chrome extension, use the "version" key, and quote the value:
{
"name": "webrun",
"manifest_version": 2,
"version": "0.5.1",
"description": "Let code run in web!",
"browser_action": {
"default_icon": "icon.png",
"default_title": "webrun",
"default_popup": "index.html"
}
}