Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Null reference exception after opening any pull request #2117

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

Null reference exception after opening any pull request #2117

MilosAuder opened this issue Dec 11, 2018 · 5 comments

Comments

@MilosAuder
Copy link

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
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
Copy link
Author

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

@grokys
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
Copy link
Contributor

grokys commented Dec 12, 2018

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

@MilosAuder
Copy link
Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants