Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
DragosMiloiuNXP opened this issue Sep 13, 2023 · 17 comments
Closed

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

DragosMiloiuNXP opened this issue Sep 13, 2023 · 17 comments
Assignees

Comments

@DragosMiloiuNXP
Copy link

DragosMiloiuNXP commented Sep 13, 2023

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

@gjsjohnmurray
Copy link
Contributor

Does a Windows restart help?

@DragosMiloiuNXP
Copy link
Author

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

@tamuratak
Copy link
Contributor

Might be duplicate of #125993.

@DragosMiloiuNXP
Copy link
Author

@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.

@Guo-Chenxu
Copy link

Guo-Chenxu commented Sep 15, 2023

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.

@Guo-Chenxu
Copy link

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?

@DragosMiloiuNXP
Copy link
Author

Issue is still reproducible on 1.82.2.

@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.

@starball5
Copy link

starball5 commented Sep 16, 2023

Related on Stack Overflow:

@x-hgg-x
Copy link

x-hgg-x commented Sep 16, 2023

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] -

@jodesous
Copy link

jodesous commented Sep 21, 2023

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..

@x-hgg-x
Copy link

x-hgg-x commented Sep 21, 2023

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.

@ssibrahimpur
Copy link

ssibrahimpur commented Sep 25, 2023

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

@DragosMiloiuNXP
Copy link
Author

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

@ghost
Copy link

ghost commented Oct 25, 2023

how to fix this in github.dev ?

@ssibrahimpur
Copy link

ssibrahimpur commented Nov 2, 2023

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

@dvins
Copy link

dvins commented Nov 19, 2023

And on 1.84.2

@mjbvz
Copy link
Collaborator

mjbvz commented Dec 4, 2023

Duplicate of #125993

@mjbvz mjbvz marked this as a duplicate of #125993 Dec 4, 2023
@mjbvz mjbvz closed this as completed Dec 4, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 19, 2024
@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests