Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Was not able to determine current branch for branch plug-in mode

Hello there,

 

I am trying to setup the branching feature in Bamboo for our repository, but I am running into issues with running automated builds.

The first automated build worked, but every build after that one results in this exception:

java.lang.IllegalStateException: Was not able to determine current branch for branch plug-in mode
	at ch.mibex.bamboo.sonar4bamboo.tasks.SonarRuntimeDataProvider$$anonfun$setBranchTargetName$1.apply(SonarRuntimeDataProvider.scala:148)
	at ch.mibex.bamboo.sonar4bamboo.tasks.SonarRuntimeDataProvider$$anonfun$setBranchTargetName$1.apply(SonarRuntimeDataProvider.scala:143)
	at scala.Option.foreach(Option.scala:256)
	at ch.mibex.bamboo.sonar4bamboo.tasks.SonarRuntimeDataProvider.setBranchTargetName(SonarRuntimeDataProvider.scala:143)
	at ch.mibex.bamboo.sonar4bamboo.tasks.SonarRuntimeDataProvider.populateRuntimeTaskData(SonarRuntimeDataProvider.scala:51)
	at com.atlassian.bamboo.chains.ChainPluginSupportHelper.lambda$prepareRuntimeTaskData$0(ChainPluginSupportHelper.java:37)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
	at com.atlassian.bamboo.chains.ChainPluginSupportHelper.prepareRuntimeTaskData(ChainPluginSupportHelper.java:31)
	at com.atlassian.bamboo.chains.ChainPluginSupportImpl$10.run(ChainPluginSupportImpl.java:242)
	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:174)
	at com.atlassian.bamboo.variable.CustomVariableContextRunnerImpl.execute(CustomVariableContextRunnerImpl.java:31)
	at com.atlassian.bamboo.chains.ChainPluginSupportImpl.buildStarted(ChainPluginSupportImpl.java:233)
	at sun.reflect.GeneratedMethodAccessor1949.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.orm.hibernate5.support.OpenSessionInterceptor.invoke(OpenSessionInterceptor.java:90)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy242.buildStarted(Unknown Source)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.dispatchBuildsInCurrentStage(ChainExecutionManagerImpl.java:883)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.access$2000(ChainExecutionManagerImpl.java:127)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl$4.run(ChainExecutionManagerImpl.java:625)
	at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:302)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.execute(ChainExecutionManagerImpl.java:581)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.tryStartChainState(ChainExecutionManagerImpl.java:340)
	at com.atlassian.bamboo.chains.ChainExecutionManagerImpl.delayedStart(ChainExecutionManagerImpl.java:232)
	at sun.reflect.GeneratedMethodAccessor1743.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy225.delayedStart(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor1743.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:206)
	at com.sun.proxy.$Proxy225.delayedStart(Unknown Source)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.lambda$call$0(PlanExecutionManagerImpl.java:374)
	at com.atlassian.bamboo.util.CacheAwareness$3.call(CacheAwareness.java:136)
	at com.atlassian.bamboo.util.CacheAwareness$3.call(CacheAwareness.java:133)
	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:162)
	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:133)
	at com.atlassian.bamboo.util.CacheAwareness.withValuesOlderThanTimestampReloaded(CacheAwareness.java:187)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:373)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1$1.call(PlanExecutionManagerImpl.java:366)
	at io.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:293)
	at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:75)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:655)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.access$400(PlanExecutionManagerImpl.java:130)
	at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$1$1.run(PlanExecutionManagerImpl.java:362)
	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
	at java.lang.Thread.run(Thread.java:745)

 

2 answers

Hi,

This error normally comes up when you have enabled incremental mode and/or the QG status build breaker feature, but do not use a Bitbucket Server repository in your build plan.

Is that possible?

Best regards,
Michael (app vendor)

I do not use incremental mode, but I use the QG status build breaker feature. The build plan contains two repositorys from a Bitbucket Server.

@Kia ArmaniThanks for your feedback. Could you please create a support request at https://support.mibexsoftware.com including the debug logs of the app? That would help us a lot in reproducing the issue.

0 votes
Foong Atlassian Team Jan 18, 2019

The error happens at the Sonar task.

Contact the developer of the Sonar add-on here

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

215 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you