gpt4 book ai didi

swift - Safari 扩展无法执行 URLSession 任务,错误为 : failed path:/var/run/mDNSResponder Operation not permitted

转载 作者:行者123 更新时间:2023-11-28 07:32:26 31 4
gpt4 key购买 nike

大家好,我尝试在单击工具栏项时进行 RESTful 调用。然后它无法连接到互联网,并在日志中显示以下错误。

[default] Unable to load Info.plist exceptions (eGPUOverrides)
The extension's toolbar item was clicked
dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:5 Err:-1 Errno:1 Operation not permitted
Error: Optional(Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x600003e3c4b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=-72000, _kCFStreamErrorDomainKey=10}}, NSErrorFailingURLStringKey=https://some_valid_url, NSErrorFailingURLKey=https://some_valid_url, _kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, NSLocalizedDescription=A server with the specified hostname could not be found.})
[] nw_resolver_create_dns_service_locked [C1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)
TIC TCP Conn Failed [1:0x60000051d200]: 10:-72000 Err(-65563)
Task <D9356F42-2832-426A-9FE6-C37C0A22F954>.<1> HTTP load failed (error code: -1003 [10:-72000])
Task <D9356F42-2832-426A-9FE6-C37C0A22F954>.<1> finished with error - code: -1003
Program ended with exit code: 0

然后我尝试了:

  • 开启应用沙箱并勾选传入和传出连接
    • 不起作用,同样的错误
  • 关闭应用沙箱

    • Safari 偏好设置中的扩展消失

    • 单击“在 Safari 扩展程序首选项中打开”时无响应

我的配置:

  • Xcode:版本 10.1 (10B61)
  • Mac:Mojave 10.14.2(18C54)
  • Safari :12.0.2(14606.3.4)

有什么想法吗?

最佳答案

您可能需要在应用沙盒上启用传入和传出连接,让您的请求通过。

Check this image

关于swift - Safari 扩展无法执行 URLSession 任务,错误为 : failed path:/var/run/mDNSResponder Operation not permitted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54324429/

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