Skip to content

markdown file md preview is not openeing after last update to recent version #335295

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%
Extensions: none
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

Activity

  1. houssam-hamdan commented on Sep 9, 2026

    @houssam-hamdan
    Author

    Markdown Preview
    Image

  2. hediet commented on Sep 10, 2026

    @hediet
    Member

    I also had this!

    Environment

    • Windows 11
    • VS Code Insiders 1.138.0-insider
    • Commit 1f398ff5fa56ae9b782dc3a55856562233efd72e
    • Electron 42.10.0
    • Chromium 148.0.7778.280

    The problem was not limited to Markdown Preview. Webviews from multiple unrelated extensions were affected, including:

    • vscode.markdown-language-features
    • GitHub.vscode-pull-request-github
    • ms-vscode.vscode-team-tools

    I inspected the affected webviews using CDP/jsdbg. In one affected process, every inspected vscode-webview:// frame had the following state:

    • document.readyState === "complete"
    • isSecureContext === true
    • navigator.serviceWorker exists
    • navigator.serviceWorker.controller === null
    • navigator.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

    • CDP reported no live service_worker targets.
    • Storage diagnostics reported zero service-worker usage for the inspected webview origin.
    • The renderer was launched with --service-worker-schemes=vscode-webview.
    • There was no --disable-service-worker command-line switch.
    • VS Code registered the vscode-webview scheme with allowServiceWorkers: true.
    • The webview bootstrap did call navigator.serviceWorker.register(...), using a module worker and updateViaCache: 'none'.

    I also compared the previous installed Insiders build (1.137.0-insider) with the affected 1.138.0-insider build. Both used Electron 42.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.

  3. houssam-hamdan commented on Sep 10, 2026

    @houssam-hamdan
    Author

    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.

  4. added
    bug
    install-update
    windows
    on Sep 11, 2026
  5. added
    unreleased
    on Sep 15, 2026
  6. added this to the 1.139.0 milestone on Sep 15, 2026
  7. added
    insiders-released
    and removed
    unreleased
    on Sep 15, 2026
  8. removed
    insiders-released
    on Sep 20, 2026
  9. g3grau commented on Sep 21, 2026

    @g3grau

    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

  10. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Sep 24, 2026
  11. locked and limited conversation to collaborators on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedinstall-updatewindows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions