【发布时间】:2021-12-17 03:44:42
【问题描述】:
偶尔,当我在 Docker 容器中运行 Electron 时,会收到以下错误:
[15:1102/154337.143944:ERROR:network_service_instance_impl.cc(333)] Network service crashed, restarting service.
这会导致在 localhost 上加载了 win.loadURL 的前端应用程序部分呈现
该问题似乎与https://bbs.archlinux.org/viewtopic.php?id=268123 非常相似,但建议中没有任何效果。
运行最新的 Electron 15.0.2 和 Chromedriver 95.0.0
另外,当关闭 Electron 窗口时,我得到一个错误
Error: ERR_FAILED (-2) loading 'https://localhost:{port}/{path_to}/index.html'
at rejectAndCleanup (node:electron/js2c/browser_init:165:7486)
at Object.stopLoadingListener (node:electron/js2c/browser_init:165:7861)
at Object.emit (node:events:394:28) {
errno: -2,
code: 'ERR_FAILED',
url: 'https://localhost:{port}/{path_to}/index.html'
} [EOL]
在执行 await win.loadURL(url) 时会在 main.js 中捕获
另外,在 Electron 浏览器窗口的控制台日志中,会出现这个错误:
ERROR Error: Uncaught (in promise): ChunkLoadError: Loading chunk 108 failed.
(timeout: https://localhost:{port}/{path_to}/108.da4993913b4a27951976.js)
ChunkLoadError: Loading chunk 108 failed.
以前有人遇到过这个问题吗?
【问题讨论】:
标签: node.js linux electron chromium