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

TypeError: Cannot read property 'uri' of null #79172

Closed
bpasero opened this issue Aug 15, 2019 · 3 comments · Fixed by microsoft/azuredatastudio#7206
Closed

TypeError: Cannot read property 'uri' of null #79172

bpasero opened this issue Aug 15, 2019 · 3 comments · Fixed by microsoft/azuredatastudio#7206
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug error-telemetry VS Code - Issues generated by telemetry settings-editor VS Code settings editor issues

Comments

@bpasero
Copy link
Member

bpasero commented Aug 15, 2019

TypeError: Cannot read property 'uri' of null
/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts#520:177 (_actionCallback)
/vs/base/common/actions.ts#179:15 (run)
/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts#397:17 (onWorkspaceFoldersChanged)
/vs/workbench/contrib/preferences/browser/preferencesWidgets.ts#313:76 (call)
/vs/base/common/event.ts#572:15 (fire)
/vs/workbench/services/configuration/browser/configurationService.ts#561:40

https://ticino-errors.azurewebsites.net/Errors?bucketIdHash=ff9993b8-a9e2-e4d0-7ff1-db88a9940938

@bpasero bpasero added the error-telemetry VS Code - Issues generated by telemetry label Aug 15, 2019
@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Aug 17, 2019
@roblourens roblourens added this to the August 2019 milestone Aug 18, 2019
@roblourens
Copy link
Member

@sandy081 I'm not following this code.

if ((oldFolder || !this._folder)
|| (!oldFolder || this._folder)
|| (oldFolder && this._folder && (oldFolder as IWorkspaceFolder).uri.toString() === (this._folder as IWorkspaceFolder).uri.toString())) {

I think this is checking whether to update the folders button after folders change, so should it be

if ((oldFolder && !this._folder)
    || (!oldFolder && this._folder)
    || (oldFolder && this._folder && (oldFolder as IWorkspaceFolder).uri.toString() !== (this._folder as IWorkspaceFolder).uri.toString())) {

and then change updateTarget to accept null? Or am I misunderstanding?

@sandy081
Copy link
Member

Yes, it should check if folders are not same.

@roblourens roblourens added the settings-editor VS Code settings editor issues label Sep 6, 2019
@roblourens
Copy link
Member

Real bug to verify -

  • Open "multiroot" workspace with one folder
  • Open the settings editor and select folder settings for that folder
  • Remove that folder from the workspace
  • The settings editor should switch to user settings

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 error-telemetry VS Code - Issues generated by telemetry settings-editor VS Code settings editor issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants