Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47848

Github PR builds produce NullPointerException

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I get the following error with version GitHub API 1.89 and 1.90 and PRs aren't build. Had to downgrade to 1.86 to get it working again.

      Unable to handle PR# 12984 for repo: xbmc/xbmc
      java.lang.NullPointerException
      	at org.kohsuke.github.GHPerson.populate(GHPerson.java:44)
      	at org.kohsuke.github.GHPerson.getName(GHPerson.java:184)
      	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.updatePR(GhprbPullRequest.java:271)
      	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:161)
      	at org.jenkinsci.plugins.ghprb.GhprbRepository.onPullRequestHook(GhprbRepository.java:382)
      	at org.jenkinsci.plugins.ghprb.GhprbTrigger.handlePR(GhprbTrigger.java:676)
      	at org.jenkinsci.plugins.ghprb.GhprbRootAction$2.run(GhprbRootAction.java:252)

        Attachments

          Activity

          Hide
          kipras Kipras Mancevicius added a comment - - edited

          I am experiencing the same issue. After restarting jenkins it goes away for a little while, then starts happening again. Very frustrating as builds just don't start.

          At first i thought it may have something to do with the author of the PR (looking at the stack trace), but it sometimes happens for pull requests created by a user for which previous builds worked just fine.

          EDIT: my stack trace is a little bit different:

          java.lang.NullPointerException
          	at org.kohsuke.github.GHPerson.populate(GHPerson.java:44)
          	at org.kohsuke.github.GHPerson.getEmail(GHPerson.java:231)
          	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.getAuthorEmail(GhprbPullRequest.java:791)
          	at org.jenkinsci.plugins.ghprb.GhprbBuilds.build(GhprbBuilds.java:59)
          	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.build(GhprbPullRequest.java:481)
          	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:474)
          	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:246)
          	at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:342)
          	at org.jenkinsci.plugins.ghprb.GhprbTrigger.handleComment(GhprbTrigger.java:668)
          	at org.jenkinsci.plugins.ghprb.GhprbRootAction$1.run(GhprbRootAction.java:233)
          

          And thing is - once this starts happening for a PR - it does not go away, you have to restart Jenkins to temporarily fix it.

          Show
          kipras Kipras Mancevicius added a comment - - edited I am experiencing the same issue. After restarting jenkins it goes away for a little while, then starts happening again. Very frustrating as builds just don't start. At first i thought it may have something to do with the author of the PR (looking at the stack trace), but it sometimes happens for pull requests created by a user for which previous builds worked just fine. EDIT: my stack trace is a little bit different: java.lang.NullPointerException at org.kohsuke.github.GHPerson.populate(GHPerson.java:44) at org.kohsuke.github.GHPerson.getEmail(GHPerson.java:231) at org.jenkinsci.plugins.ghprb.GhprbPullRequest.getAuthorEmail(GhprbPullRequest.java:791) at org.jenkinsci.plugins.ghprb.GhprbBuilds.build(GhprbBuilds.java:59) at org.jenkinsci.plugins.ghprb.GhprbPullRequest.build(GhprbPullRequest.java:481) at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:474) at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:246) at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:342) at org.jenkinsci.plugins.ghprb.GhprbTrigger.handleComment(GhprbTrigger.java:668) at org.jenkinsci.plugins.ghprb.GhprbRootAction$1.run(GhprbRootAction.java:233) And thing is - once this starts happening for a PR - it does not go away, you have to restart Jenkins to temporarily fix it.
          Hide
          rechi Lukas Rechberger added a comment -

          https://github.com/kohsuke/github-api/pull/396 fixed it for me.
          At https://github.com/kohsuke/github-api/issues/395 you can download a version of the plugin which includes my fix.

          Show
          rechi Lukas Rechberger added a comment - https://github.com/kohsuke/github-api/pull/396 fixed it for me. At https://github.com/kohsuke/github-api/issues/395 you can download a version of the plugin which includes my fix.
          Hide
          kipras Kipras Mancevicius added a comment -

          Thanks, i'll try it.

          Show
          kipras Kipras Mancevicius added a comment - Thanks, i'll try it.
          Hide
          kipras Kipras Mancevicius added a comment -

          Thank you Lukas Rechberger, looks like the updated version solved the issue

          Show
          kipras Kipras Mancevicius added a comment - Thank you Lukas Rechberger , looks like the updated version solved the issue
          Show
          rechi Lukas Rechberger added a comment - Fixed at https://github.com/kohsuke/github-api/pull/396

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rechi Lukas Rechberger
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: