jenkinsci / jenkinsci/workflow-cps-plugin

[JENKINS-76224] NullPointerException when triggering a build

Open
#1,708 0 comments 0 reactions 0 assignees View on GitHub
component:workflow-cps-plugin imported-jira-issue priority:major resolution:unresolved
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


  • status: Open
  • priority: Major
  • component(s): workflow-cps-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

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: FAILURE

There 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.