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

Can't activate any GitLens UI #295

Closed
appinteractive opened this issue Feb 23, 2018 · 36 comments
Closed

Can't activate any GitLens UI #295

appinteractive opened this issue Feb 23, 2018 · 36 comments
Labels
needs-more-info Needs further information, steps, details, etc.

Comments

@appinteractive
Copy link

appinteractive commented Feb 23, 2018

  • GitLens Version: 8.0.2
  • VSCode Version: 1.20.1
  • OS Version: 10.12.6

Steps to Reproduce:

  1. Installed GitLens
  2. Opened Welcome Screen
    all activated but nothing shown in UI
  3. Restarted VSCode
    still nothing
  4. set following settings manually (still no UI Elements or any sign of GitLens beside the Welcome Screen)
    "gitlens.gitExplorer.enabled": true,
    "gitlens.statusBar.enabled": true,
    "gitlens.currentLine.enabled": true,
    "gitlens.hovers.annotations.enabled": true,
    "gitlens.codeLens.enabled": true

As a side note, I have a Case Sensitive File System

I even re-installed VSCode and disabled ALL Extensions, but still there is NO Sign of GitLens.

@eamodio
Copy link
Member

eamodio commented Feb 26, 2018

Hi, can you please enable output channel logging by setting "gitlens.outputLevel": "verbose" in your settings.json. This will enable logging to the GitLens channel in the Output pane. Once enabled, please attempt to reproduce the issue (if possible) and attach the relevant log lines from the GitLens channel.

@eamodio eamodio added the needs-more-info Needs further information, steps, details, etc. label Feb 26, 2018
@appinteractive
Copy link
Author

appinteractive commented Feb 26, 2018

Git found: 2.13.2 @ /usr/local/Cellar/git in 64 ms
Starting repository search in 1 folders
Searching for repositories (depth=1) in '/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt' ...
Running(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt): git rev-parse --show-toplevel
GitLens(v8.0.2) activated in 137 ms
Completed(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt): git rev-parse --show-toplevel in 33 ms
Running(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt): git rev-parse --show-toplevel
Completed(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt): git rev-parse --show-toplevel in 5 ms
Searching for repositories (depth=1) in '/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt' took 204 ms
Running(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt): git rev-parse --show-toplevel
Completed(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt): git rev-parse --show-toplevel in 7 ms
isTracked('/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/package.json', 'undefined', 'undefined')
Running(): git ls-files /Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/package.json
Completed(): git ls-files /Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/package.json in 6 ms
Running(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/server): git rev-parse --show-toplevel
Completed(/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/server): git rev-parse --show-toplevel in 7 ms
isTracked('/Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/server/index.js', 'undefined', 'undefined')
Running(): git ls-files /Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/server/index.js
Completed(): git ls-files /Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/server/index.js in 4 ms

grafik

grafik

by the way, updated git 2.13 to 2.16 bit didn't help

@eamodio
Copy link
Member

eamodio commented Feb 26, 2018

What folder are you opening in vscode? Does that folder have a repository in it? If so, is the repo at the root? Nested deeper than 1 level?

@appinteractive
Copy link
Author

@eamodio there is a valid repo without any nasting:
grafik

I had two remotes linked to that repo but this is not the issue as it does not work on any of my repos.

@eamodio
Copy link
Member

eamodio commented Feb 26, 2018

So which folder are you opening vscode to? /Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt?

And the repo is in /Users/Greg/Projekte/HumanConnection/hc-frontend-nuxt/stuff?

@appinteractive
Copy link
Author

@eamodio Wow I know what caused it, I had Git installed be Homebrew on OS X!
Could it be that you are expecting the git executable in a specific directory like /usr/local/bin/git.

Before it was /usr/local/Cellar/git

@eamodio
Copy link
Member

eamodio commented Feb 26, 2018

GitLens does search for the git executable (similar to what vscode does). You can also use the built-in vscode setting git.path to point to the correct git exe (FYI, GitLens also has its own gitlens.advanced.git but that should only be used if for some strange reason it has to be separate).

It seems very strange to me that vscode built-in git support would work, but GitLens wouldn't.

@appinteractive
Copy link
Author

appinteractive commented Feb 28, 2018 via email

@eamodio
Copy link
Member

eamodio commented Feb 28, 2018

Well that part isn't surprising -- from the first logs you posted, GitLens initialized fine, found git fine, and used git fine, but it failed to find any repositories. Which is not an uncommon scenario -- people open folders and files without repos all the time, so in that case GitLens just silently hides in the background until something changes (i.e. a repo shows up).

And I'm even more confused that changing the git path would have any affect on any of that (because the version of git it found wasn't that old -- if it was you would have seen a warning about it).

So the crux of the issue is why is GitLens not finding a repo in the folder you opened. That is why I was asking about what folder you are opening and exactly where the repo is inside that folder. By default GitLens only scans 2 levels -- the folder opened and 1 level down from there (it can be controlled with the gitlens.advanced.repositorySearchDepth setting -- the trade off being the deeper it goes the longer it takes). But GitLens should automatically "find" a repo, when you open a file from within a repo (assuming that is all within the folder you opened in vscode).

So can you confirm what folder you are opening, and where the repo is located?

@eamodio
Copy link
Member

eamodio commented Mar 7, 2018

@appinteractive any update on this?

@appinteractive
Copy link
Author

hey @eamodio I dod not did alter any git specific settings before and the .git folder is direclty in the root of the opened project folder. Also is there no git related stuff in any of the parend or child directories. It did checked it with several projects before.

It seams as if it was not setisfied with the given git version is found or did not even was aware of the git installation provided in the path variables.

Could it be that you rely somehow on the build in terminal / bash instead of the one that vscode is using? Because I am using iTerm with ZSH (which I also see in vscode) where the path was set, but the build in terminal may not have the variable as they use different profile files.

@dylankershaw
Copy link

dylankershaw commented Mar 23, 2018

I'm encountering a similar issue. I installed GitLens three weeks ago but it stopped functioning entirely after about a week and a half. I've tried enabling, disabling, and reinstalling it and every other extension to rule out any conflicts, but saw no change.

  • OSX 10.13.3
  • VSCode 1.20.1
  • GitLens 8.1.1
  • git 2.16.2

I enabled the verbose output setting, and see this output when opening any file:
Running(/Users/d.kershaw/repositories/mojo/app/controllers): git rev-parse --show-toplevel Completed(/Users/d.kershaw/repositories/mojo/app/controllers): git rev-parse --show-toplevel in 3 ms isTracked('/Users/d.kershaw/repositories/mojo/app/controllers/application_controller.rb', 'undefined', 'undefined') Running(): git ls-files /Users/d.kershaw/repositories/mojo/app/controllers/application_controller.rb Completed(): git ls-files /Users/d.kershaw/repositories/mojo/app/controllers/application_controller.rb in 3 ms

@Rakk4403
Copy link

Rakk4403 commented Apr 2, 2018

Me, neither.

  • OSX : 10.13.3
  • VSCode : 1.21.1
  • GitLens : 8.2.0
  • git : 2.14.3

logs:Gitlens

Running(/Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode): git rev-parse --show-toplevel
Completed(/Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode): git rev-parse --show-toplevel in 8 ms
isTracked('/Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode/settings.json', 'undefined', 'undefined')
Running(): git ls-files /Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode/settings.json
Completed(): git ls-files /Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode/settings.json in 5 ms
Running(/Users/RakkMac/Library/Application Support/Code/User): git rev-parse --show-toplevel
Completed(/Users/RakkMac/Library/Application Support/Code/User): git rev-parse --show-toplevel in 8 ms
isTracked('/Users/RakkMac/Library/Application Support/Code/User/settings.json', 'undefined', 'undefined')
Running(/Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode): git rev-parse --show-toplevel
Completed(/Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode): git rev-parse --show-toplevel in 5 ms
isTracked('/Users/RakkMac/Workspace/deep-learning-from-scratch/.vscode/settings.json', 'undefined', 'undefined')

Help me, plz!

@ninnemana
Copy link

ninnemana commented Apr 2, 2018

I was able to solve this issue on my machine by setting git.path in VSCode. I have git installed using Homebrew and once I set the git.path to /usr/local/Cellar/git/2.16.2/bin/git everything started working as expected.

  • OSX: 10.13.3
  • VSCode: 1.22.0-insider
  • GitLens: 8.2.0
  • git: 2.16.2

@Rakk4403
Copy link

Rakk4403 commented Apr 3, 2018

@ninnemana Thank you savior!

It's solved with setting git.path!

Actually, I have legacy git with newest one, like /usr/bin/git, /usr/local/git/bin/git. I just put git.path: "/usr/bin/git" on settings.json, then it worked!

Happy working day!

@eamodio
Copy link
Member

eamodio commented Apr 3, 2018

@ninnemana @Rakk4403 were git operations in vscode (not GitLens) also failing?

@dylankershaw
Copy link

@ninnemana worked for me as well!

@eamodio git operations were working fine for me before and after the fix.

@eamodio
Copy link
Member

eamodio commented Apr 6, 2018

@dylankershaw so using git from vscode worked fine, but GitLens failed?

@dylankershaw
Copy link

dylankershaw commented Apr 6, 2018 via email

@Rakk4403
Copy link

Rakk4403 commented Apr 7, 2018

@eamodio Yes, git operation was fine.

problems are,

  • non-displayed gitlens section on Explore tab.
  • gitlens: welcome, gitlens: open settings are the only commands on Command Pallete

@eamodio
Copy link
Member

eamodio commented Apr 11, 2018

Since #295 (comment) "fixed" the issue for all of you I'm going to close this. Please feel free to re-open if it comes back.

@halink0803
Copy link

@eamodio I got the same problem as @Rakk4403, change git.path does not solve the problem.

@halink0803
Copy link

I have no idea how this can happen. I try many ways, change git.path, I even uninstall everything, remove extensions in ~/.vscode/extensions, and install gitlens first but it does not work. Moreover, there is no message about any error or something :( I just love gitlens and now I don't know what to do more to make it works :(

@voppe
Copy link

voppe commented Jun 7, 2018

I had the same problem, removing a missing folder from my workspace solved it.

@eamodio
Copy link
Member

eamodio commented Jun 7, 2018

What do you mean by removing a missing folder? Could there have been permission issues on that folder?

@voppe
Copy link

voppe commented Jun 7, 2018

I set in my *.code-workspace file a folder that did not exist (because I deleted it). GitLens' UI did not appear until I removed the setting relative to that folder from the workspace, after which it worked normally.

@eamodio
Copy link
Member

eamodio commented Jun 7, 2018

@voppe THANK YOU! That info helped me discover a lurking problem with how GitLens searches for repos. Any missing folder, invalid permissions on a folder, or any other error during that search, GitLens dies. This will be fixed ASAP.

Thanks again!

@jeffberry
Copy link

jeffberry commented Jul 17, 2018

Hi @eamodio,

I'm getting the same issue where GitLens is nowhere to be found, but my log is a bit different:

Git found: 2.17.1 @ /usr/local/bin/git in 82 ms
Starting repository search in 5 folders
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/butterfly' ...
Running(/Users/jeff/Development/SDVI/dev/src/butterfly): git rev-parse --show-toplevel
GitLens(v8.5.0) activated in 717 ms
Completed(/Users/jeff/Development/SDVI/dev/src/butterfly): git rev-parse --show-toplevel Completed in 782 ms
Repository found in '/Users/jeff/Development/SDVI/dev/src/butterfly'
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/butterfly' took 1736 ms
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/firefly' ...
Running(/Users/jeff/Development/SDVI/dev/src/firefly): git rev-parse --show-toplevel
Completed(/Users/jeff/Development/SDVI/dev/src/firefly): git rev-parse --show-toplevel Completed in 98 ms
Repository found in '/Users/jeff/Development/SDVI/dev/src/firefly'
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/firefly' took 297 ms
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/peacock' ...
Running(/Users/jeff/Development/SDVI/dev/src/peacock): git rev-parse --show-toplevel
Completed(/Users/jeff/Development/SDVI/dev/src/peacock): git rev-parse --show-toplevel Completed in 132 ms
Repository found in '/Users/jeff/Development/SDVI/dev/src/peacock'
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/peacock' took 344 ms
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/monkey' ...
Running(/Users/jeff/Development/SDVI/dev/src/monkey): git rev-parse --show-toplevel
Completed(/Users/jeff/Development/SDVI/dev/src/monkey): git rev-parse --show-toplevel Completed in 14 ms
Repository found in '/Users/jeff/Development/SDVI/dev/src/monkey'
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/monkey' took 24 ms
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/cli' ...
Running(/Users/jeff/Development/SDVI/dev/src/cli): git rev-parse --show-toplevel
Completed(/Users/jeff/Development/SDVI/dev/src/cli): git rev-parse --show-toplevel Completed in 7 ms
Repository found in '/Users/jeff/Development/SDVI/dev/src/cli'
Searching for repositories (depth=1) in '/Users/jeff/Development/SDVI/dev/src/cli' took 10 ms
getRemotesCore('/Users/jeff/Development/SDVI/dev/src/butterfly')
Running(/Users/jeff/Development/SDVI/dev/src/butterfly): git remote -v
Completed(/Users/jeff/Development/SDVI/dev/src/butterfly): git remote -v Completed in 18 ms
Running(/Users/jeff/Library/Application Support/Code - Insiders/User): git rev-parse --show-toplevel
FAILED(/Users/jeff/Library/Application Support/Code - Insiders/User): git rev-parse --show-toplevel FAILED in 7 ms
isTracked('/Users/jeff/Library/Application Support/Code - Insiders/User/settings.json', 'undefined')
Running(): git ls-files /Users/jeff/Library/Application Support/Code - Insiders/User/settings.json
FAILED(): git ls-files /Users/jeff/Library/Application Support/Code - Insiders/User/settings.json FAILED in 8 ms
isTracked('/Users/jeff/Library/Application Support/Code - Insiders/User/settings.json', 'undefined') = false

Any ideas? It looks like it's failing to run git rev-parse on my Code - Insiders/User folder, which I can confirm is not a git repository. I looked in my workspace file to see if I had any invalid directories listed in there like others have mentioned here, but I couldn't find any.

@eamodio
Copy link
Member

eamodio commented Jul 18, 2018

@jeffberry Those errors are normal/expected -- my guess is you have the settings.json file open, so GitLens tries to check the path of open files for repositories to provide features, but if there isn't one that is fine.

Are you opening a multi-root workspace with many folders? What is the behavior you are seeing (or not seeing)?

@jeffberry
Copy link

@eamodio Ah, that makes sense for those errors, you're correct in that it only triggers those when settings are open.

Yes, I have a workspace open that has 5 folders added to it, each of which is a git repository. GitLens has worked great for me up until about a week or two ago, and now I just don't see it anywhere; I don't get an icon in the side panel, nor do I have a "GitLens" portion on the SCM panel anymore. The only thing I can really see or access is the "Welcome" panel, even running "Toggle Git Code Lens" doesn't appear to do anything.

@eamodio eamodio reopened this Jul 18, 2018
@eamodio
Copy link
Member

eamodio commented Jul 18, 2018

@jeffberry Do you see any errors in the console if you open up the developer tools? Can you provide a full trace of startup?

@jeffberry
Copy link

@eamodio I dug through the console and found a few errors, but they were related to an icon plugin I have installed. I uninstalled that plugin and the errors went away. While I was looking at the logs, I ended up noticing that I was in Zen mode, and the Gitlens icon does not appear in Zen mode. Disabling Zen mode got GitLens working again and I'm back in action.

Thanks for the quick help, and thanks for the great plugin!

@eamodio
Copy link
Member

eamodio commented Jul 18, 2018

Ah, awesome. Glad it is sorted. Now that you can have GitLens explorers in their own activity bar icon now, I probably should stop hiding them in Zen mode (at least only hide explorers that aren't in the GitLens view).

Thanks!

@steelx
Copy link

steelx commented Aug 1, 2018

works on OSx, but doesnt work on Windows 7 for me :(

@eamodio
Copy link
Member

eamodio commented Aug 1, 2018

@steelx can you open a new issue for that with more details and ideally logs? The issue template walks through turning on logging.

@github-actions
Copy link

github-actions bot commented Dec 5, 2020

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 Dec 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-more-info Needs further information, steps, details, etc.
Projects
None yet
Development

No branches or pull requests

9 participants