Skip to content

GitHub Enterprise: TypeError: Cannot read property 'map' of undefined #574

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

Closed
Justin-Credible opened this issue Oct 12, 2018 · 13 comments
Closed

Comments

@Justin-Credible
Copy link

  • 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
@rebornix
Copy link
Member

@im-philbrant
Copy link

I also have this issue.

@EslamElHusseiny
Copy link

+1

@rconnamacher
Copy link

I also have this issue

@thetaylormcrae
Copy link

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

@grork
Copy link

grork commented Dec 20, 2018

Any update or progress on this issue?

@StanleyGoldman StanleyGoldman self-assigned this Mar 11, 2019
@malshash
Copy link

malshash commented Apr 5, 2019

This is still an issue, any update or workaround?

@StanleyGoldman
Copy link
Contributor

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.

@EslamElHusseiny
Copy link

EslamElHusseiny commented Apr 27, 2019

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

@malshash
Copy link

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

@StanleyGoldman
Copy link
Contributor

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.

@amriteya
Copy link

amriteya commented Jun 3, 2019

@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

@RMacfarlane
Copy link
Contributor

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

No branches or pull requests