5

I am running the Native messaging sample app. (http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/nativeMessaging/).

I have added registry key

 HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.google.chrome.example.echo

When i am connecting to native host i am getting error:

Failed to connect: Access to the specified native messaging host is forbidden.
4

1 回答 1

8

根据文档,您需要在后者的清单中明确授予对 NativeMessagingHost 的扩展访问权限:

"allowed_origins": [
    "chrome-extension://<your_extension's_ID>/"
]
于 2013-11-26T12:13:16.470 回答