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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error closing extensions editor #73215

Closed
jrieken opened this issue May 3, 2019 · 9 comments 路 Fixed by #73350
Closed

Error closing extensions editor #73215

jrieken opened this issue May 3, 2019 · 9 comments 路 Fixed by #73350
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented May 3, 2019

Steps to Repro:

  • Search for an extension pack in extensions view (Say PHP Extension Pack)
  • Open PHP Extension Pack in the editor
  • Go to Extensions Pack tab
  • Click on any extension

馃悰 Fails to open

  • Close to open the editor

馃悰 Does not close

Not sure how it happened but I had the extension pack open (as extension editor) and after a while (being on twitter) I wanted to close the editor and I saw error notifications. These are the minified stacktraces from the log

the build was 473af338e1bd9ad4d9853933da1cd9d5d9e07dc9

[2019-05-03 10:40:21.933] [renderer1] [error] Cannot read property 'id' of undefined: TypeError: Cannot read property 'id' of undefined
    at o.getResource (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2576:367)
    at Object.t.toResource (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2398:701)
    at e.updateResourceMap (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2410:183)
    at e.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2409:944)
    at e.replaceEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2408:104)
    at e.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2407:479)
    at e.doOpenEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5040:637)
    at e.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5040:109)
    at e.doOpenEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4512:798)
    at e.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4512:584)
    at e.open (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2866:884)
    at disposables.push.onDidChangeSelection.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2574:289)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:73:604)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:80:73)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at T.set (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:936:791)
    at L.setSelection (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:938:935)
    at A.onPointer (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:808:949)
    at A.onPointer (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:938:286)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:838)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:73:604)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at HTMLDivElement.s (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:83:319)
[2019-05-03 10:40:25.015] [renderer1] [error] Cannot read property 'identifier' of undefined: TypeError: Cannot read property 'identifier' of undefined
    at o.getResource (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2576:356)
    at Object.t.toResource (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2398:701)
    at e.updateResourceMap (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2410:183)
    at e.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2409:944)
    at e.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2407:404)
    at e.doOpenEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5040:637)
    at e.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5040:109)
    at e.doOpenEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4512:798)
    at e.openEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:4512:584)
    at e.open (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2866:884)
    at disposables.push.onDidChangeSelection.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2574:289)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:73:604)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:80:73)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at T.set (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:936:791)
    at L.setSelection (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:938:935)
    at A.onPointer (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:808:660)
    at A.onPointer (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:937:717)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:838)
    at e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:73:604)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:77:818)
    at HTMLDivElement.s (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:83:319)
[2019-05-03 10:47:22.096] [renderer1] [error] Cannot read property 'displayName' of undefined: TypeError: Cannot read property 'displayName' of undefined
    at o.getName (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2576:114)
    at e.doHandleOpenEditorError (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5041:236)
    at t.editorControl.openEditor.then.t (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5040:852)
@bpasero
Copy link
Member

bpasero commented May 3, 2019

@sandy081 source

getResource(): URI {
	return URI.from({
		scheme: 'extension',
		path: this.extension.identifier.id
	});
}

@bpasero bpasero removed their assignment May 3, 2019
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label May 3, 2019
@sandy081
Copy link
Member

sandy081 commented May 6, 2019

Not able to repro it. Also followed the code and I do not see a path that has no extension in the input.

@jrieken Do you remember any steps you followed during this?
@bpasero Is it possible to guess what could be happening in editor land from the above stack trace?

@bpasero
Copy link
Member

bpasero commented May 6, 2019

@jrieken are you using editors with preview mode, e.g. do they appear italic?

Hard to say what the execution flow here is to be honest. Looks like a normal editor opening but failing to get the resource for the editor, which is used to associate the editor in the editor tabs model.

@sandy081
Copy link
Member

sandy081 commented May 6, 2019

Looks like a normal editor opening

But this is happening while @jrieken is trying to close the currently opened extension editor.

@jrieken
Copy link
Member Author

jrieken commented May 6, 2019

@jrieken are you using editors with preview mode, e.g. do they appear italic?

I don't use tabs, so I am not sure what the model then is...

But this is happening while @jrieken is trying to close the currently opened extension editor.

Yes, closing it was. I had the extension editor open, also installed the extension, then waited, and then tried to close the editor. So maybe some cleanup logic hit me or installing the extension made a different...

@bpasero
Copy link
Member

bpasero commented May 6, 2019

The preview feature works with tabs enabled or disabled. The fact that an editor is opened can be explained if you closed an editor and the next one below that editor was the extension editor. Closing an editor always means we open the previous editor unless it is the last editor.

@sandy081 I suggest you try to figure out how it is possible that this.extension.identifier is undefined even though it is not typed as such.

@sandy081
Copy link
Member

sandy081 commented May 6, 2019

Ok

@sandy081 sandy081 added the extensions Issues concerning extensions label May 6, 2019
@sandy081 sandy081 added this to the April 2019 milestone May 6, 2019
sandy081 added a commit that referenced this issue May 6, 2019
@alexr00
Copy link
Member

alexr00 commented May 8, 2019

What are the verification steps for this?

@alexr00 alexr00 added the verification-steps-needed Steps to verify are needed for verification label May 8, 2019
@sandy081
Copy link
Member

sandy081 commented May 8, 2019

@alexr00 Steps to repro are in the description

@sandy081 sandy081 removed the verification-steps-needed Steps to verify are needed for verification label May 8, 2019
@alexr00 alexr00 added the verified Verification succeeded label May 8, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 20, 2019
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 extensions Issues concerning extensions verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants