Long time listener, first time caller...
I apologize if this has been answered, but I haven't been able to find it.
I'm having a grand ole' time trying to work with Chrome's developer dashboard. The lovely error messages are so vague that they give me just about no insight at all into the cause of the problem.
I just updated my extension 2 days ago - yes, I had a frustrating time of it, but it worked eventually. Well I overlooked a bug, which I quickly fixed, and now I'm trying to upload the new file. I followed the same procedure that worked before, which I found here: http://www.adambarth.com/experimental/crx/docs/packaging.html under "Uploading a previously packaged extension to the Chrome Web Store"
So my process is to: Pack the new extension files(including the manifest.json), add the .crx file to a folder, add the "key.pem" file to that same folder, compress said folder, and upload to the Chrome dashboard.
I'm aware that this process puts the manifest.json file in the packed .crx file and not in the root of the zipped folder that I'm trying to upload. Again, the above process worked before, and I've been trying in vain to repeat it today with no success.
The ONLY change made to my manifest file is the increment of the "version" number, as required.
I'm repeatedly getting the following:
An error occurred: Failed to process your item.
No manifest found in package. Please make sure to put manifest.json at
the root directory of the zip package.
My manifest.json, for whom it may concern...
{
"name": "AppName",
"version": "0.0.4",
"description": "App description - information was changed for stackoverflow post",
"manifest_version": 2,
"browser_action": {
"default_icon": {
"48": "img/pictureFile.png"
}
},
"background": {
"scripts": ["background.js"],
"persistent": false
},
"content_scripts": [{
"matches": ["*://linksRemovedForBrevity*"],
"js": ["content.js", "other-content.js"]
}],
"permissions": [
"activeTab",
"storage",
"tabs"
],
"web_accessible_resources": [
"styles.css",
"img/icon48.png"
]
}
I should mention that I'm a noob and don't know much of what I'm doing. Any and all help is greatly appreciated.
Cheers!
#wOxxOm got it. The extension doesn't need to be packed to be zipped and uploaded.
Related
I want to add optional permissions to my extension and would like to test the warning messages (locally) prior to publishing.
I followed this article, and created the packed .crx file.
However when I upload it (via drag and drop), I get:
This extension is not listed in the Chrome Web Store and may have been added without your knowledge. Learn More
...but, my extension IS listed in the Chrome Webstore.
Am I missing something, or did Chrome permanently disable .crx uploads?
Seems like there is no solution to this online.
Is it possible that my "updated" manifest is causing this issue as it is now using v3 whereas the published extension is v2?
As a workaround, you can use chrome.management.getPermissionWarningsByManifest.
It can be ran from any extension (without the "management" permission, and not necessarily the extension you're testing for warnings) and takes a valid extension manifest file as a string, returning an array of warnings in callback.
An example using the manifest of the extension as linked in your question:
const m = `
{
"update_url": "https://clients2.google.com/service/update2/crx",
"manifest_version": 2,
"version": "2.0.0",
(..skipped..)
"permissions": [
"tabs",
"contextMenus",
"storage",
"alarms",
"downloads",
"downloads.shelf"
],
(..skipped..)
}`;
chrome.management.getPermissionWarningsByManifest(
m,
warnings => { for (let warning of warnings) console.log(warning); }
);
// Prints:
// Read your browsing history
// Manage your downloads
I'm writing my first Chrome extension and it currently appears to work on all sites that I have tested apart from Google Calendar (which is really where I would like it!)
I've simplified the code as much as possible to try and fix this;
manifest.json:
{
"name": "TestExtension!",
"version": "0.0.1",
"manifest_version": 2,
"description": "Quick Test Extension",
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": ["content.js"]
}
]
}
content.js
console.log("Chrome extension go...");
Working
Not Working
Any ideas? What is different about Google Calendar. It works fine on Gmail and I have tried specifying the Calendar URL specifically as well with the same results.
Many Thanks to wOxxOm - A full Windows restart fixed the issue. (I really should have tried that, still not sure why killing all the Chrome processes didn't work but sorted now)
In my manifest.json file, I have nothing explicitly listed for reading a user's history, however, this warning comes up when you try to install the extension.
Here is my manifest file:
{
"manifest_version": 2,
"name": "QueueTube for YouTube!",
"short_name": "QueueTube",
"description": "Search YouTube without stopping the video, and make your own playlists!",
"version": "1.5",
"author": "Dara Javaherian",
"permissions": ["tabs", "*://*.youtube.com/*"],
"background": {
"persistent":true,
"scripts": [
"bg/socket.io.js",
"bg/background.js"
]
},
"icons": {
"128": "icons/youtube-128.png"
},
"browser_action": {
"default_icon": "icons/icon.png",
"default_popup": "popup/popup.html"
},
"web_accessible_resources": [
"spinner.gif"
],
"content_scripts" : [{
"matches" :
["https://www.youtube.com/*",
"http://www.youtube.com/*"],
"js" : [
"js/jquery.js",
"js/inject.js"],
"css" : ["styles/styles.css"]
}]
}
Does anyone know why this permission is showing up?
This is the standard warning for the "tabs" permission.
It allows you to query, and be notified of changes, to URLs of all tabs. This allows you to spy on the user's history in real time - even if you don't have access to the browser's own history log.
Note that "tabs" permission is not required in most cases. Providing access to URLs is basically the only reason to include it. You can use most of the tabs API without it, and can get access to current tab without warning using the "activeTab" permission.
Warnings and their triggers
It can be surprising when adding a permission such as "tabs" results
in the seemingly unrelated warning that the extension can access your
browsing activity. The reason for the warning is that although the
chrome.tabs API might be used only to open new tabs, it can also be
used to see the URL that's associated with every newly opened tab
(using their tabs.Tab objects)
Source: https://developer.chrome.com/extensions/permission_warnings
I am a beginner for the chrome extension. I have found a demo to add event to google calendar, I have solved some problems for this demo, but it doesn't word yet... Now I have a problem and I don't know how to fix it
L'installation de cette extension a généré des avertissements :
'background_page' requires manifest version of 1 or lower.
manifest.json :
{
"name": "Add Event to Google Calendar",
"version": "1.4.1",
"manifest_version": 2,
"description": "A user can add events to Google Calendar by simply highlighting dates that appear on a webpage.",
"icons": { "48": "calendar48.png", "128": "calendar128.png" },
"background_page": "background.html",
"permissions": [
"tabs", "http://*/*", "https://*/*", "http://www.google.com/"
],
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["jquery.js", "date.js", "content_script.js"]
}
]
}
background.html
I can not post background.html here, because it is too long...please download this here Add-to-Calendar-Chrome-Extension
Thank you very much!
Google are changing the manifest version requirements for Chrome as detailed in this link.
The warning is only visible with "Developer mode" active. They don't affect end-user. You can also consider using minimum_chrome_version to block users with older browsers from downloading your latest update. Downgrade to manifest_version: 1, wait for everyone to download downgraded version and, yet again, push update with manifest_version: 2 this time adding minimum_chrome_version: 18.
The background_page property has been replaced with a background. That property contains scripts, either a page or property. Details are available in the Event Pages documentation.
You may check this forum.
Okay, this is weird.
This is my extension, and it works flawlessly in Windows (atleast on two win7 machines), but when I tested it on linux (CentOS6 and Fedora18) it failed to do anything when its icon was clicked (it should, at the very least, display an alert).
The options page still works, and saves data properly.
After enabling developer mode in chrome://extensions/ you can click _generated_background_page.html for the extension to see the JS console for the addon.
That's where I saw the following error:
Error during tabs.executeScript: Cannot access contents of url "https://www.google.com.au/". Extension manifest must request permission to access this host.
actual url in error is not relevant, does it to all sites
Thing is, the windows machines showed no such error, shouldn't this be platform independent?
The manifests are obviously the same, so how come the addon hasn't the required permissions only on linux machines?
Mac is untested, if someone could try that for me, it might be useful
FURTHER INFORMATION
The error message above was given with the following information;
Located in the function chromeHidden.handleResponse on line 22 of the script sendRequest
The "activeTab" permission was added in Chrome 26. Make sure that you've installed Chrome/Chromium 26+.
If you want to make your extension compatible with older browsers in the Chrome Web Store, add host permissions to the manifest file, plus the minimum_chrome_version key:
First upload an extension with the following manifest file:
{
"name": "Name of extension",
"version": "1.0",
"manifest_version": 2,
"permissions": [
"<all_urls>"
]
}
Then bump the version, change "<all_urls>" to "activeTab", add the "minimum_chrome_version" field and upload it again to the Chrome Web Store:
{
"name": "Name of extension",
"version": "1.0.1",
"manifest_version": 2,
"permissions": [
"activeTab"
],
"minimum_chrome_version": "26.0.0.0"
}