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

Reloading/restoring workbench with open webview throws exception #100783

Closed
deepak1556 opened this issue Jun 22, 2020 · 3 comments
Closed

Reloading/restoring workbench with open webview throws exception #100783

deepak1556 opened this issue Jun 22, 2020 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@deepak1556
Copy link
Contributor

deepak1556 commented Jun 22, 2020

  • VSCode Version: 1.47.0-insider 269f0fd
  • OS Version: macOS 10.15.5

Steps to Reproduce:

  1. code-insiders
  2. open markdown file and preview it
  3. Command palette > Reload Window
  4. Empty window with following exception

or

  1. Open extension preview page
  2. Reload Window
  3. Same exception
  ERR Cannot read property 'onDidChange' of undefined: TypeError: Cannot read property 'onDidChange' of undefined
    at e.get onDidChange [as onDidChange] (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6261:668)
    at new f (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:584:327)
    at v._deserializeNode (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:333)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:191
    at Array.map (<anonymous>)
    at v._deserializeNode (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:172)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:191
    at Array.map (<anonymous>)
    at v._deserializeNode (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:172)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:191
    at Array.map (<anonymous>)
    at v._deserializeNode (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:172)
    at v._deserialize (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:77)
    at Function.deserialize (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:594:11)
    at Function.deserialize (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:603:550)
    at O.createWorkbenchLayout (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6322:726)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6399:218
    at d.invokeFunction (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1647:465)
    at O.startup (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6398:758)
    at q.open (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:7478:911)
workbench.desktop.main.js:1666   ERR Cannot read property 'state' of undefined: TypeError: Cannot read property 'state' of undefined
    at e.saveState (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6266:461)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2998:628
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at e.flush (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2836:356)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6400:319
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:91:482
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:92:235
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:91:336
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:91:482
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:419:274
    at E.onResponse (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:419:882)
    at E.onBuffer (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:419:718)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:417:870
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at EventEmitter.n (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:93:143)
    at EventEmitter.emit (events.js:210:5)
    at Object.onMessage (electron/js2c/renderer_init.js:3465:16)
ERR Cannot read property 'state' of undefined: TypeError: Cannot read property 'state' of undefined
    at e.saveState (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6266:461)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2998:628
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at e.flush (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2836:356)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2836:277
workbench.desktop.main.js:4253 Extension host terminated unexpectedly. Code:  null  Signal:  SIGINT
ERR Cannot read property 'state' of undefined: TypeError: Cannot read property 'state' of undefined
    at e.saveState (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6266:461)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2998:628
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at e.close (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2836:544)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:7479:464
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:6400:191
    at c.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:801)
    at e.handleWillShutdown (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4476:777)
    at EventEmitter.<anonymous> (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4476:317)
    at EventEmitter.emit (events.js:210:5)
    at Object.onMessage (electron/js2c/renderer_init.js:3465:16)

Does this issue occur when all extensions are disabled?: Yes

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug electron-8-update markdown Markdown support issues webview Webview issues and removed markdown Markdown support issues labels Jun 22, 2020
@rebornix
Copy link
Member

It was introduced by 60d2192 , which registers EditorPart twice and ends up with registering EditorPart in layout service twice (the latter overrides the former one).

registerSingleton(IEditorGroupsService, EditorPart);
registerSingleton(IEditorDropService, EditorPart);

@rebornix rebornix added this to the June 2020 milestone Jun 22, 2020
@rebornix rebornix added important Issue identified as high-priority and removed electron-8-update webview Webview issues labels Jun 22, 2020
@rebornix
Copy link
Member

For anyone who is blocked by the empty workbench, CMD/Ctrl+Shift+N can still open a new window.

@vjocw
Copy link

vjocw commented Jun 23, 2020

For anyone who is blocked by the empty workbench, CMD/Ctrl+Shift+N can still open a new window.

@rebornix

I'm on my Mac OS X. Using CMD/Ctrl+Shift+N, I was able to get a new window open. However, I get the spinning wheel and I'm not able to interact with the window at all. Seems like I'm stuck in an infinite loop or similar. Any other suggestions?

I'm blocked right now from debugging an issue in our plugin.

@mjbvz mjbvz added the verified Verification succeeded label Jul 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants
@rebornix @bpasero @deepak1556 @sbatten @mjbvz @vjocw and others