Repository navigation
Labels
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersinstall-updateVS Code installation and upgrade system issueswindowsVS Code on Windows issues
Milestone
Description
Type: Bug
Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
VS Code version: Code 1.137.0 (645f29c, 2026-09-08T13:43:59-07:00)
OS version: Windows_NT x64 10.0.26100
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592) |
| GPU Status | 2d_canvas: enabled GPU0: VENDOR= 0x10de, DEVICE=0x1f99 [NVIDIA GeForce GTX 1650], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=31.0.15.1700 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.9278 Machine model name: Machine model version: direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.91GB (17.27GB free) |
| Process Argv | --crash-reporter-id b7e0e00c-cf34-42d8-9476-79367c6eec90 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
gh487529:31544284
cloudbuttont:31379625
3efgi100_wstrepl:31403338
55ia6109:31457054
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
c9b86496:31447327
t-26112-aa:31454027
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ddid_t:31478206
hmra_i5g22:31518061
ja75b849_copy:31580634
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
jh5f2457_c:31540921
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
d7b18187:31526828
ahp-both-windows:31556933
ihg5j128:31534457
7g2b5551:31542111
enable_editor_pane_layout:31569726
allow-none:31555437
ac562147:31564510
c7c27ce7:31554789
1h923230:31564177
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
a1hcc538:31559322
0c1h4866:31566224
vrbsty_fls:31561059
session-archive:31558132
5b8j3302:31564601
mangle-name-treatment:31572634
intellij_nes_preview_t:31580086
39a5d156:31574986
2bfb8b39:31576696
outline:31581109
permission_prompt_control:1332567
ccr_pr_nudge_auto_review:1319472
vsc_wsm_t:1340632
eh853263:1370294
cfee5631:1379228
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code Insidersinstall-updateVS Code installation and upgrade system issueswindowsVS Code on Windows issues
Activity
houssam-hamdan commentedon Sep 9, 2026
Markdown Preview

hediet commentedon Sep 10, 2026
I also had this!
Environment
1.138.0-insider1f398ff5fa56ae9b782dc3a55856562233efd72e42.10.0148.0.7778.280The problem was not limited to Markdown Preview. Webviews from multiple unrelated extensions were affected, including:
vscode.markdown-language-featuresGitHub.vscode-pull-request-githubms-vscode.vscode-team-toolsI inspected the affected webviews using CDP/
jsdbg. In one affected process, every inspectedvscode-webview://frame had the following state:document.readyState === "complete"isSecureContext === truenavigator.serviceWorkerexistsnavigator.serviceWorker.controller === nullnavigator.serviceWorker.getRegistration()throws:InvalidStateError: Failed to get a ServiceWorkerRegistration: The document is in an invalid state.navigator.serviceWorker.getRegistrations()throws:InvalidStateError: Failed to get ServiceWorkerRegistration objects: The document is in an invalid state.Additional service-worker observations
service_workertargets.--service-worker-schemes=vscode-webview.--disable-service-workercommand-line switch.vscode-webviewscheme withallowServiceWorkers: true.navigator.serviceWorker.register(...), using a module worker andupdateViaCache: 'none'.I also compared the previous installed Insiders build (
1.137.0-insider) with the affected1.138.0-insiderbuild. Both used Electron42.10.0, and their webview bootstrap and service-worker files were byte-identical.Potentially relevant process overlap
During the investigation, an older VS Code browser root and the newer browser root were both running against the same Code Insiders profile. This makes an update/restart lifecycle issue plausible, but I could not prove that the overlapping processes caused the invalid service-worker state.
After the older process exited, the Service Worker database lock was no longer held, but webviews in the newer process still had the invalid state. I did not verify whether a complete process restart or rebuilding the Service Worker profile data repaired the condition.
houssam-hamdan commentedon Sep 10, 2026
Closing and starting the VS code today solved the issue. One last point, i did not click the update myself. VS code installed the update automatically, not something admirable if there is something like that.
g3grau commentedon Sep 21, 2026
same issue with multiple (all?) md files in opensuse/kde/x11:
Version: 1.138.0
Commit: 7debcd0
Date: 2026-09-15T07:24:32Z
Electron: 42.10.0
ElectronBuildId: 15109253
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
@github/copilot: 1.0.84-4
@github/copilot-sdk: 1.0.13
OS: Linux x64 7.2.6-1-default
Extension bisect didn't help