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

Null reference exception after opening any pull request #2117

Closed
MilosAuder opened this Issue Dec 11, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@MilosAuder
Copy link

MilosAuder commented Dec 11, 2018

Versions

  • GitHub Extension for Visual Studio version: 2.6.0.6187
  • Visual Studio version: VS Professional 2017, Version 15.9.3

What happened

When I try to open any PR I get null reference exception. This started happening only after update to new GitHub extension version. This happens also to my colleagues that updated to new version, we all work on the same repository. After reverting to older version 2.5.2.2500 it works again.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to GitHub tab
  2. Double-click on any pull request
  3. See error

Expected behavior

Pull request is open.

Screenshots

github_nullreference

Logs

GIST

Stack trace leading to exception is clearly visible in attached extension.log

@grokys

This comment has been minimized.

Copy link
Contributor

grokys commented Dec 11, 2018

Hi @MilosAuder, thanks for getting in touch. Is this happening on GitHub.com or an enterprise instance?

@MilosAuder

This comment has been minimized.

Copy link

MilosAuder commented Dec 11, 2018

Hello, this is our company's repository, so it's enterprise instance.

@grokys

This comment has been minimized.

Copy link
Contributor

grokys commented Dec 11, 2018

Thanks for the info. I've been able to reproduce this here. Looks like the following GraphQL query:

query ($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      commits(last: 1) {
        nodes {
          statuses: commit {
            status {
              contexts {
                state
                context
                targetUrl
                description
              }
            }
          }
        }
      }
    }
  }
}

When run on enterprise returns:

{
  "data": {
    "repository": {
      "pullRequest": {
        "commits": {
          "nodes": [
            {
              "statuses": {
                "status": null
              }
            }
          ]
        }
      }
    }
  }
}

i.e. the status is null, and we're not handling this.

@StanleyGoldman ☝️

@grokys

This comment has been minimized.

Copy link
Contributor

grokys commented Dec 12, 2018

Hi @MilosAuder - we've just pushed a new release that should fix this!

@MilosAuder

This comment has been minimized.

Copy link

MilosAuder commented Dec 13, 2018

Hi @MilosAuder - we've just pushed a new release that should fix this!

It works! Thanks again for quick fix.

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