bricks-cloud / vscode

The VS Code extension of Bricks, meant to be used with the main Bricks repository.

Home Page:https://bricks-tech.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Webview is disposed

donfour opened this issue · comments

Describe the bug
VS Code webview is flaky. Sometimes closing and opening the live preview will lead to Error: Webview is disposed.

To Reproduce
Steps to reproduce the behavior:

  1. In VS Code, click "activate bricks".
  2. Go to Figma, select any Figma component and generate code from it.
  3. Close webview by clicking on the "X".
  4. Go back to Figma, select any Figma component and generate code again.
  5. VS Code will crash sometimes, and show this error:
[Extension Host] Error: Webview is disposed
    at s.c (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:36185)
    at s.get webview [as webview] (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:35156)
    at ZM (/Users/donovanso/.vscode/extensions/bricks.d2c-vscode-0.0.17/out/extension.js:977:213676)
    at Sw.<anonymous> (/Users/donovanso/.vscode/extensions/bricks.d2c-vscode-0.0.17/out/extension.js:1041:5315)

Expected behavior
Webview should auto-open without error every time user generates code.

Fixed in 8b5e065