【问题标题】:Chrome : Native messaging Error: Access to the specified native messaging host is forbiddenChrome:原生消息传递错误:禁止访问指定的原生消息传递主机
【发布时间】:2013-11-26 11:46:51
【问题描述】:

我正在运行本机消息传递示例应用程序。 (http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/nativeMessaging/)。

我已添加注册表项

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

当我连接到本机主机时出现错误:

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

【问题讨论】:

    标签: javascript google-chrome google-chrome-extension chrome-native-messaging


    【解决方案1】:

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

    "allowed_origins": [
        "chrome-extension://<your_extension's_ID>/"
    ]
    

    【讨论】:

    • ExpertSystem 感谢您的回复。我已经更正了 id 现在它显示另一个错误“与本机消息传递主机通信时出错”
    • 这是一个完全不同的问题。因此,我建议发布一个新答案并准确描述您所做的事情。 “通信时出错...”是一个非常通用的错误消息,可能的原因范围很广,因此您可能需要发布一些代码。
    猜你喜欢
    • 1970-01-01
    • 2019-02-24
    • 2015-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多