jenkinsci/jenkins · error · IOException

Failed to parse changelog

Error message

Failed to parse changelog

What it means

Thrown during the checkout/run phase when an SCMListener.onChangeLogParsed(build, listener, changeSet) throws an Exception. The exception is wrapped in an IOException with the message 'Failed to parse changelog'. This is not a parse error in the changelog file itself per se, but a failure in a registered SCMListener processing the parsed change set.

Source

Thrown at core/src/main/java/hudson/model/AbstractBuild.java:666

                    if (project.checkout(build, launcher, listener, changeLogFile)) {
                        // check out succeeded
                        SCM scm = project.getScm();
                        for (SCMListener l : SCMListener.all()) {
                            try {
                                l.onCheckout(build, scm, build.getWorkspace(), listener, changeLogFile, build.getAction(SCMRevisionState.class));
                            } catch (Exception e) {
                                throw new IOException(e);
                            }
                        }

                        build.scm = scm.createChangeLogParser();
                        build.changeSet = new WeakReference<>(build.calcChangeSet());

                        for (SCMListener l : SCMListener.all())
                            try {
                                l.onChangeLogParsed(build, listener, build.getChangeSet());
                            } catch (Exception e) {
                                throw new IOException("Failed to parse changelog", e);
                            }

                        // Get a chance to do something after checkout and changelog is done
                        scm.postCheckout(build, launcher, build.getWorkspace(), listener);

                        return;
                    }
                } catch (AbortException e) {
                    listener.error(e.getMessage());
                } catch (ClosedByInterruptException | InterruptedIOException e) {
                    throw (InterruptedException) new InterruptedException().initCause(e);
                } catch (IOException e) {
                    // checkout error not yet reported
                    Functions.printStackTrace(e, listener.getLogger());
                }

                if (retryCount == 0)   // all attempts failed
                    throw new RunnerAbortedException();

View on GitHub (pinned to 2e228ff40b)

Solutions

  1. Examine the wrapped cause (IOException.getCause()) to identify which SCMListener failed and why
  2. Update or patch the plugin that registered the failing SCMListener
  3. Temporarily disable the offending listener plugin to confirm it is the culprit
  4. If you author an SCMListener, wrap onChangeLogParsed logic in try/catch and log rather than propagate

Example fix

// before: SCMListener throws, killing the build
@Override
public void onChangeLogParsed(Run build, BuildListener listener, ChangeLogSet<?> changeSet) {
    notifyExternal(build);
}
// after: guard listener logic
@Override
public void onChangeLogParsed(Run build, BuildListener listener, ChangeLogSet<?> changeSet) {
    try {
        notifyExternal(build);
    } catch (Exception e) {
        listener.getLogger().println("SCM listener warning: " + e.getMessage());
    }
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    // checkout / changelog parsing phase
} catch (IOException e) {
    if ("Failed to parse changelog".equals(e.getMessage()) && e.getCause() != null) {
        // the cause identifies the failing SCMListener; handle accordingly
    }
    throw e;
}

Prevention

When it happens

Trigger: During build checkout, after build.calcChangeSet() produces the change set, the loop over SCMListener.all() calls onChangeLogParsed on each listener; any listener throwing causes this IOException.

Common situations: A plugin providing an SCMListener (e.g. a notification or git-trait plugin) throws due to an unexpected change-set shape, a null field, a network call to an external system, or a serialization issue; a version mismatch between the SCM plugin and a listener plugin after an upgrade.

Understand the failure class

Related errors


AI-assisted analysis of jenkinsci/jenkins@2e228ff40b (2026-08-14). Data as JSON: /api/errors/85c19699055270b1. Report an issue: GitHub.