MacOS(M1)运行slack run遇无效对等证书错误求助
问题:MacOS(M1)执行
slack run提交工作流表单时出现证书验证错误 环境信息
- 系统:MacOS(M1)
- Slack CLI版本:
v1.16.4 - Deno版本:
deno 1.28.3 (release, aarch64-apple-darwin) v8 10.9.194.5 typescript 4.8.3
错误日志
🚫 Error: exit status 1 error: Uncaught (in promise) TypeError: error sending request for url (https://slack.com/api/functions.completeSuccess): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer const resp = await fetch(url, { ^ at async mainFetch (deno:ext/fetch/26_fetch.js:247:14) at async fetch (deno:ext/fetch/26_fetch.js:464:9) at async BaseSlackAPIClient.apiCall (https://deno.land/x/deno_slack_api@0.0.2/base-client.ts:20:18) at async RunFunction (https://deno.land/x/deno_slack_runtime@0.5.0/run-function.ts:57:5) at async DispatchPayload (https://deno.land/x/deno_slack_runtime@0.5.0/dispatch-payload.ts:64:16) at async runLocally (https://deno.land/x/deno_slack_runtime@0.5.0/local-run-function.ts:29:16) at async https://deno.land/x/deno_slack_runtime@0.5.0/local-run-function.ts:50:3
工作流预期功能
提交简易表单输入消息,消息经处理丰富后发回频道。
解决方案
- 检查系统根证书完整性:
打开「钥匙串访问」,确认系统根证书列表包含DigiCert Global Root CA等主流CA证书。若缺失,手动下载对应证书并添加到系统钥匙串,设置为「始终信任」。 - 更新Deno至最新稳定版:
执行命令deno upgrade,新版本通常会修复证书验证的兼容性问题。 - 临时跳过证书验证(仅测试环境使用):
启动命令添加Deno参数,改为slack run -- --unsafely-ignore-certificate-errors,注意此方式会降低安全性,生产环境禁用。 - 排查网络代理:
若使用代理工具,确认代理证书已被系统信任,或暂时关闭代理后重试。
内容的提问来源于stack exchange,提问作者codarrior
相关产品推荐
相关产品推荐

