mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.

Home Page:https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

anilzeybek opened this issue · 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

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.

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

How can we solve it, buddy?

Same issue
VsCode: Version: 1.85.0

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.

@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 :)

reinstalling the extension worked for me

Same problem, reinstalling helped.

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).

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: Dramloc@9b339f9.

Developer: Reload Window also works without having to restart VSCode

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

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: microsoft/vscode#179053