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

The GitHub Pull Request treeview never appears #395

Closed
paulirish opened this issue Sep 10, 2018 · 3 comments
Closed

The GitHub Pull Request treeview never appears #395

paulirish opened this issue Sep 10, 2018 · 3 comments
Assignees

Comments

@paulirish
Copy link

paulirish commented Sep 10, 2018

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?

@RMacfarlane
Copy link
Contributor

@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?

@paulirish
Copy link
Author

paulirish commented Sep 10, 2018

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)

@RMacfarlane RMacfarlane self-assigned this Sep 10, 2018
@paulirish
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants