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

Explorer empty on startup #107143

Closed
jrieken opened this issue Sep 21, 2020 · 5 comments
Closed

Explorer empty on startup #107143

jrieken opened this issue Sep 21, 2020 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-explorer Explorer widget issues important Issue identified as high-priority insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@jrieken
Copy link
Member

jrieken commented Sep 21, 2020

  • get latest insiders
  • open workbench
  • 🐛 explorer is empty
ERR Cannot read property 'some' of undefined: TypeError: Cannot read property 'some' of undefined
    at NotebookProviderInfo.matches (file:///Users/jrieken/Code/vscode/out/vs/workbench/contrib/notebook/common/notebookProvider.js:23:35)
    at file:///Users/jrieken/Code/vscode/out/vs/workbench/contrib/notebook/browser/notebookServiceImpl.js:130:149
    at Object.filter (file:///Users/jrieken/Code/vscode/out/vs/base/common/iterator.js:43:21)
    at filter.next (<anonymous>)
    at NotebookProviderInfoStore.getContributedNotebook (file:///Users/jrieken/Code/vscode/out/vs/workbench/contrib/notebook/browser/notebookServiceImpl.js:130:44)
    at NotebookService.getContributedNotebookProviders (file:///Users/jrieken/Code/vscode/out/vs/workbench/contrib/notebook/browser/notebookServiceImpl.js:659:51)
    at NotebookContribution.getContributedEditors (file:///Users/jrieken/Code/vscode/out/vs/workbench/contrib/notebook/browser/notebook.contribution.js:167:41)
    at Object.getEditorOverrides (file:///Users/jrieken/Code/vscode/out/vs/workbench/contrib/notebook/browser/notebook.contribution.js:120:33)
    at EditorService.getEditorOverrides (file:///Users/jrieken/Code/vscode/out/vs/workbench/services/editor/browser/editorService.js:381:71)
    at WorkbenchContextKeysHandler.updateEditorContextKeys (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/contextkeys.js:144:86)
    at file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/contextkeys.js:92:82
    at Emitter.fire (file:///Users/jrieken/Code/vscode/out/vs/base/common/event.js:456:38)
    at EditorService.doHandleActiveEditorChangeEvent (file:///Users/jrieken/Code/vscode/out/vs/workbench/services/editor/browser/editorService.js:106:43)
    at EditorService.handleActiveEditorChange (file:///Users/jrieken/Code/vscode/out/vs/workbench/services/editor/browser/editorService.js:99:18)
    at file:///Users/jrieken/Code/vscode/out/vs/workbench/services/editor/browser/editorService.js:68:74
    at Emitter.fire (file:///Users/jrieken/Code/vscode/out/vs/base/common/event.js:456:38)
    at EditorPart.doSetGroupActive (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/parts/editor/editorPart.js:419:42)
    at Object.fromJSON (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/parts/editor/editorPart.js:757:30)
    at GridView._deserializeNode (file:///Users/jrieken/Code/vscode/out/vs/base/browser/ui/grid/gridview.js:831:52)
    at file:///Users/jrieken/Code/vscode/out/vs/base/browser/ui/grid/gridview.js:824:36
    at Array.map (<anonymous>)
    at GridView._deserializeNode (file:///Users/jrieken/Code/vscode/out/vs/base/browser/ui/grid/gridview.js:822:53)
    at GridView._deserialize (file:///Users/jrieken/Code/vscode/out/vs/base/browser/ui/grid/gridview.js:816:30)
    at Function.deserialize (file:///Users/jrieken/Code/vscode/out/vs/base/browser/ui/grid/gridview.js:812:20)
    at Function.deserialize (file:///Users/jrieken/Code/vscode/out/vs/base/browser/ui/grid/grid.js:423:50)
    at EditorPart.doCreateGridControlWithState (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/parts/editor/editorPart.js:746:56)
    at EditorPart.doCreateGridControlWithPreviousState (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/parts/editor/editorPart.js:719:26)
    at EditorPart.doCreateGridControl (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/parts/editor/editorPart.js:692:38)
    at EditorPart.createContentArea (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/parts/editor/editorPart.js:600:18)
    at EditorPart.create (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/part.js:43:37)
    at file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/workbench.js:234:34
    at Array.forEach (<anonymous>)
    at Workbench.renderWorkbench (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/workbench.js:232:15)
    at file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/workbench.js:76:26
    at InstantiationService.invokeFunction (file:///Users/jrieken/Code/vscode/out/vs/platform/instantiation/common/instantiationService.js:43:24)
    at Workbench.startup (file:///Users/jrieken/Code/vscode/out/vs/workbench/browser/workbench.js:61:38)
    at DesktopMain.open (file:///Users/jrieken/Code/vscode/out/vs/workbench/electron-browser/desktop.main.js:61:52)
@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels Sep 21, 2020
@jrieken
Copy link
Member Author

jrieken commented Sep 21, 2020

@bpasero for making the workbench more fault tolerant

@jrieken
Copy link
Member Author

jrieken commented Sep 21, 2020

I believe this was caused be ab1f288. The problem is that notebook information is persisted in a memento and that the structure of notebook info has changed. Therefore, after the first (re)load, this error happens. Another reload should straighten things out again. Trying to push a workaround.

jrieken added a commit that referenced this issue Sep 21, 2020
@bpasero
Copy link
Member

bpasero commented Sep 21, 2020

@jrieken is there a way to reproduce the empty explorer from master? The editor area already has a try-catch block to protect against editors failing to restore, so I think this issue is specific to the file explorer or side bar in general.

Adding @isidorn for explorer to see if he can reproduce and better protect against empty explorer.

@bpasero bpasero added the file-explorer Explorer widget issues label Sep 21, 2020
@bpasero bpasero added this to the September 2020 milestone Sep 21, 2020
@jrieken
Copy link
Member Author

jrieken commented Sep 21, 2020

@jrieken is there a way to reproduce the empty explorer from master?

return this.selectors?.some(selector => NotebookProviderInfo.selectorMatches(selector, resource));

⬆️ replace that line with some error throwing and you should be able to see the same issue

@isidorn
Copy link
Contributor

isidorn commented Sep 21, 2020

explorer was failing becaue the getEditorOverrides was throwing here

const overrides = resource ? this.editorService.getEditorOverrides(resource, undefined, undefined) : [];

Feels like @bpasero tackled that via this commit

meganrogge pushed a commit to meganrogge/vscode that referenced this issue Sep 22, 2020
meganrogge pushed a commit to meganrogge/vscode that referenced this issue Sep 22, 2020
@jrieken jrieken added the verified Verification succeeded label Oct 1, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 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 file-explorer Explorer widget issues 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

5 participants
@rebornix @bpasero @jrieken @isidorn and others