Chrome should look for NativeMessagingHosts in the default location when using user-data-dir argument
Reported by
ja...@agilebits.com,
Sep 15 2017
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8 Steps to reproduce the problem: 1. Install 1Password for Mac 2. Launch Chrome using the user-data-dir argument to point to a non-standard location. 3. Install the 1Password Chrome extension: https://chrome.google.com/webstore/detail/1password-password-manage/aomjjhallfgjeglblehebfpbcfeobpgk 3. Inspect the background page Console tab What is the expected behavior? 1Password is able to connect from Chrome and provide its normal functionality. What went wrong? 1Password is unable to connect because Chrome only looks for the NativeMessagingHosts folder as a subdirectory of the user-data-dir folder. Providing a symlink from the user-data-dir location to ~/Library/Application Support/Google/Chrome/NativeMessagingHosts allows 1Password to connect. WebStore page: Did this work before? N/A Chrome version: Version 61.0.3163.91 (Official Build) (64-bit) Channel: stable OS Version: OS X 10.12.6 Flash Version: Extensions that rely on a native messaging connection are non-functional out of the box when the user launches Chrome with the user-data-dir argument. Since the runtime.lastError populated when the disconnect event handler fires is informational only and its strings not guaranteed to be stable, it is risky for the extension to attempt to recover the situation, and a generic help page is not feasible because of the number of ways that the native messaging host might not be available. See e.g. Bug 725513 The developers of native apps can reasonably be expected to locate the default location for the NativeMessagingHosts folder, but supporting arbitrary file locations is out of scope, especially for Mac App Store deployments. If the user has installed an extension in the custom user-data-dir, then they obviously want the extension to be able to use the native messaging host. They should not need to know about the implementation details of how Chrome looks for this. For special situations such as a developer doing special testing of a native messaging host or other unusual cases, _allow_ for the user-data-dir to contain a manifest that overrides the default one, but this should be a capability for these use cases rather than the basic requirement for regular users to have their extensions work. A non-technical user using user-data-dir is not as uncommon as it might seem since there are articles[1][2] that discuss creating scripts to handle launching Chrome with custom user data directory. [1] https://www.lessannoyingcrm.com/blog/2010/08/149/Create+application+shortcuts+in+Google+Chrome+on+a+Mac [2] https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#Writing-an-AppleScript-wrapper-Mac-OS-X
,
Oct 27 2017
Q for Devlin, is there something special about the NativeMessagingHosts directory? If not, this sounds like a bug.
,
Jul 19
Any update on this bug? The behavior is confusing even for the advanced users that use user-data-dir and moreso for users that follow guides like I linked to in the initial report who are not guaranteed to be as technical. |
||
►
Sign in to add a comment |
||
Comment 1 by sc00335...@techmahindra.com
, Sep 21 2017Labels: Needs-Triage-M61 Triaged-ET M-63 OS-Linux OS-Windows
Status: Untriaged (was: Unconfirmed)
50.6 KB
50.6 KB View Download