vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

Git Graph not opening: "Cannot read properties of null (reading 'rootUri')"

Open anilzeybek opened this issue 1 year ago • 14 comments

Describe the Bug When you click to "View Git Graph (git log)" button in the source control pane, it gives an error and nothing comes up. After refreshing the VSCode it is fixed, but soon it starts to give the error again.

Steps to Reproduce Steps to reproduce the behaviour:

  1. Go to Source Contrpol pane
  2. Click on "View Git Graph (git log)" button
  3. See error on the bottom right corner

Expected Behaviour The Git Graph tab should open.

Environment

  • Git Graph Extension Version: 1.30.0
  • Visual Studio Code Version: 1.85.0
  • Operating System: Linux

Screenshots (optional) Screenshot from 2023-12-08 13-16-36

anilzeybek avatar Dec 08 '23 12:12 anilzeybek

I encounter the same issue quite frequently in recent days as well. I didn't notice any specific way to guarantee reproducing the issue though. Besides restarting VS Code, it seems that making a commit can also bring it back to work.

MuTsunTsai avatar Dec 11 '23 02:12 MuTsunTsai

I don't know if it's related, but I started encountering this problem frequently after updating VSCode to 1.85.

noguchi-taketo avatar Dec 11 '23 05:12 noguchi-taketo

How can we solve it, buddy?

wangshuaiii avatar Dec 11 '23 09:12 wangshuaiii

Same issue VsCode: Version: 1.85.0

MishaMgla avatar Dec 11 '23 10:12 MishaMgla

This change fixed the issue on my end: https://github.com/dramloc/vscode-git-graph/commit/9b339f97580badbcac36a5311ec00fa338bb8393. No idea why null is now passed as an argument.

The previous commit (https://github.com/dramloc/vscode-git-graph/commit/61a6fb1361e165cdb4cc781d5dbc5870180edbd5) also contains some update to make the project installable after 2+ years without updates.

Feel free to clone and install locally, but I probably won't publish a PR as the repository seems to no longer be maintained.

Dramloc avatar Dec 11 '23 23:12 Dramloc

@Dramloc if I may suggest opening a PR anyways, that would probably be the first step to getting @mhutchie to release just a hotfix even if we don't get any other feature updates. If he's able to be reached, I hope he might be willing to make a very limited release now that the entire extension is nearly broken. (Who knows, he might even use it himself even if he doesn't keep maintaining it with feature development, so this could impact him too.) Having a small PR could be the first step towards that. Thanks :)

Keavon avatar Dec 12 '23 03:12 Keavon

reinstalling the extension worked for me

m-emre-yalcin avatar Dec 13 '23 12:12 m-emre-yalcin

Same problem, reinstalling helped.

ClusterM avatar Dec 13 '23 22:12 ClusterM

Simply restarting VS Code, or even creating a Git commit, seems to help. So I'm not so sure that reinstalling is doing anything different than the two aforementioned less invasive options. Although if you're reporting that reinstalling permanently helps, please report back since that would be a nice fix instead of just a workaround (let's hope that's the case).

Keavon avatar Dec 13 '23 22:12 Keavon

This change fixed the issue on my end: Dramloc@9b339f9. No idea why null is now passed as an argument.

The previous commit (Dramloc@61a6fb1) also contains some update to make the project installable after 2+ years without updates.

Feel free to clone and install locally, but I probably won't publish a PR as the repository seems to no longer be maintained.

Thank you ! I appreciate your code.

For a simple modification, make the changes directly in the file /Users/your-username/.vscode/extensions/mhutchie.git-graph-1.30.0/out/commands.js.

Refer to this code for more details: https://github.com/Dramloc/vscode-git-graph/commit/9b339f97580badbcac36a5311ec00fa338bb8393.

leeumm avatar Dec 14 '23 15:12 leeumm

Developer: Reload Window also works without having to restart VSCode

IstoraMandiri avatar Dec 16 '23 23:12 IstoraMandiri

This can probably be closed since it seems to no longer be happening. (I expect it was fixed on the VS Code side.)

Keavon avatar Feb 19 '24 21:02 Keavon

Also, the reality is that this beloved extension will probably be forever abandoned. It's still serviceable and useful every day. But I propose that we, as a community, devote our efforts towards campaigning for VS Code to reimplement Git Graph as a built-in "home page" for the core editor so it can be supported by the core team as a first-class feature.

Give your 👍 to this issue, add comments showing your support, and try to get others to do the same: https://github.com/microsoft/vscode/issues/179053

Keavon avatar Feb 19 '24 22:02 Keavon