Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not seeing the GitLens option on the side bar, it shows for a moment and disappears after that #1832

Closed
joseleon-axosoft opened this issue Feb 25, 2022 · 15 comments

Comments

@joseleon-axosoft
Copy link

joseleon-axosoft commented Feb 25, 2022

  • GitLens Version: Insiders 2022.2.2417
  • VSCode Version: vscode.dev
  • OS Version: Chrome

Steps to Reproduce:

  1. See attached animated gif
  2. Note how the option shows on the side bar for a moment and then disappears
  3. I guess is because no project with a git repository is open, but it's a bit confusing, because I'm not getting any kind of option where to go to use the tool if I'm not with a folder open with a git repository.

gitlens_issue_1

@joseleon-axosoft joseleon-axosoft added potential-bug triage Needs to be looked at labels Feb 25, 2022
@eamodio
Copy link
Member

eamodio commented Feb 28, 2022

I'm really not sure what is going on here. I would recommend uninstalling GitLens, close VS Code completely, and make sure there are no other version of GitLens in the .vscode/extensions folder in your home directory. And then try to re-install.

@eamodio eamodio added needs-more-info Needs further information, steps, details, etc. and removed triage Needs to be looked at labels Feb 28, 2022
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!

@github-actions github-actions bot added the inactive Issue has not had recent required feedback label Mar 8, 2022
@claudiorivera
Copy link

claudiorivera commented Mar 13, 2022

Some time in the last couple days, I noticed my GitLens menus disappeared from the Source Control tab and that the only GitLens options in the command palette are these:
Screen Shot 2022-03-12 at 10 47 22 PM

Like the OP, I see the GitLens menus briefly appear and then disappear a split second later. This is what it looks like when installing and also when enabling:
gitlens-example1
gitlens-example2

As you can hopefully see, when GitLens is installed (or re-enabled after being disabled), we see the GitLens options in the Source Control tab very briefly, before they disappear.

Here's my GitLens log for 12.0.4:

[2022-03-13 13:41:27.917] [    1] GitLens v12.0.4 activating in Visual Studio Code(1.65.2) on the desktop
[2022-03-13 13:41:27.918] [    2] SubscriptionService.changeSubscription — d={"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:26:37.107Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:26:37.107Z"}},"state":0}, e=true
[2022-03-13 13:41:27.918] [    2] SubscriptionService.changeSubscription completed • 0 ms
[2022-03-13 13:41:27.926] [    3] Container.registerGitProviders
[2022-03-13 13:41:27.965] [    4] GitProviderService.accessCore — j=undefined, z=undefined
[2022-03-13 13:41:27.965] [    5] SubscriptionService.ensureSession — d=false
[2022-03-13 13:41:27.965] [    6] SubscriptionService.getOrCreateSession — d=false
[2022-03-13 13:41:27.967] [    7] GitProviderService.register completed • 0 ms — j=git
[2022-03-13 13:41:27.967] [    8] GitProviderService.register completed • 0 ms — j=vsls
[2022-03-13 13:41:27.967] [    9] GitProviderService.register completed • 0 ms — j=github
[2022-03-13 13:41:27.968] [    a] GitProviderService.registrationComplete completed • 0 ms
[2022-03-13 13:41:27.968] [    3] Container.registerGitProviders completed • 41 ms
[2022-03-13 13:41:27.969] [    b] LineAnnotationController.resume
[2022-03-13 13:41:27.969] [    c] GitLineTracker.subscribe
[2022-03-13 13:41:27.969] [    c] GitLineTracker.subscribe Starting line tracker...
[2022-03-13 13:41:27.969] [    c] GitLineTracker.subscribe completed • 0 ms
[2022-03-13 13:41:27.969] [    b] LineAnnotationController.resume completed • 0 ms
[2022-03-13 13:41:27.969] [    d] LineAnnotationController.refresh
[2022-03-13 13:41:27.969] [    e] GitLineTracker.subscribe
[2022-03-13 13:41:27.969] [    e] GitLineTracker.subscribe completed • 0 ms
[2022-03-13 13:41:27.970] [    f] GitLineTracker.subscribe
[2022-03-13 13:41:27.970] [    f] GitLineTracker.subscribe completed • 0 ms
[2022-03-13 13:41:27.975] [    1] GitLens v12.0.4 activated, syncedVersion=12.0.4, localVersion=11.7.0, previousVersion=12.0.4, welcome=true • 58 ms
[2022-03-13 13:41:27.976] [    d] LineAnnotationController.refresh completed • 6 ms
[2022-03-13 13:41:28.095] [   10] SubscriptionAuthenticationProvider.getSessions — e=["gitlens"]
[2022-03-13 13:41:28.116] [   10] SubscriptionAuthenticationProvider.getSessions completed • Found 0 sessions • 20 ms
[2022-03-13 13:41:28.144] [   11] SubscriptionService.logout
[2022-03-13 13:41:28.144] [   12] SubscriptionAuthenticationProvider.abort
[2022-03-13 13:41:28.144] [   13] ServerConnection.abort
[2022-03-13 13:41:28.150] [   13] ServerConnection.abort completed • 5 ms
[2022-03-13 13:41:28.150] [   12] SubscriptionAuthenticationProvider.abort completed • 5 ms
[2022-03-13 13:41:28.150] [   14] SubscriptionService.changeSubscription — d={"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:41:28.150Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:41:28.150Z"}},"state":0}
[2022-03-13 13:41:28.150] [   15] GitProviderService.onSubscriptionChanged — j={"current":{"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:41:28.150Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:41:28.150Z"}},"state":0},"previous":{"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:26:37.107Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-13T13:26:37.107Z"}},"state":0},"etag":1647178888150}
[2022-03-13 13:41:28.150] [   15] GitProviderService.onSubscriptionChanged completed • 0 ms
[2022-03-13 13:41:28.150] [   14] SubscriptionService.changeSubscription completed • 0 ms
[2022-03-13 13:41:28.151] [   16] GitProviderService.accessCore — j=undefined, z=undefined
[2022-03-13 13:41:28.152] [   11] SubscriptionService.logout completed • 7 ms
[2022-03-13 13:41:28.152] [    6] SubscriptionService.getOrCreateSession completed • 186 ms
[2022-03-13 13:41:28.152] [   16] GitProviderService.accessCore completed • 0 ms
[2022-03-13 13:41:28.152] [    5] SubscriptionService.ensureSession completed • 186 ms
[2022-03-13 13:41:28.152] [    4] GitProviderService.accessCore completed • 187 ms

I have tried:

  • Uninstalling GitLens and reinstalling it
  • Disabling GitLens and re-enabling it
  • Uninstalling VS Code with brew uninstall --cask --zap and reinstalling it
  • Deleting ~/Library/Cache/Code
  • Disabling Settings Sync, deleting cloud data, and re-enabling it
  • Installing with the "Don't Sync" option
  • Signing in to GitLens+
  • Signing out of GitHub (as well as signing back in)
  • Deleting all extensions and only installing GitLens
  • All of these steps on a different computer, as well as on VS Code in the browser (github.com)

Ultimately, the only thing that has worked consistently is installing the last 11.x version and reloading VS Code.

I'm completely baffled because 12.x was working just fine until around March 11.

My best guess is this is related to the premium/subscription changeover, but like I said, it was working fine until a few days ago.

@eamodio
Copy link
Member

eamodio commented Mar 13, 2022

@claudiorivera are the logs you've posted the full set from initial start? Because from those logs, there doesn't seem to be a folder open (I don't even see GitLens attempting to find any repositories). The behavior you are seeing is expected if you don't have a folder with a repository open, but certainly not if you do.

Can you provide some more details as to what you are opening? Is it a local Git repo, or shared drive, remote, etc?

Sorry for the trouble and thanks for any more details you can provide.

@eamodio eamodio removed the inactive Issue has not had recent required feedback label Mar 13, 2022
@claudiorivera
Copy link

These are the steps I took originally:

  • I'm on my local machine
  • I created a new directory through the integrated VS Code terminal
  • cd'ed and ran git init
  • Ran code [directory], which opened the directory in VS Code
  • In my original GIFs, you can see the main branch is active (lower-left corner, sorry it's tiny)

More info:

  • I have since committed README.md (initial commit)
  • My git log output shows the one commit (as does my Git Graph output)
  • I changed GitLens layout from Source Control to GitLens Layout for clarity
  • I'm still on the latest 11.x, so this may not be related to 12.x premium/subscriptions as I had originally speculated.

As you can see, GitLens does not see the commit:
Screen Shot 2022-03-13 at 5 24 38 PM
I can, however, see all the GitLens options in the command palette, which is why I've stayed on 11.x:
Screen Shot 2022-03-13 at 5 29 01 PM
Again, if there's anything specific you'd like me to do, I'd love to help!

@BarRemisz
Copy link

I have the same issue as claudiorivera. For a workaround I had to downgrade to v12.0.1.
Are the "side bar views" part of subscription functionality?

@eamodio
Copy link
Member

eamodio commented Mar 14, 2022

@BarRemisz So 12.0.1 works, but 12.0.4 doesn't? No, only GitLens+ features (just Worktrees and Visual File History currently) require an account.

Can you please enable debug logging by running from GitLens: Enable Debug Logging from the Command Palette (F1 or ctrl/cmd+shift+p). This will enable logging to the GitLens and GitLens (Git) channel in the Output pane.

Once enabled, please reproduce the issue, and attach the log from both GitLens and GitLens (Git) channels.

Thank you!

eamodio added a commit that referenced this issue Mar 14, 2022
Avoids newer git flag on older git versions
Refs: #1832
@eamodio
Copy link
Member

eamodio commented Mar 14, 2022

@claudiorivera @BarRemisz I just published a new insiders version that might address the issues you are seeing here.

Can you try to see if the issue is still reproducible in the GitLens insiders edition?

You can install the GitLens insiders edition from here.

Please be sure to disable or uninstall the stable version of GitLens first.

@claudiorivera
Copy link

I uninstalled my previous 11.x GitLens and deleted the GitLens folder from ~/.vscode/extensions, created a new local Git repo, opened the local repo in VS Code, and installed GitLens Insiders Edition.

Same behavior: The GitLens tab (or GitLens menus in Source Control, depending on layout option) appears and disappears immediately.

In the Output pane, the GitLens logs show:

[2022-03-15 00:33:58.613] [    1] GitLens (Insiders) v2022.3.1414 activating in Visual Studio Code(1.65.2) on the desktop
[2022-03-15 00:33:58.614] [    2] SubscriptionService.changeSubscription — d={"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:32:06.235Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:32:06.235Z"}},"state":0}, e=true
[2022-03-15 00:33:58.615] [    2] SubscriptionService.changeSubscription completed • 0 ms
[2022-03-15 00:33:58.623] [    3] Container.registerGitProviders
[2022-03-15 00:33:58.625] [    4] GitProviderService.accessCore — j=undefined, z=undefined
[2022-03-15 00:33:58.625] [    5] SubscriptionService.ensureSession — d=false
[2022-03-15 00:33:58.625] [    6] SubscriptionService.getOrCreateSession — d=false
[2022-03-15 00:33:58.627] [    7] GitProviderService.register completed • 0 ms — j=git
[2022-03-15 00:33:58.627] [    8] GitProviderService.register completed • 0 ms — j=vsls
[2022-03-15 00:33:58.627] [    9] GitProviderService.register completed • 0 ms — j=github
[2022-03-15 00:33:58.627] [    a] GitProviderService.registrationComplete completed • 0 ms
[2022-03-15 00:33:58.627] [    3] Container.registerGitProviders completed • 3 ms
[2022-03-15 00:33:58.628] [    b] LineAnnotationController.resume
[2022-03-15 00:33:58.628] [    c] GitLineTracker.subscribe
[2022-03-15 00:33:58.628] [    c] GitLineTracker.subscribe Starting line tracker...
[2022-03-15 00:33:58.628] [    c] GitLineTracker.subscribe completed • 0 ms
[2022-03-15 00:33:58.628] [    b] LineAnnotationController.resume completed • 0 ms
[2022-03-15 00:33:58.628] [    d] LineAnnotationController.refresh
[2022-03-15 00:33:58.628] [    e] GitLineTracker.subscribe
[2022-03-15 00:33:58.628] [    e] GitLineTracker.subscribe completed • 0 ms
[2022-03-15 00:33:58.628] [    f] GitLineTracker.subscribe
[2022-03-15 00:33:58.628] [    f] GitLineTracker.subscribe completed • 0 ms
[2022-03-15 00:33:58.634] [    1] GitLens (Insiders) v2022.3.1414 activated, syncedVersion=2022.3.1414, localVersion=2022.3.1414, previousVersion=2022.3.1414, welcome=true • 21 ms
[2022-03-15 00:33:58.634] [    d] LineAnnotationController.refresh completed • 5 ms
[2022-03-15 00:33:58.690] [   10] SubscriptionAuthenticationProvider.getSessions — e=["gitlens"]
[2022-03-15 00:33:58.690] [   10] SubscriptionAuthenticationProvider.getSessions completed • Found 0 sessions • 0 ms
[2022-03-15 00:33:58.694] [   11] SubscriptionService.logout
[2022-03-15 00:33:58.694] [   12] SubscriptionAuthenticationProvider.abort
[2022-03-15 00:33:58.694] [   13] ServerConnection.abort
[2022-03-15 00:33:58.695] [   13] ServerConnection.abort completed • 0 ms
[2022-03-15 00:33:58.695] [   12] SubscriptionAuthenticationProvider.abort completed • 0 ms
[2022-03-15 00:33:58.695] [   14] SubscriptionService.changeSubscription — d={"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:33:58.695Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:33:58.695Z"}},"state":0}
[2022-03-15 00:33:58.695] [   15] GitProviderService.onSubscriptionChanged — j={"current":{"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:33:58.695Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:33:58.695Z"}},"state":0},"previous":{"plan":{"actual":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:32:06.235Z"},"effective":{"id":"free","name":"GitLens","startedOn":"2022-03-15T00:32:06.235Z"}},"state":0},"etag":1647304438695}
[2022-03-15 00:33:58.695] [   15] GitProviderService.onSubscriptionChanged completed • 0 ms
[2022-03-15 00:33:58.695] [   14] SubscriptionService.changeSubscription completed • 0 ms
[2022-03-15 00:33:58.695] [   16] GitProviderService.accessCore — j=undefined, z=undefined
[2022-03-15 00:33:58.696] [   11] SubscriptionService.logout completed • 1 ms
[2022-03-15 00:33:58.696] [    6] SubscriptionService.getOrCreateSession completed • 70 ms
[2022-03-15 00:33:58.696] [   16] GitProviderService.accessCore completed • 0 ms
[2022-03-15 00:33:58.696] [    5] SubscriptionService.ensureSession completed • 71 ms
[2022-03-15 00:33:58.696] [    4] GitProviderService.accessCore completed • 71 ms

I don't see a GitLens (Git) channel in the Output pane:
Screen Shot 2022-03-14 at 7 38 19 PM

On a whim, I installed VS Code Insiders and GitLens 12.0.4 worked just fine! 🎉

As another troubleshooting step, I turned on Settings Sync in VS Code Insiders and chose to sync my local VS Code Insiders from my remote VS Code stable settings data, and GitLens 12.0.4 continued to work!

However... VS Code Insiders notified me that various extensions (GitHub Repositories, GitHub Pull Requests, GitHub Copilot) were requesting GitHub authentication, and I was so excited about GitLens working that I wasn't thinking and just authenticated them back-to-back. Somewhere along the way, GitLens stopped working. 😢

I'll keep poking around and will try to find consistent steps to reproduce, but in the mean time, if you have any other ideas you'd like me to try (caches to clear, settings to change/check, etc.), let me know!

@eamodio
Copy link
Member

eamodio commented Mar 15, 2022

@claudiorivera this is very odd. In those logs I don't see GitLens even attempting to look for Git repositories. And there are only 2 cases which will stop that -- there isn't a folder open, or git.autoRepositoryDetection isn't set to true or subFolders. Do you have git.autoRepositoryDetection set in your settings?

eamodio added a commit that referenced this issue Mar 15, 2022
@claudiorivera
Copy link

A-ha!

You know, I've had that set to false for well over a year, and I don't ever recall it causing problems with GitLens. 🤷🏼‍♂️ And, of course, now it makes sense why GitLens was misbehaving on both my devices and in the web VS Code on GitHub.

I can confirm that setting it back to the default of true and restarting VS Code seems to have worked! 🎉

Thank you so much for troubleshooting this with me! I hope this works for the others in this thread!

@eamodio
Copy link
Member

eamodio commented Mar 15, 2022

Phew, that certainly explains it 😄 -- GitLens prior to v12 wasn't honoring that setting properly.

@BarRemisz does that explain what you are seeing too?

@BarRemisz
Copy link

Yes, the "git.autoRepositoryDetection" is the settings that helped.

@eamodio
Copy link
Member

eamodio commented Mar 17, 2022

Duplicate of #1909

@eamodio eamodio marked this as a duplicate of #1909 Mar 17, 2022
@eamodio eamodio closed this as completed Mar 17, 2022
@eamodio eamodio added duplicate and removed needs-more-info Needs further information, steps, details, etc. potential-bug labels Mar 17, 2022
eamodio added a commit that referenced this issue Mar 25, 2022
Avoids newer git flag on older git versions
Refs: #1832
eamodio added a commit that referenced this issue Mar 25, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants