question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webview Service Worker Error in registration due to invalid document state (Linux)

See original GitHub issue

Does this issue occur when all extensions are disabled?: No

  • VS Code Version:
Version: 1.57.0
Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
Date: 2021-06-09T17:18:42.895Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Linux x64 5.11.0-18-generic snap
  • OS Version: Ubuntu 21.04

Steps to Reproduce:

  1. Update to 1.57
  2. GitGraph extension stops working

The gitgraph extension shows this error:

Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:69
  • Comments:102 (15 by maintainers)

github_iconTop GitHub Comments

53reactions
rjmsilveiracommented, Dec 22, 2021

For me, what worked was to delete the folder Service Worker under ~/.config/Code and re-opening my Visual Studio and it started working as expected. Hope it helps someone 😃

38reactions
agileVtalalcommented, Feb 1, 2022

Exiting vscode manually, running pkill code and starting vscode again resolved the issue for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error loading webview: Error: Could not register service ...
56.2 and open webview, I get these messages: Error loading webview: Error: Could not register service workers: TypeError: Failed to register a ...
Read more >
Error loading webview: Error: Could not ... - Code Grepper
Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.
Read more >
Julia for VS Code: error when trying to output plot
Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in ...
Read more >
1102209 - Can't register ServiceWorker from iframe populated ...
What is the expected behavior? ... What went wrong? An exception was thrown when registering the service worker: VM18:10 Uncaught (in promise) DOMException: ......
Read more >
Service workers - web.dev
Registering a service worker # ... Before a service worker takes control of your page, it must be registered for your PWA. That...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found