Details
-
Bug
-
Resolution: Answered
-
Low
-
None
-
5.3
-
None
-
None
Description
When our deployment project runs on a remote agent, it fails with a NPE:
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149) at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112) at com.atlassian.bamboo.repository.RepositoryDataImpl.getRepository(RepositoryDataImpl.java:136) at com.atlassian.bamboo.v2.build.task.CheckoutDirectoriesSnapshotHelper.<init>(CheckoutDirectoriesSnapshotHelper.java:124) at com.atlassian.bamboo.v2.build.task.InitializeBuild.prepareWorkingDirectory(InitializeBuild.java:101) at com.atlassian.bamboo.v2.build.task.InitializeBuild.doCall(InitializeBuild.java:82) at com.atlassian.bamboo.v2.build.task.InitializeBuild.call(InitializeBuild.java:53) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:181) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:101) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.NullPointerException at com.atlassian.bamboo.credentials.CredentialsManagerImpl.getCredentials(CredentialsManagerImpl.java:46) at com.atlassian.bamboo.credentials.Credentials$2.apply(Credentials.java:64) at com.atlassian.bamboo.credentials.Credentials$2.apply(Credentials.java:59) at com.google.common.collect.Iterators$8.next(Iterators.java:782) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:644) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) at com.atlassian.bamboo.v2.build.agent.remote.RemoteCredentialsAccessor.getCredentials(RemoteCredentialsAccessor.java:26) at com.atlassian.bamboo.plugins.git.GitRepository.populateFromConfig(GitRepository.java:646) at com.atlassian.bamboo.repository.RepositoryReference.create(RepositoryReference.java:28) at com.atlassian.bamboo.repository.RepositoryReference.create(RepositoryReference.java:10) at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) ... 11 more
The same deployment runs fine on a local agent. The deployment tasks include code checkout from a shared repository based on shared credentials. Replacing the VCS task with "manual" checkout using git command solves the problem.