gpt4 book ai didi

macos - 连接失败 : Native host has exited

转载 作者:行者123 更新时间:2023-12-05 02:09:50 24 4
gpt4 key购买 nike

我一直在尝试使用 Chrome Native Messaging API 在 Chrome 扩展程序和应用程序之间进行通信。我已完全按照 DeveloperChrome Website 中提到的步骤/说明进行操作.从 NativeMessaging Examples 下载示例 native 消息应用程序后, 通过运行 install_host.sh 完成设置。当我在演示应用程序中单击连接按钮时,它失败并出现错误:

Failed to connect: Native host has exited.

除此之外,我通过使用命令启用其日志,在 Debug模式下从终端运行 Chrome 实例

open /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome 
--args --enable-logging --v=1

我发现权限出了问题。访问文件的权限为每个人的Read&Write。此问题与 MacOS 特别相关,因为同一示例在 Windows 上运行良好。以下是 Chrome 错误日志:

/usr/local/Cellar/python@2/2.7.17_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/XXX/Desktop/host/native-messaging-example-host': [Errno 1] Operation not permitted

最佳答案

我来晚了一点,但我也遇到了这个。我设法通过将我的主机应用程序移动到 /Applications 来修复它。

我怀疑这与 Catalina 权限问题有关,尽管我无法在系统偏好设置的“安全和隐私”选项卡中找到任何相关内容。

关于macos - 连接失败 : Native host has exited,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59543692/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com