Error loading webview: Error
If while running VS Code, you get a message saying:
«Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.»
- Exit VS Code and then enter this cmd from the
xterm
window:
killall code
You may need to execute this command two or three times in a row to kill all VS Code processes.
- Ensure that all VS Code-related processes are gone by entering the following command from the
xterm
window:
ps -ef | grep code
- Once all the VS Code-related processes are gone, restart VS Code by entering the following command from the
xterm
window:
code