fabric-beta-publisher-plugin
fabric-beta-publisher-plugin copied to clipboard
Null pointer exception when setting environment variables
In some cases, I'm getting a null pointer exception in the EnvironmentContributer class:
at java.util.TreeMap.putAll(TreeMap.java:313)
at fabric.beta.publisher.EnvVarsContributor.buildEnvironmentFor(EnvVarsContributor.java:19)
at hudson.model.Run.getEnvironment(Run.java:2287)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:878)
at hudson.plugins.git.GitSCM.getParamExpandedRepos(GitSCM.java:419)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:627)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:592)
at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391)
at hudson.scm.SCM.poll(SCM.java:408)
at hudson.model.AbstractProject._poll(AbstractProject.java:1394)
at hudson.model.AbstractProject.poll(AbstractProject.java:1297)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:594)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:640)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
It seems that action.getData()
can return null, even if action is not.
I'm not able to reproduce it consistently, but it sometimes a new commit on a job's branch can get the job unstuck. For now, I've downgraded the plugin to 1.6.0
+1 I get this consistently on GIT hooks.
Started on Jan 30, 2018 5:38:06 PM
Using strategy: Default
[poll] Last Built Revision: Revision 67a19411ac47ada7ea62426369bcb1c77f8d1328 (refs/remotes/origin/master)
ERROR: Failed to record SCM polling for hudson.model.FreeStyleProject@122e010[xxxxx_android]
java.lang.NullPointerException
at java.util.TreeMap.putAll(TreeMap.java:313)
at fabric.beta.publisher.EnvVarsContributor.buildEnvironmentFor(EnvVarsContributor.java:19)
at hudson.model.Run.getEnvironment(Run.java:2287)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:886)
at hudson.plugins.git.GitSCM.getParamExpandedRepos(GitSCM.java:458)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:666)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:631)
at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:391)
at hudson.scm.SCM.poll(SCM.java:408)
at hudson.model.AbstractProject._poll(AbstractProject.java:1384)
at hudson.model.AbstractProject.poll(AbstractProject.java:1287)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:594)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:640)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Was there any solution to this? We've hit the same issue and we get the same exception now.
@aernout which plugin did you downgrade?
The same issue with version 2.1 when Branch Specifier set to something like this: ":^refs/tags/release/.*"