Skip to content

[BUG]: Cannot read properties of null (reading 'rootUri') #332

@michael-pisman

Description

@michael-pisman

Describe the bug

I started getting this error recently:

Conventional Commits: Cannot read properties of null (reading 'rootUri')

To reproduce

Steps to reproduce the behavior:

  1. Click on "Conventional Commits" button in source control, get this error
  2. See error

Expected behavior

I expect the prompt to open

Screenshots

image

Application logs

[info] Conventional commits started.
[info] VSCode version: 1.85.0-insider
[info] Git version: 1.0.0
[info] VSCode Conventional Commits version: 1.25.0
[info] conventionalCommits.autoCommit: true
[info] conventionalCommits.silentAutoCommit: false
[info] conventionalCommits.emojiFormat: code
[info] conventionalCommits.gitmoji: false
[info] conventionalCommits.lineBreak: 
[info] conventionalCommits.promptBody: true
[info] conventionalCommits.promptCI: false
[info] conventionalCommits.promptFooter: true
[info] conventionalCommits.promptScopes: false
[info] conventionalCommits.scopes: 
[info] conventionalCommits.showEditor: false
[info] conventionalCommits.showNewVersionNotes: true
[info] conventionalCommits.editor.keepAfterSave: false
[info] git.enableSmartCommit: false
[info] git.smartCommitChanges: all
[info] git.postCommitCommand: none
[error] main: TypeError: Cannot read properties of null (reading 'rootUri')
    at /home/mpisman/.vscode-insiders/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22890:40
    at Generator.next (<anonymous>)
    at /home/mpisman/.vscode-insiders/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22797:71
    at new Promise (<anonymous>)
    at __webpack_modules__.8197.__awaiter (/home/mpisman/.vscode-insiders/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22793:12)
    at conventionalCommits (/home/mpisman/.vscode-insiders/extensions/vivaxy.vscode-conventional-commits-1.25.0/dist/extension.js:22874:16)
    at h (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:141:139821)
    at h.$executeContributedCommand (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:141:140681)
    at u.S (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:10829)
    at u.Q (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:10595)
    at u.M (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:9685)
    at u.L (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:8764)
    at d.value (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:7567)
    at n.y (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:1902)
    at n.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:2119)
    at o.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:103:14054)
    at d.value (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:171:7903)
    at n.y (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:1902)
    at n.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:80:2119)
    at o.fire (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:103:14054)
    at MessagePortMain.<anonymous> (/usr/share/code-insiders/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:171:6183)
    at MessagePortMain.emit (node:events:513:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367)

Additional info

I get this when working on different projects, so I don't think it's project/git related.
Restarting VS Code resolves the issue, but it usually happens again after a while.
I use Debian Bookworm and VS Code Insider edition.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions