microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.2k stars 28.55k forks source link

After extensions restart or restart extension host custom editor document webview seem disconnected #209967

Open mbehr1 opened 5 months ago

mbehr1 commented 5 months ago

Type: Bug

Starting with vscode 1.88.0 after the extensions get restarted (instead of full reload window) or after the command "restart extension host" is performed webviews that are created as part of a custom editor provider (webviewOptions: {retainContextWhenHidden: true}... ) seem to be disconnected. E.g. the documents are still visible but the webview seems unable to communicate to the (restarted) extension.

Any ideas how to workaround that?

VS Code version: Code 1.88.0 (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:28:09.495Z) OS version: Darwin arm64 23.4.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 24)| |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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|5, 4, 3| |Memory (System)|16.00GB (0.19GB free)| |Process Argv|--crash-reporter-id 39b27cd9-4252-4af0-9e9d-d6c3a740ccee| |Screen Reader|no| |VM|0%|
Extensions (35) Extension|Author (truncated)|Version ---|---|--- commit-message-editor|ada|0.25.0 chronicler|arc|0.1.16 vscode-eslint|dba|2.4.4 xml|Dot|2.5.1 prettier-vscode|esb|10.4.0 copilot|Git|1.178.0 copilot-chat|Git|0.14.0 vscode-github-actions|git|0.26.2 vscode-pull-request-github|Git|0.86.1 svgeditor|hen|2.9.0 plantuml|jeb|2.18.0 solidity|Jua|0.0.174 dlt-logs|mbe|1.85.2 fishbone|mbe|1.28.3 smart-log|mbe|1.10.0 vsc-lfs|mbe|1.4.1 vsc-webshark|mbe|2.1.0 vscode-antlr4|mik|2.4.6 playwright|ms-|1.0.22 debugpy|ms-|2024.4.0 isort|ms-|2023.10.1 python|ms-|2024.4.0 vscode-pylance|ms-|2024.4.1 jupyter|ms-|2024.3.0 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-ssh|ms-|0.110.1 remote-ssh-edit|ms-|0.86.0 cpptools|ms-|1.19.9 hexeditor|ms-|1.9.14 remote-explorer|ms-|0.4.3 rust-analyzer|rus|0.3.1916 vscode-lldb|vad|1.10.0
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 f8hc8238:30694864 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r3:30993541 dsvsc020:30976470 pythonait:31006305 jchc7451:30973076 gee8j676:31009558 dsvsc021:30996838 gd77d436:30999572 ```
mbehr1 commented 5 months ago

Side comment: Command "Developer: Reload Webviews" does not change the behavior. E.g. if the web view is properly working it keeps working after "Reload Webviews" and if the problem is there it stays there even after "Reload Webviews".

mbehr1 commented 3 months ago

Any update or more info needed?