Vscode-pull-request-github: The GitHub Pull Request treeview never appears

Created on 10 Sep 2018  路  3Comments  路  Source: microsoft/vscode-pull-request-github

Tried the extension from the marketplace and also building from source, but can't manage to get a treeview. No obvious errors I can spot, either.

Debugging it a bit, the extension does run all its startup methods:

https://github.com/Microsoft/vscode-pull-request-github/blob/44acd59147fb248577138b8ef3ee94eb6a5467d0/src/extension.ts#L45-L65

But despite that, no treeview is shown. Using insiders on everything, though I did try stable channel earlier to no avail.

only error in the logs i find is probably unrelated:

Unhandled error in debug adapter - Unhandled promise rejection: TypeError: Cannot read property 'line' of null
    at NodeDebugAdapter.<anonymous> (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/ms-vscode.node-debug2/node_modules/vscode-chrome-debug-core/out/src/chrome/chromeDebugAdapter.js:772:62)

my git output:
image

and gh pr ext output:
image


is there any other debug info i can provide?

Most helpful comment

Ah I see what's going on.

These two lines should be filtering down the github remotes:
https://github.com/Microsoft/vscode-pull-request-github/blob/5240b020c75f1e566e7e4a7aea6d67cc6412df65/src/github/pullRequestManager.ts#L59-L60

However in my case the Promise.all() here rejects. And this is an uncaught rejection. ;) As a result, this just hangs indefinitely and never makes it past this line. Nor does it error.

馃槩

image

Here's that error message:

TypeError: Cannot read property 'authority' of null
    at GitHubManager.<anonymous> (/Users/me/code/temp/vscode-pull-request-github/media/file:/Users/me/code/temp/vscode-pull-request-github/src/authentication/githubServer.ts:98:29)
    at Generator.next (<anonymous>)
    at a../src/authentication/githubServer.ts.__awaiter (/Users/me/code/temp/vscode-pull-request-github/media/extension.js:28900:71)
    at new Promise (<anonymous>)
    at a../src/authentication/githubServer.ts.__awaiter (/Users/me/code/temp/vscode-pull-request-github/media/extension.js:28896:12)
    at GitHubManager.isGitHub (/Users/me/code/temp/vscode-pull-request-github/media/extension.js:28965:16)
    at potentialRemotes.map.remote (eval at <anonymous> (/Users/me/code/temp/vscode-pull-request-github/media/file:/Users/me/code/temp/vscode-pull-request-github/src/github/pullRequestManager.ts:59:23), <anonymous>:1:56)
    at Array.map (<anonymous>)
    at eval (eval at <anonymous> (/Users/me...

That's pointing to https://github.com/Microsoft/vscode-pull-request-github/blob/5240b020c75f1e566e7e4a7aea6d67cc6412df65/src/authentication/githubServer.ts#L98

and host is null i guess because normalizeUri() can't correctly handle a URI such as git://github.com/GoogleChrome/lighthouse.git

(I have 27 remotes on this repo FWIW. :) Most are in this git:// form because of either my .gitconfig or my use of hub)

All 3 comments

@paulirish Thanks for reporting this.

The package.json specifies the condition for when this view gets shown -
"config.git.enabled && github:hasGitHubRemotes && workspaceFolderCount != 0"
https://github.com/Microsoft/vscode-pull-request-github/blob/master/package.json#L68

Does the repository you have open have a remote that points to GitHub?

Ah I see what's going on.

These two lines should be filtering down the github remotes:
https://github.com/Microsoft/vscode-pull-request-github/blob/5240b020c75f1e566e7e4a7aea6d67cc6412df65/src/github/pullRequestManager.ts#L59-L60

However in my case the Promise.all() here rejects. And this is an uncaught rejection. ;) As a result, this just hangs indefinitely and never makes it past this line. Nor does it error.

馃槩

image

Here's that error message:

TypeError: Cannot read property 'authority' of null
    at GitHubManager.<anonymous> (/Users/me/code/temp/vscode-pull-request-github/media/file:/Users/me/code/temp/vscode-pull-request-github/src/authentication/githubServer.ts:98:29)
    at Generator.next (<anonymous>)
    at a../src/authentication/githubServer.ts.__awaiter (/Users/me/code/temp/vscode-pull-request-github/media/extension.js:28900:71)
    at new Promise (<anonymous>)
    at a../src/authentication/githubServer.ts.__awaiter (/Users/me/code/temp/vscode-pull-request-github/media/extension.js:28896:12)
    at GitHubManager.isGitHub (/Users/me/code/temp/vscode-pull-request-github/media/extension.js:28965:16)
    at potentialRemotes.map.remote (eval at <anonymous> (/Users/me/code/temp/vscode-pull-request-github/media/file:/Users/me/code/temp/vscode-pull-request-github/src/github/pullRequestManager.ts:59:23), <anonymous>:1:56)
    at Array.map (<anonymous>)
    at eval (eval at <anonymous> (/Users/me...

That's pointing to https://github.com/Microsoft/vscode-pull-request-github/blob/5240b020c75f1e566e7e4a7aea6d67cc6412df65/src/authentication/githubServer.ts#L98

and host is null i guess because normalizeUri() can't correctly handle a URI such as git://github.com/GoogleChrome/lighthouse.git

(I have 27 remotes on this repo FWIW. :) Most are in this git:// form because of either my .gitconfig or my use of hub)

Nice fix, thank you!

works well.

BTW I do get hit with a Rate Limit error, but once i cleaned up my many remotes, dropping 27 to 2, it started playing nice again. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbatten picture sbatten  路  4Comments

jrieken picture jrieken  路  3Comments

kieferrm picture kieferrm  路  4Comments

scrossan-crown picture scrossan-crown  路  4Comments

RamonMeffert picture RamonMeffert  路  3Comments