mhutchie / vscode-git-graph

View a Git Graph of your repository in Visual Studio Code, and easily perform Git actions from the graph.
https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Other
1.89k stars 243 forks source link

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

Open anilzeybek opened 7 months ago

anilzeybek commented 7 months ago

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

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

MuTsunTsai commented 6 months ago

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.

noguchi-taketo commented 6 months ago

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

wangshuaiii commented 6 months ago

How can we solve it, buddy?

MishaMgla commented 6 months ago

Same issue VsCode: Version: 1.85.0

Dramloc commented 6 months ago

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.

Keavon commented 6 months ago

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

m-emre-yalcin commented 6 months ago

reinstalling the extension worked for me

ClusterM commented 6 months ago

Same problem, reinstalling helped.

Keavon commented 6 months ago

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

leeumm commented 6 months ago

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.

IstoraMandiri commented 6 months ago

Developer: Reload Window also works without having to restart VSCode

Keavon commented 4 months ago

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

Keavon commented 4 months ago

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