question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Github Repo TypeError: Cannot read property 'repository' of undefined

See original GitHub issue

When switching to another git repo in the same workspace it will cause this error.

stack trace: TypeError: Cannot read property 'name' of undefined
    at details (/HDD/1TBSSD/projects/Personal/vscord/src/activity.ts:142:50)
    at activity (/HDD/1TBSSD/projects/Personal/vscord/src/activity.ts:39:1)
    at sendActivity (/HDD/1TBSSD/projects/Personal/vscord/src/extension.ts:17:27)
    at /HDD/1TBSSD/projects/Personal/vscord/src/listener.ts:16:244
    at u.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:66:1712)
    at Data.updateGit (/HDD/1TBSSD/projects/Personal/vscord/src/data.ts:189:1)
    at /HDD/1TBSSD/projects/Personal/vscord/src/data.ts:169:1
    at /opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:1045061
    at u.fire (/opt/visual-studio-code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:66:1712)
    at m.open (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:991145)
    at m.openRepository (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:989724)
    at i (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:943438)
    at /opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:989054
    at async Promise.all (index 0)
    at m.onDidChangeVisibleTextEditors (/opt/visual-studio-code/resources/app/extensions/git/dist/main.js:2:988953)

Possibly something to do with a variable not being set when it detects a git repo switch

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
leonardsshcommented, Jan 1, 2022
1reaction
nick22985commented, Dec 31, 2021

lmao always the way xD

Read more comments on GitHub >

github_iconTop Results From Across the Web

Random failures with "Cannot read property 'repository' of ...
The "Cannot read property 'repository'" error made me think that the github context object might be missing from those jobs that failed with...
Read more >
Uncaught TypeError: Cannot read property 'repo' of undefined ...
workspace consisted of two project folders, where each is one git repository, but no nested repositories. i just made some debug outputs and...
Read more >
TypeError: Cannot read property 'options' of undefined #5768
Describe the bug I am trying to login to gh cli using gh auth login I am getting TypeError: Cannot read property 'options'...
Read more >
"TypeError: Cannot read property 'findOne' of undefined ...
Bug Report I defined an custom repositoy, and used the findOne method in controller, i get the error: TypeError: Cannot read property ......
Read more >
Cannot read property 'info' of undefined #3864 - sveltejs/kit
solved by removing the node_modules folder and running npm install . All reactions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found