"Pull Requests" and "Issues" have been showing "loading..." for hours
- VS Code Version: 1.54.2
- OS Version: 10.0.19042 Build 19042
Steps to Reproduce:
- Install GitHub Pull Requests and Issues in VSCode
- Authorize with Github
- Go to the Github Section with the tab on the left side
- Pull Requests and Issues have been showing "loading..." for hours
Does this issue occur when all extensions are disabled?: No
@labo28 Can you open the developer tools by running the command "Developer: Toggle Developer Tools" and check for any errors in the console? It sounds like the extension is not activating
I have the same issue and see the 2 warnings and 2 errors below in the Developer console:
workbench.desktop.main.js:62 [Extension Host] rejected promise not handled within 1 second: Error: Git model not found v @ workbench.desktop.main.js:62
workbench.desktop.main.js:62 [Extension Host] stack trace: Error: Git model not found at a.getAPI (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\main.js:54:45368) at new Da (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1008:18628) at Function.createProvider (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1008:19195) at Dp (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1008:25145) at Eg (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1020:23211) at processTicksAndRejections (internal/process/task_queues.js:97:5) v @ workbench.desktop.main.js:62
workbench.desktop.main.js:2084 [[object Object]]Git model not found $onExtensionRuntimeError @ workbench.desktop.main.js:2084
workbench.desktop.main.js:2084 Error: Git model not found at a.getAPI (c:\Users\User\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\git\dist\main.js:54:45368) at new Da (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1008:18628) at Function.createProvider (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1008:19195) at Dp (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1008:25145) at Eg (c:\Users\User.vscode\extensions\github.vscode-pull-request-github-0.24.0\dist\extension.js:1020:23211) at processTicksAndRejections (internal/process/task_queues.js:97:5) $onExtensionRuntimeError @ workbench.desktop.main.js:2084
I have been observing the same problem for 2 days :eyes:
screen

I have the same issue. Logs are mostly the same as for @saitozturk

I just noticed its working in another repo with a different set of extensions activated. After testing this I have verified it has to do with the sonarsource.sonarlint-vscode extension. When the extension is enabled Github Pull Request Extension doesn't load with above error. If I deactivate sonarlint it works without problems.
Is this caused by SonarLint or Github PR? Should I open an issue with SonarLint as well?
Same error to me
I uninstalled and installed it again. The section tloaded. However, it was unable to check out to a PR branch>

UPDATE
Apparently the fetch field in "origin" section in .git/config file was wrongly set. It should look like:
✅✅
[remote "origin"]
url = https://github.com/[user]/[project].git
fetch = +refs/heads/*:refs/remotes/origin/*
Previously I had:
❌❌
[remote "origin"]
url = https://github.com/[user]/[project].git
fetch = +refs/heads/master:refs/remotes/origin/master
the fix proposed by @lucasrodes does not work for me unfortunately... Also disabling other Extensions above seems to have been a race condition... Its now back to not working at all.
Any solutions. I got the same problem. Endless loading......
I might have found the root cause for this. The Extensions depends on the vscode.git extension but it never declares that anywhere. And therefore sometimes fails if the Git extensions is not loaded in time. This also explains my race condition above that removing extension "fixed" it. This changed the startup order enough to have vscode.git ready before the github extension loaded.
Based on the Extension Docs I added following snippet to the package.json of the extension in my local .vscode/extensions folder
{
// ....
"extensionDependencies": [
"vscode.git"
],
// ....
}
This seems to have fixed the issue for me... will keep on testing. Can anybody confirm this?
Also happy to do a PR for this. (shouldn't be too hard adding all of 3 lines 😄 )
It looks like there are two separate issues here:
- If Git is not installed, the git extension throws an error when we try to access the API and we don't gracefully handle this
- The git extension is not activating at some times
Adding the vscode.git extension as an extension dependency doesn't actually make VS Code try to activate it before this extension, I think we need to make an explicit call to activate
Is there a way to fix this issue as Im encountering it?
In case this helps anyone else, for me the following fixed this issue.
- Quit vscode
rm -rf ~/.vscode/extensions/github.vscode-pull-request-github-*- Start vscode
- Reinstall the extension, and reauth to GitHub in browser
Hello, I am suffering from this situation and I do not see any error. How can I debug this?
Hello, I am suffering from this situation and I do not see any error. How can I debug this?
I was having the same issue and after much digging I was able to find the problem. What did you name your remote repo in vscode? Run the following command in the terminal in the same location as the git folder:
git remote -v
You should see the name on the left hand side. If it is not named origin/upstream the extension will not work. Looking at the extension settings, you can see that is what it is looking for:

To fix the issue, you have to add origin
git remote add origin https://github.com/<account>/<repo>
Alternatively, in the extension settings, you can add the name of your remote so that it knows to also look for the remote repo that came up when the above command was sent.
I don't know why @milunova's comment is marked as outdated, but this fixed it for me. I had named my new remote "github" and not "origin", and then this happened without me thinking about it. I just added github to the list of PR: Remotes and it worked straight away.
Is there someone who fixed this problem? pls help me.
As I mentioned, the below reply worked for me.
Hello, I am suffering from this situation and I do not see any error. How can I debug this?
I was having the same issue and after much digging I was able to find the problem. What did you name your remote repo in vscode? Run the following command in the terminal in the same location as the git folder:
git remote -vYou should see the name on the left hand side. If it is not named origin/upstream the extension will not work. Looking at the extension settings, you can see that is what it is looking for:
To fix the issue, you have to add origin
git remote add origin https://github.com/<account>/<repo>Alternatively, in the extension settings, you can add the name of your remote so that it knows to also look for the remote repo that came up when the above command was sent.
hy ...I am facing same issue , please help
@abdulmoizniazi did you try looking at the solutions?
I'm having this issue too but none of the solutions have worked. I'm on SSO enterprise