I've been trying to get the official Native Messaging example running on my Debian linux, but when I click the connect button, the connection to the host is not made and the error "Specified native messaging host not found." is returned.
From other people who have the same problem I learnt that it's probably an error in my native app manifest, but I can't find it for hours now. It is located at ~/.config/google-chrome/NativeMessagingHosts/com.google.chrome.example.echo.json and reads:
{
"name": "com.google.chrome.example.echo",
"description": "Chrome Native Messaging API Example Host",
"path": "/path/to/my/home/Desktop/native.py",
"type": "stdio",
"allowed_origins": [
"chrome-extension://mcmmilohkmnlhdododggiegdjholjfan/"
]
}
The only thing's I've changed is the chrome extension id and the path, which I checked (when running it from my shell the app launches and behaves correctly). Its code is taken from the aforementioned example.
Any idea what might be wrong? I'm stumped.
I've found the same to be true on OSX with Chrome 33.0.1750.117.
You have to put it in
/Library/Google/Chrome/NativeMessagingHosts/ and not in user's Library/Google/Chrome/NativeMessagingHosts/ folder.
(I'd comment but my reputation didn't allow it)
Ok, so I dug into the Chrome sources for my version (33.0.1750.117) and figured out that the json file is never read (and confirmed my finding using inotifywatch). I think (judging from this file line 143ff and this file) that the home directory is never actually looked into when the manifest file is searched.
However I came across a command line switch which can be used to locate the manifest files: --native-messaging-hosts="com.google.chrome.example.echo=~/.config/google-chrome/NativeMessagingHosts/com.google.chrome.example.echo.json". Even though this is no permanent solution it works for me, because I don't have root on the machine I'm developing on and can't write to /etc/opt/
https://code.google.com/p/chromium/issues/detail?id=237873
According to this bug the user-level installation will be supported in Chrome-34
Related
Introduction
Honestry,I'm not native English user,so my English is not better.
If you have any question, ask me by comment.
what I wanna do
As a premise,when you try to access local files by web site link,IE or FireFox can access( by simple setting) ,but Chrome can't access for their security poricy.
I found the ways to do this, like below:
add --allow-file-access-from-files option when you execute chrome.exe
build a local server like nginx or Apache HTTP Server,which meditate to access local data
Use chrome extentionEnable local file links
Due to business restrictions,I should resolve this problem by method 1. but I can't enable loacl data link though I set option correctly.
I googled why I can't,but I couldn't find why it won't work.
(In the first place,I can't even find Google official description of --allow-file-access-from-files.How predecessors find that method ... )
While searching、I found person who have the same question、Google Forum.
I'm convinced that this is not my simple miss,but more deep problem,so I decided to make this question.
what I tried
I rebooted computer,killed all process related to chrome,then change directory where contains chrome executable file,and execute chrome.exe --allow-file-access-from-files
I rebooted computer,killed all process related to chrome 、create shortcut on my Desktop ,which destination is "/path/to/chrome/chrome.exe"--allow-file-access-from-files
After execute chrome,I checked chrome boot option to accesschrome://version/.Both method, I could boot chrome by add --allow-file-access-from-files option,but can't achieve first purpose to access local file access.
what I wanna know
lacking or similar to --allow-file-access-from-filesoption、
(solution similar to method 2 or method 3,like "Give up option solution,and use nginx as local server" is unnecessary)
or other solution
Additionary,if you know below info,please teach me.
- Google official documentation which descriptionsallow-file-access-from-files
( Indended to Oracle official Javadoc of Java.)
Using Tool
Chrome Version : 78.0.3904.87
OS : WIndows 7 SP1
I have a chrome extension "RevNote Highlighter" which is occasionally running into installation corrupt issues for some users. I have never come across this when installed locally or when I have installed from Chrome Web Store.
I would like to know how to avoid this problem and also whether it is possible to be notified when users are unable to install my extension.
At first, I thought this might have been a file naming issue. I had read this stackoverflow post about some common bugs and made sure that my extension was not hitting any of these issues. My Chrome Extension Keeps Saying Its Corrupted
I then decided to try and install the extension using Chromium on Windows using the following command from the Run (Windows + R) menu.
chrome --extension-content-verification=enforce --enable-logging --v=1 --vmodule=metrics=2
When I take a look at the chrome_debug.log I can see that there seems to be some kind of issue with the 4 files that are included in the manifest.json.
[89292:87248:0507/144820.424:VERBOSE1:content_hash.cc(296)] content mismatch for assets/r-clipper-action-16-blue.png
[89292:87248:0507/144820.424:VERBOSE1:content_hash.cc(296)] content mismatch for assets/r-clipper-action-32-blue.png
[89292:87248:0507/144820.425:VERBOSE1:content_hash.cc(296)] content mismatch for assets/r-clipper-action-48-blue.png
[89292:87248:0507/144820.426:VERBOSE1:content_hash.cc(296)] content mismatch for assets/r-clipper-icon-128.png
[89292:87248:0507/144820.429:VERBOSE1:content_hash.cc(296)] content mismatch for manifest.json
"icons": {
"16": "assets/r-clipper-action-16-blue.png",
"32": "assets/r-clipper-action-32-blue.png",
"48": "assets/r-clipper-action-48-blue.png",
"128": "assets/r-clipper-icon-128.png"
},
I cannot find anything wrong with the paths of these files. When I install the extension either on Chrome as per normal or using this Run command on chromium, the icon is correctly shown during the install process indicating that the system is locating the files without issue.
I've written an extension for Google Chrome that will be released with the next version of our product. I want to understand what properties, paths for extraction, registry entries, etc. should I provide the installer of my product so that the end user doesn't have to install the extension on their own manually, and the installer does the complete job of installing the extension, and also notifies the user that the extension has been installed. As of now, the code that I have written is placed in a folder, and I use the "Load Unpackaged Extension" to load the extension. What should I do to achieve the aforementioned task?
Google's current policy on installing extensions via the registry (for Windows machines) is this:
Only extensions from the Google Extension Gallery (or Chrome Web Store - CWS) can be installed via the registry.
See this link - https://developer.chrome.com/extensions/external_extensions - for information on how this can be done. Keep in mind the following:
-This technique will still pop-up a msgbox to the user. its not completely silent.
-When using this technique, if the user subsequently removes the extension from her Chrome, the extension gets "blacklisted" on that chrome and will not re-auto-install until the user re-install it
manually. refer to Auto-installing a google chrome extension won't work ! for details.
Chrome has a couple ways of installing extensions programmatically:
http://www.chromium.org/administrators/pre-installed-extensions
Edit: yes, this policy has changed by now, as FuzzyAmi points out.
If you're using GNU/Linux, this is how you pre-install an extension from the chrome web store for all users:
/etc/chromium/policies/managed/yourextension_policy.json
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
{
"ExtensionInstallForcelist": [
"yourextensionuniqueidentifiersup;https://clients2.google.com/service/update2/crx",
"yourextensionuniqueidentifiersup"
]
}
Reference
metamask-chrome - AUR
I've written an extension for Google Chrome that will be released with the next version of our product. I want to understand what properties, paths for extraction, registry entries, etc. should I provide the installer of my product so that the end user doesn't have to install the extension on their own manually, and the installer does the complete job of installing the extension, and also notifies the user that the extension has been installed. As of now, the code that I have written is placed in a folder, and I use the "Load Unpackaged Extension" to load the extension. What should I do to achieve the aforementioned task?
Google's current policy on installing extensions via the registry (for Windows machines) is this:
Only extensions from the Google Extension Gallery (or Chrome Web Store - CWS) can be installed via the registry.
See this link - https://developer.chrome.com/extensions/external_extensions - for information on how this can be done. Keep in mind the following:
-This technique will still pop-up a msgbox to the user. its not completely silent.
-When using this technique, if the user subsequently removes the extension from her Chrome, the extension gets "blacklisted" on that chrome and will not re-auto-install until the user re-install it
manually. refer to Auto-installing a google chrome extension won't work ! for details.
Chrome has a couple ways of installing extensions programmatically:
http://www.chromium.org/administrators/pre-installed-extensions
Edit: yes, this policy has changed by now, as FuzzyAmi points out.
If you're using GNU/Linux, this is how you pre-install an extension from the chrome web store for all users:
/etc/chromium/policies/managed/yourextension_policy.json
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
{
"ExtensionInstallForcelist": [
"yourextensionuniqueidentifiersup;https://clients2.google.com/service/update2/crx",
"yourextensionuniqueidentifiersup"
]
}
Reference
metamask-chrome - AUR
I am using HTML 5 Geolocations API's for tracking location however I am getting the following error on the Geolocation icon in Chrome Browser
"This Page has been blocked from tracking your Location"
I went to the Preferences and Setting's Page but did not find any help.
In my case the problem was that I opened the HTML file from the file system (file:///...). Browsers generally try to prevent accessing personal information (which includes location) from local files, so you have to serve the file through a web server (even if it is local).
One simple way to serve a static website located in your filesystem is SimpleHTTPServer if you have Python installed. Just navigate to the folder using the command prompt, and say python -m SimpleHTTPServer, and then you can view the file on localhost:8000.
Even I was facing the same problem. One of the solution is to open to file in another browser, I tried in Firefox and it worked fine. Another solution is to open the file through your WAMP server (Local host).
There is a good article here about Geolocation API. You have to go to chrome://settings/content and there, you can find Location information. You should be able to find the exceptions and manage them there.