Zulip Chat Archive
Stream: mathlib4
Topic: Error loading webview
Damiano Testa (May 26 2024 at 18:44):
Suddently, every time I open a Lean file in VSCode, the error
Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
appears. When I have seen it in the past, quitting and restarting VSCode fixed it, but now I tried that a few times and nothing changes. Is anyone else seeing this?
Kevin Buzzard (May 26 2024 at 18:45):
Try quitting VSCode, killing all lean processes and then restarting?
Damiano Testa (May 26 2024 at 18:45):
There are no lean processes, but I killall lean
anyway and the problem persists.
Damiano Testa (May 26 2024 at 18:46):
(i.e. quit VSCode, killall tells me there is no lean, open VSCode, same error)
Damiano Testa (May 26 2024 at 18:47):
It is "only" the infoview that does not work: hovering over stuff shows what would normally appear in the infoview.
Kevin Buzzard (May 26 2024 at 18:49):
If a reboot doesn't solve it, I'm out of ideas
Damiano Testa (May 26 2024 at 18:50):
Ok, that is what I tried and restarting my computer fixed it! Thanks!
Marc Huisinga (May 26 2024 at 19:01):
The next time you run into this, try killall code
before restarting. This is unfortunately one of those long-standing issues related to webviews in VS Code. See also https://stackoverflow.com/questions/67698176/error-loading-webview-error-could-not-register-service-workers-typeerror-fai..
Kevin Buzzard (May 26 2024 at 20:06):
darn it, sorry Damiano! I should have suggested that too!
Damiano Testa (May 26 2024 at 21:39):
Marc, thanks for the advice and the links: I'll try killall code
next time.
Damiano Testa (May 26 2024 at 21:41):
I don't know if this is related, but I have also observed that VSCode seems to have some bad interactions with Firefox, more so than with Chrome. These issues though are hard to reproduce. I will see if killing all code processes works there too.
Last updated: May 02 2025 at 03:31 UTC