jenkinsci / jenkinsci/workflow-cps-plugin
[JENKINS-76224] NullPointerException when triggering a build
- Dominant language
- Java
- Stars
- 186
- Forks
- 213
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 8
Description
When triggering a build, the build immediately fails with the following exception:
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:233)
at PluginClassLoader for scm-api//jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:213)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:120)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:72)
at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:317)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:460)
Finished: FAILURE
There needs to either be success, or there is an error here that isn't being handled.
---
Originally reported by minfrin, imported from: NullPointerException when triggering a build
Raw content of original issue
When triggering a build, the build immediately fails with the following exception:
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:233)
at PluginClassLoader for scm-api//jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:213)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:120)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:72)
at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:317)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:460)
Finished: FAILUREThere needs to either be success, or there is an error here that isn't being handled.
environment
```
jenkins-2.528.1-1.1.noarch
v4236.v3cb_7ea_578c1f
```
Contributor guide
Research direction
Start at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create, using the reported lines 120 and 72, then trace the call into jenkins.scm.api.SCMFileSystem.of at line 213. Reproduce the build trigger with Jenkins 2.528.1 and the listed workflow-cps version. Done means the trigger no longer ends in an unhandled NullPointerException and either completes or reports an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100