jenkinsci/google-source-plugin

Plugin crashes on null pointer for builds

Closed this issue · 2 comments

Not sure when my predecessor installed this plugin, or why we saw this now, but builds started failing a null check with this stack:

java.io.IOException: Failed to parse changelog
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:628)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    at hudson.model.Run.execute(Run.java:1741)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:408)
Caused by: java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
    at com.google.jenkins.plugins.metadata.scm.SourceMetadata.<init>(SourceMetadata.java:62)
    at com.google.jenkins.plugins.metadata.scm.SourceMetadataExtractor$FromGitBuildActions.getSourceMetadata(SourceMetadataExtractor.java:242)
    at com.google.jenkins.plugins.metadata.scm.SourceMetadataExtractor$FromBuildActions.extract(SourceMetadataExtractor.java:139)
    at com.google.jenkins.plugins.metadata.scm.SourceMetadataExtractor.extract(SourceMetadataExtractor.java:101)
    at com.google.jenkins.plugins.metadata.scm.SourceMetadataBuildListener.onChangeLogParsed(SourceMetadataBuildListener.java:50)
    at hudson.model.listeners.SCMListener.onChangeLogParsed(SCMListener.java:120)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:626)

SourceMetadata.java and others are from this repo, with correct line numbers. Also, uninstalling this plugin fixed that issue.

gunan commented

This issue is resolved with the 0.2 release

I still get the issue. can you let me know how to resolve the issue on GITCHANGELOG plugin in jenkins
--- Git Changelog ---

java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
at com.google.common.base.Optional.of(Optional.java:84)
at se.bjurr.gitchangelog.api.GitChangelogApi.getId(GitChangelogApi.java:461)
at se.bjurr.gitchangelog.api.GitChangelogApi.getChangelog(GitChangelogApi.java:412)
at se.bjurr.gitchangelog.api.GitChangelogApi.getChangelog(GitChangelogApi.java:73)
at se.bjurr.gitchangelog.api.GitChangelogApi.render(GitChangelogApi.java:97)
at se.bjurr.gitchangelog.api.GitChangelogApi.render(GitChangelogApi.java:109)
at org.jenkinsci.plugins.gitchangelog.perform.RemoteCallable.call(RemoteCallable.java:151)
at org.jenkinsci.plugins.gitchangelog.perform.RemoteCallable.call(RemoteCallable.java:29)
at hudson.FilePath.act(FilePath.java:1105)
at org.jenkinsci.plugins.gitchangelog.perform.GitChangelogPerformer.performerPerform(GitChangelogPerformer.java:40)
at org.jenkinsci.plugins.gitchangelog.GitChangelogRecorder.perform(GitChangelogRecorder.java:52)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1067)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1766)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410).