發布於 2023-06-28

更新於 2023-06-28

程式

約228字 (2分鐘閱讀)

[譯文] Error: Could not register service workers

Title Image

前言 - Prologue

在 Ubuntu 操作系統中,當我在作業時,打開 VSCode 的 Git History 遇到了 「Could not register service workers」的錯誤訊息,於是上網查找解決方法,以下為解決方法的內容翻譯搬運做一個紀錄,原因果然又是 Ubuntu 在搞事情... ( ´・ω)

問題 - Question

Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope ('vscode-webview://867f875b-c5a3-4504-8de2-2e8614bdc0f8/') with script ('vscode-webview://867f875b-c5a3-4504-8de2-2e8614bdc0f8/service-worker.js?platform=electron&id=867f875b-c5a3-4504-8de2-2e8614bdc0f8&vscode-resource-origin=https%3A%2F%2F867f875b-c5a3-4504-8de2-2e8614bdc0f8.vscode-webview-test.com'): ServiceWorker cannot be started.

How can I solve this issue?

解決方案 - Solution

If you are using Ubuntu, there is probably another (maybe hidden) VSCode process, which is causing the problem.

如果您使用的是 Ubuntu,則可能有另一個(可能是隱藏的)vscode 進程導致此問題。

Close the vs code first and in terminal try: killall code.

首先關閉 VSCode,然後在終端嘗試輸入 killall code

📚 原文連結 - Source Post Link

visual studio code - Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ServiceWorker for scope - Stack Overflow

https://stackoverflow.com/questions/67698176/error-loading-webview-error-could-not-register-service-workers-typeerror-fai

[譯文] Error: Could not register service workers

https:///blog/66

作者

Kama

Read more from 程式
lightbox-image
Toggle Button - Red Pandas Icons by svgrepo.com

Copyrights © 2023 Kama, All Rights Reserved.