# Build fails due to latest submodule commits being absent

**URL:** https://discuss.bitrise.io/t/build-fails-due-to-latest-submodule-commits-being-absent/9670
**Category:** Builds
**Created:** [July 18, 2019, 12:59pm UTC](https://discuss.bitrise.io/t/build-fails-due-to-latest-submodule-commits-being-absent/9670 "2019-07-18T12:59:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vvictor-ua](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vvictor-ua](https://discuss.bitrise.io/u/vvictor-ua)
#### Post date: [July 18, 2019, 12:59pm UTC](https://discuss.bitrise.io/t/build-fails-due-to-latest-submodule-commits-being-absent/9670/1 "2019-07-18T12:59:21Z")

</div>

# Bitrise Build Issue Report template

## Description of the issue

Running into an issue with my android project, which has submodule dependencies. In my gitmodules, the submodules are listed as pointing to a branch(develop). But whenever the build runs, it seems to not pick up the latest commits from those repositories. I have a git clone step and it fails on those submodules after the ‘git submodule update’ step as it seems to not fetch the latest commits to those repos. Can you please help?

config:

- RepositoryURL: [git@github.com](mailto:git@github.com):[REDACTED]erarmour/ua-shop-[REDACTED].git
- CloneIntoDir: /bitrise/src
- Commit:
- Tag:
- Branch: adhoc/login-issue-prod
- BranchDest:
- PRID: 0
- PRRepositoryURL:
- PRMergeBranch:
- ResetRepository: false
- CloneDepth: 1
- BuildURL: [Log in - Bitrise](https://app.bitrise.io/build/1b992ec13985e8e0)
- BuildAPIToken: [REDACTED]
- UpdateSubmodules: true
- ManualMerge: true  
git “init”  
Initialized empty Git repository in /bitrise/src/.git/  
git “remote” “add” “origin” “[git@github.com](mailto:git@github.com):[REDACTED]erarmour/ua-shop-[REDACTED].git”  
git “fetch” “–depth=1” “origin” “adhoc/login-issue-prod”  
Warning: Permanently added ‘[github.com](http://github.com),140.82.113.4’ (RSA) to the list of known hosts.  
From [github.com](http://github.com):[REDACTED]erarmour/ua-shop-[REDACTED]

- branch adhoc/login-issue-prod → FETCH\_HEAD
- [new branch] adhoc/login-issue-prod → origin/adhoc/login-issue-prod  
git “checkout” “adhoc/login-issue-prod”  
Switched to a new branch ‘adhoc/login-issue-prod’  
Branch adhoc/login-issue-prod set up to track remote branch adhoc/login-issue-prod from origin.  
git “merge” “origin/adhoc/login-issue-prod”  
Already up-to-date.  
git “submodule” “update” “–init” “–recursive”  
Submodule ‘commerce-core-[REDACTED]/commerce-common-[REDACTED]’ ([git@github.com](mailto:git@github.com):[REDACTED]erarmour/commerce-common-[REDACTED].git) registered for path ‘commerce-core-[REDACTED]/commerce-common-[REDACTED]’  
Submodule ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-common-[REDACTED]’ ([git@github.com](mailto:git@github.com):[REDACTED]erarmour/commerce-common-[REDACTED].git) registered for path ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-common-[REDACTED]’  
Submodule ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-pci-tokenization-[REDACTED]’ ([git@github.com](mailto:git@github.com):[REDACTED]erarmour/commerce-pci-tokenization-[REDACTED].git) registered for path ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-pci-tokenization-[REDACTED]’  
Cloning into ‘commerce-core-[REDACTED]/commerce-common-[REDACTED]’…  
fatal: reference is not a tree: 8fcf032eba831003c8484d13f54916479317fcde  
Cloning into ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-common-[REDACTED]’…  
fatal: reference is not a tree: 24e431349ed1309f9e07e484282be0ebde286bbb  
Cloning into ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-pci-tokenization-[REDACTED]’…  
fatal: reference is not a tree: b526216b927622b9af95ca0c6e14f1099995e1f2  
Unable to checkout ‘8fcf032eba831003c8484d13f54916479317fcde’ in submodule path ‘commerce-core-[REDACTED]/commerce-common-[REDACTED]’  
Unable to checkout ‘24e431349ed1309f9e07e484282be0ebde286bbb’ in submodule path ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-common-[REDACTED]’  
Unable to checkout ‘b526216b927622b9af95ca0c6e14f1099995e1f2’ in submodule path ‘commerce-core-[REDACTED]/uasdk-ecomm-[REDACTED]/commerce-pci-tokenization-[REDACTED]’  
ERROR: submodule update: exit status 1  
| |  
±–±--------------------------------------------------------------±---------+  
| x | git-clone@4.0.14 (exit code: 1) | 10 sec |  
±–±--------------------------------------------------------------±---------+  
| Issue tracker: [GitHub · Where software is built](https://github.com/bitrise-io/steps-git-clone/issues) |  
| Source: [GitHub - bitrise-steplib/steps-git-clone](https://github.com/bitrise-io/steps-git-clone) |  
±–±--------------------------------------------------------------±---------+

## Environment:

Info above

Step: Git Clone

## Reproducibility

- _Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build)_ : NO
- _Does a rebuild without caches help? (You can remove the `Cache:Pull` and `Cache:Push` steps temporarily to not to use the cache, or [you can delete all the caches on the `Settings` tab of the app](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : NO
- _Does the issue happen sporadically, or every time?_ :
- _Does upgrading the build Step to the latest version help?_ : NO
- _When did the issue start?_ : Yesterday

### Local reproduction

Cannot reproduce locally.

## Build log

> **[Log in - Bitrise](https://app.bitrise.io/users/sign_in)**
>
> Bringing back the joy of iOS & Android development through automating build, testing and support cycles.

---

<div class="post-metadata">

### Author: ![vvictor-ua](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@vvictor-ua](https://discuss.bitrise.io/u/vvictor-ua)
#### Post date: [July 18, 2019, 2:47pm UTC](https://discuss.bitrise.io/t/build-fails-due-to-latest-submodule-commits-being-absent/9670/2 "2019-07-18T14:47:58Z")

</div>

Looks like this was happening on one branch. Not quite sure what was different. But I trashed that branch and recreated a new one and it seems to have gone away.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)
#### Post date: [August 17, 2019, 2:48pm UTC](https://discuss.bitrise.io/t/build-fails-due-to-latest-submodule-commits-being-absent/9670/3 "2019-08-17T14:48:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
