com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed.

Atlassian JIRA | Jaime Silveira [Atlassian] | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    In some cases, some Bamboo builds have been failing because Bamboo is attempting to connected to the 'master' branch in some repository, but instead it looks for 'default'. When this branch doesn't exist, the build fails to run. The logs show the following errors: {noformat} com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed. at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:444) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:301) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:186) at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:124) at com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.testIfBuildShouldStart(ChangeDetectionListenerAction.java:112) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:526) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:510) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312) at com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:85) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:800) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startConditionalBuild(PlanExecutionManagerImpl.java:509) at com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:582) ... Caused by: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed. at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191) ... Caused by: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed. at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.obtainLatestRevision(NativeGitOperationHelper.java:550) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$2.call(NativeGitOperationHelper.java:561) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper$2.call(NativeGitOperationHelper.java:557) {noformat} Another behavior we could see in a case, when selecting the repository in the Linked Repositories page in Bamboo, right when it's select the 'Branch' is 'default' and it's immediately changed to 'master'. *Workaround* # Delete the repository and add it back

    Atlassian JIRA | 2 years ago | Jaime Silveira [Atlassian]
    com.atlassian.bamboo.repository.RepositoryException: java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed.

    Root Cause Analysis

    1. com.atlassian.bamboo.repository.RepositoryException

      java.lang.RuntimeException: com.atlassian.bamboo.repository.InvalidRepositoryException: Cannot determine head revision of 'https://bitbucket.org/witech2/wipod' on branch 'default'. Branch has probably been removed.

      at com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal()
    2. com.atlassian.bamboo
      PlanExecutionManagerImpl$4.call
      1. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildInternal(DefaultChangeDetectionManager.java:444)
      2. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:301)
      3. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceRevisions(DefaultChangeDetectionManager.java:186)
      4. com.atlassian.bamboo.v2.trigger.DefaultChangeDetectionManager.collectChangesSinceLastBuildIfTriggered(DefaultChangeDetectionManager.java:124)
      5. com.atlassian.bamboo.v2.trigger.ChangeDetectionListenerAction.testIfBuildShouldStart(ChangeDetectionListenerAction.java:112)
      6. com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:526)
      7. com.atlassian.bamboo.plan.PlanExecutionManagerImpl$4.call(PlanExecutionManagerImpl.java:510)
      7 frames
    3. com.atlassian.util
      ManagedLocks$ManagedLockImpl.withLock
      1. com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312)
      1 frame
    4. com.atlassian.bamboo
      PlanExecutionManagerImpl.start
      1. com.atlassian.bamboo.plan.PlanExecutionLockServiceImpl.lock(PlanExecutionLockServiceImpl.java:85)
      2. com.atlassian.bamboo.plan.PlanExecutionManagerImpl.doWithProcessLock(PlanExecutionManagerImpl.java:800)
      3. com.atlassian.bamboo.plan.PlanExecutionManagerImpl.startConditionalBuild(PlanExecutionManagerImpl.java:509)
      4. com.atlassian.bamboo.plan.PlanExecutionManagerImpl.start(PlanExecutionManagerImpl.java:582)
      4 frames