You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过浏览器访问Substrate Front-end Template时出现{"isTrusted": true}错误的排查与解决

解决Substrate Front-end Template连接时的{"isTrusted": true}错误

我之前在Ubuntu 20.04的VPS上部署Substrate前端模板时也遇到过这个{"isTrusted": true}错误,结合你给出的操作流程,来帮你理清楚问题出在哪以及怎么解决:

你的操作回顾

  • 启动Substrate节点的命令:
    ./target/release/node-template --dev --unsafe-ws-external --rpc-cors all --rpc-external --rpc-methods=Unsafe
    
  • 进入substrate-front-end-template目录执行yarn启动前端服务
  • 尝试通过http://xxx.xxx.xxx.xxx:8000/substrate-front-end-template、8000端口、9944端口连接,均触发{"isTrusted": true}错误
  • 曾修改/root/substrate-front-end-template/src/config/development.json中的"PROVIDER_SOCKET"为"ws://xxx.xxx.xxx:9944",但问题未解决

问题根源

你修改PROVIDER_SOCKET时没有填写完整的服务器IP地址(比如只写了xxx.xxx.xxx,漏掉了最后一段),导致前端无法正确解析WebSocket的目标地址,浏览器因无法建立有效连接而抛出这个信任相关的错误。

解决步骤

  1. 重新编辑/root/substrate-front-end-template/src/config/development.json文件
  2. 将PROVIDER_SOCKET配置项修改为完整的服务器IP地址,示例:
    "PROVIDER_SOCKET": "ws://xxx.xxx.xxx.xxx:9944"
    
  3. 保存文件后,重启前端服务(执行yarn start)
  4. 再次通过http://xxx.xxx.xxx.xxx:8000/substrate-front-end-template访问,即可正常连接节点

内容的提问来源于stack exchange,提问作者Lee

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 08:52:27