Skip to content

Webviews do not work 50% of the time after 1.82 update #192965

Closed

Description

Type: Bug

  1. Start VS Code.
  2. Open a webview window
  3. Close VS Code
  4. Start it again.
  5. Open a webview again. The error from the screenshot will be shown. This issue was not reproducible on 1.81.

image

VS Code version: Code 1.82.1 (6509174, 2023-09-08T08:45:05.575Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.76GB (6.26GB free)
Process Argv --crash-reporter-id 9a1ca677-d337-41d6-a68e-73f40408f761
Screen Reader no
VM 0%
Extensions (8)
Extension Author (truncated) Version
tsl-problem-matcher amo 0.6.2
file-downloader min 1.0.12
cmake-tools ms- 1.15.31
cpptools ms- 1.17.5
vscode-embedded-tools ms- 0.7.0
vscode-serial-monitor ms- 0.10.0
mcuxpresso NXP 1.1.52
cmake twx 0.0.17
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30792226
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
3biah626:30602489
f6dab269:30613381
vscrp:30673768
showlangstatbar:30737416
0bi6i642:30835152
a2ce3375:30757347
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30821571
dsvsc015cf:30829746

Activity

  1. gjsjohnmurray commented on Sep 13, 2023

    @gjsjohnmurray
    Contributor

    Does a Windows restart help?

  2. DragosMiloiuNXP commented on Sep 13, 2023

    @DragosMiloiuNXP
    Author

    John Murray (@gjsjohnmurray), no, it doesn't. I restarted the computer two times. No improvement.

  3. tamuratak commented on Sep 13, 2023

    @tamuratak
    Contributor

    Might be duplicate of #125993.

  4. DragosMiloiuNXP commented on Sep 13, 2023

    @DragosMiloiuNXP
    Author

    Takashi Tamura (@tamuratak), I do not think it is a duplicate of that one. The issue was not reproducible on 1.81 or earlier VS Code builds, and that issue was reported back in June.

  5. Guo-Chenxu commented on Sep 15, 2023

    @Guo-Chenxu

    Did you solve this problem ? I met the problem same as yours and have been troubled by this problem for many days.

    image

    I have tried:

    1. reinstall vscode
    2. kill the vscode process
    3. reinstall extension (markdown preview enhance)
    4. restart my windows
    5. use code --no-sandbox to run
    6. delete the cache in C:\Users\<user_name>\AppData\Roaming\Code

    but they all seem not to work. And now, every time, I open my vscode to read markdown, I have to open twice to preview.

  6. Guo-Chenxu commented on Sep 15, 2023

    @Guo-Chenxu

    By the way, the time of start when vscode has problems seems to be slower than usual. I don't know why, but there may be some bugs in loading?

  7. DragosMiloiuNXP commented on Sep 15, 2023

    @DragosMiloiuNXP
    Author

    Issue is still reproducible on 1.82.2.

    GuoChenxu (@Guo-Chenxu) , yes, when VS Code has problems with opening webviews, it starts slower. When it starts normally (not slower than usual), the webviews work.

  8. starball5 commented on Sep 16, 2023

    @starball5

    Related on Stack Overflow:

  9. x-hgg-x commented on Sep 16, 2023

    @x-hgg-x

    Related to #192493.

    On 1.82+ and insiders, on Linux, VS Code has a startup slowdown in the init storage step 50% of the time, and it cannot open a webview afterwards when it is the case:

    What Duration Process Info
    init storage (global & workspace) 1509 [renderer] -
    init workspace service 1495 [renderer] -
  10. jodesous commented on Sep 21, 2023

    @jodesous

    Same problem on Linux (Pop!_OS 22.04 LTS) with vscode 1.82.2 when i open GitGraph. I have to restart vscode all time. This problem seems to happen since version 1.82 for me.

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

  11. x-hgg-x commented on Sep 21, 2023

    @x-hgg-x

    The issue occurs because VS Code doesn't exit immediately after the last window is closed (#192742). Killing all the residual processes solves the issue.

    A patch has been released in the last insiders version, and with it the issue doesn't occur anymore.

  12. ssibrahimpur commented on Sep 25, 2023

    @ssibrahimpur

    Is this issue resolved? Can someone confirm? DragosMiloiuNXP

    image

    Type: Bug

    1. Start VS Code.
    2. Open a webview window
    3. Close VS Code
    4. Start it again.
    5. Open a webview again. The error from the screenshot will be shown. This issue was not reproducible on 1.81.

    image

    VS Code version: Code 1.82.1 (6509174, 2023-09-08T08:45:05.575Z) OS version: Windows_NT x64 10.0.19045 Modes:

    System Info
    Extensions (8)
    A/B Experiments

  13. DragosMiloiuNXP commented on Sep 27, 2023

    @DragosMiloiuNXP
    Author

    I tested the issue on the insiders version and it seems to be fixed.

  14. ssibrahimpur commented on Nov 2, 2023

    @ssibrahimpur

    Matt Bierner (@mjbvz) Any workaround for this issue at this point in time? Issue observed on 1.83.1 version

  15. dvins commented on Nov 19, 2023

    @dvins

    And on 1.84.2

  16. mjbvz commented on Dec 4, 2023

    @mjbvz
    Contributor

    Duplicate of #125993

  17. locked and limited conversation to collaborators on Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions