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

NPE on build PR head revision

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      On building a head revision of a GitHub PR, I am getting the following NPE.
      It does not seem to fail on every PR. Due to the code, this occurrs just in case of GitHub repo is null. Any idea under which circumstances this might happen?

      Build log:

      Started by user XXXX
      10:34:23 Connecting to https://api.github.com using xxxxx/****** (GitHub Account)
      
      GitHub has been notified of this commit’s build result
      
      java.lang.NullPointerException
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:106)
      	at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.content(GitHubSCMFile.java:176)
      	at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            maybee Malte Brunnlieb created issue -
            maybee Malte Brunnlieb made changes -
            Field Original Value New Value
            Description On building a head revision of a GitHub PR, I am getting the following NPE.
            It does not seem to fail on every PR. Due to the [code|https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.2.3/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFile.java#L106], this occurrs just in case of GitHub repo is null. Any idea under which circumstances this might happen?

            Stacktrace:
            {code:java}
            java.lang.NullPointerException
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:106)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.content(GitHubSCMFile.java:176)
            at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:405)
            Finished: FAILURE
            {code}
            On building a head revision of a GitHub PR, I am getting the following NPE.
            It does not seem to fail on every PR. Due to the [code|https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.2.3/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFile.java#L106], this occurrs just in case of GitHub repo is null. Any idea under which circumstances this might happen?

            Stacktrace:
            {code:java}
            Started by user XXXX
            10:34:23 Connecting to https://api.github.com using xxxxx/****** (GitHub Account)

            GitHub has been notified of this commit’s build result

            java.lang.NullPointerException
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:106)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.content(GitHubSCMFile.java:176)
            at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:405)
            Finished: FAILURE
            {code}
            maybee Malte Brunnlieb made changes -
            Description On building a head revision of a GitHub PR, I am getting the following NPE.
            It does not seem to fail on every PR. Due to the [code|https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.2.3/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFile.java#L106], this occurrs just in case of GitHub repo is null. Any idea under which circumstances this might happen?

            Stacktrace:
            {code:java}
            Started by user XXXX
            10:34:23 Connecting to https://api.github.com using xxxxx/****** (GitHub Account)

            GitHub has been notified of this commit’s build result

            java.lang.NullPointerException
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:106)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.content(GitHubSCMFile.java:176)
            at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:405)
            Finished: FAILURE
            {code}
            On building a head revision of a GitHub PR, I am getting the following NPE.
            It does not seem to fail on every PR. Due to the [code|https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.2.3/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMFile.java#L106], this occurrs just in case of GitHub repo is null. Any idea under which circumstances this might happen?

            Build log:
            {code:java}
            Started by user XXXX
            10:34:23 Connecting to https://api.github.com using xxxxx/****** (GitHub Account)

            GitHub has been notified of this commit’s build result

            java.lang.NullPointerException
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.metadata(GitHubSCMFile.java:106)
            at org.jenkinsci.plugins.github_branch_source.GitHubSCMFile.content(GitHubSCMFile.java:176)
            at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338)
            at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104)
            at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:263)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:405)
            Finished: FAILURE
            {code}
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "PR#157 (Web Link)" [ 17602 ]
            stephenconnolly Stephen Connolly made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            stephenconnolly Stephen Connolly made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            stephenconnolly Stephen Connolly made changes -
            Link This issue relates to JENKINS-43080 [ JENKINS-43080 ]
            jamesdumay James Dumay made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Assignee Stephen Connolly [ stephenconnolly ]
            Resolution Fixed [ 1 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "Page (Jenkins Wiki)" [ 17912 ]

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                maybee Malte Brunnlieb
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: