Vscode-pull-request-github: GitHub Enterprise: TypeError: Cannot read property 'map' of undefined

Created on 12 Oct 2018  路  13Comments  路  Source: microsoft/vscode-pull-request-github

  • Extension version: 0.2.0
  • VSCode Version: 1.28.1 (3368db6750222d319c851f6d90eb619d886e08f5)
  • OS: macOS 10.12.6

Steps to Reproduce:

  1. Add github.hosts entry to workspace config
  2. Open Source Control panel in VSCode
  3. Expand GitHub Pull Requests pane
  4. Expand any items in tree

Result: Fetching all pull requests failed: TypeError: Cannot read property 'map' of undefined

Output from extension shows:

Looking for git repository
Git repository found, initializing review manager and pr tree view.
No GitHub remotes found
Found GitHub remote
Review> no matching pull request metadata found for current branch feature/xxxxxxxxxxxxxxxx
GitHubRepository> Fetching all pull requests failed: TypeError: Cannot read property 'map' of undefined
GitHubRepository> Fetching all pull requests failed: TypeError: Cannot read property 'map' of undefined

Workspace settings:

    "github.hosts": [
        {
            "host": "https://git.company-name.com",
            "username": "justin-unterreiner",
            "token": "xxxxxxxxxxxxxxxxxxxx"
        }
    ]

Additional information:

  • Our GitHub instance _does not_ use a self-signed certificate, it is a valid certificate signed by GoDaddy.
  • I am able to use the GitLense VSCode extension with our enterprise GitHub instance by setting gitlens.remotes in the workspace settings
GitHubEnterprise

Most helpful comment

Glad I'm not the only one. GitHub Enterprise with VSCode seems to be a general pain. :-/

All 13 comments

I also have this issue.

+1

I also have this issue

Glad I'm not the only one. GitHub Enterprise with VSCode seems to be a general pain. :-/

Any update or progress on this issue?

This is still an issue, any update or workaround?

So I'm catching up with old issues and inspecting this one. I wanted to call out something in the original issue report that threw me for a bit.

The configuration style that was present in 0.2.x versions of the application was changed in 0.3.x and has not changed since. So the workplace setting github.hosts is no longer a valid way of configuring VSCode to work with GitHub Enterprise.

We are not yet sure why, but we are working on it. #1127 is going to add some logging to identify the scenario with a warning and stub data to prevent a full crash.

I've looked into mine and figured out that the authentication is no longer an issue as I'm running 0.6.0.
However, I've got a few other issues:

  1. I got Cannot read property map of undefined error when I open the description of the PR
  2. I can't see the PR comments in any of the PR files
  3. If I have multiple folders added to the workplace, Github pull request works with only one repo in the workspace and I'm not quite sure if there is any way to let Github pull request switch between repos in the workspace 馃し鈥嶁檪

The Github Enterprise version I'm testing against is v2.11

The GHE version we are using was updated to 2.14 and this resolved the issues I was experiencing.

After #1127 is merged in, the actual exception seen in this bug report will no longer appear. We will be logging that the scenario occurred, but we will need to work a bit harder to figure out why people aren't getting data.

@abathingchris I'm happy to hear upgrading GitHub Enterprise fixes the issue. At the moment that is the minimum version of GitHub Enterprise we are trying to get working. Do you know what version you were on before?

@EslamElHusseiny I'm glad you were able to get past the authentication issues. But now the major issue is the version of GitHub Enterprise you are using is outside of the support window. We are trying to make the GitHub Enterprise support better, but I'm not sure if we are going to be able to make things work that far back.

@StanleyGoldman Still seeing this exception.
Specifically, this error message:

Cannot read property 'map' of undefined

Environment:

  • OS: Mac OS 10.13.6
  • VS Code: 1.34.0
  • GitHub Pull Requests: 1.34.0

Happening on enterprise Github

We have discontinued support for GitHub Enterprise. https://github.com/microsoft/vscode-pull-request-github/wiki#2-is-github-enterprise-supported

Was this page helpful?
0 / 5 - 0 ratings

Related issues

radu-matei picture radu-matei  路  3Comments

dbaeumer picture dbaeumer  路  4Comments

sbatten picture sbatten  路  4Comments

paulirish picture paulirish  路  3Comments

Tyriar picture Tyriar  路  4Comments