Build often hangs and dies when installing missing Android Tools

I’ve been seeing an increasing number of failures over the past while when I reach the install-missing-android-tools step. It doesn’t seem to provide me more information than what is included below but it seems like it gets stuck while trying to download dependencies and then dies shortly afterwards.

+------------------------------------------------------------------------------+

| (3) install-missing-android-tools@2.1.1                                      |
+------------------------------------------------------------------------------+
| id: install-missing-android-tools                                            |
| version: 2.1.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-05-16T14:44:57Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[14:44:57] Start installing (golang) with apt-get       
INFO[14:44:57]  * [OK] Step dependency (go) installed, available. 
Configs:
- GradlewPath: ./gradlew
- AndroidHome: /opt/android-sdk-linux
Preparation
Set executable permission for gradlew
Initialize Android SDK
Ensure android licences
Ensure required Android SDK components
Searching for missing SDK components using:
$ ./gradlew "dependencies"
1 Like

Hi @osama,
could you please attach your failed build log file?

Sure @godreikrisztian , it’s as follows. This build failed about 8 minutes after starting.

  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•
  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
  β•šβ•β•β•β•β•β• β•šβ•β•   β•šβ•β•   β•šβ•β•  β•šβ•β•β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•

e[32;1m  version: 1.16.0e[0m

e[36mINFOe[0m[14:40:42] e[33;1mbitrise runs in CI modee[0m           
e[36mINFOe[0m[14:40:42] Running workflows: UnitAndJVMTestSetup --> e[32;1mUnitTestsAndJVMTestse[0m --> PostTest 

e[34;1mSwitching to workflow:e[0m UnitAndJVMTestSetup

+------------------------------------------------------------------------------+
| (0) avd-manager@0.9.2                                                        |
+------------------------------------------------------------------------------+
| id: avd-manager                                                              |
| version: 0.9.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-05-16T14:40:45Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[36mINFOe[0m[14:40:45] sudo "apt-get" "update"                      
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 https://deb.nodesource.com/node_8.x xenial InRelease [4,643 B]
Get:4 https://packages.cloud.google.com/apt cloud-sdk-xenial InRelease [6,372 B]
Get:5 https://download.docker.com/linux/ubuntu xenial InRelease [65.8 kB]
Hit:6 https://dl.yarnpkg.com/debian stable InRelease
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [80.4 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [626 kB]
Hit:11 https://packagecloud.io/github/git-lfs/ubuntu xenial InRelease
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [557 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [439 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [378 kB]
Get:15 https://deb.nodesource.com/node_8.x xenial/main amd64 Packages [1,009 B]
Get:16 https://deb.nodesource.com/node_8.x xenial/main i386 Packages [999 B]
Get:17 https://packages.cloud.google.com/apt cloud-sdk-xenial/main amd64 Packages [35.6 kB]
Get:18 https://packages.cloud.google.com/apt cloud-sdk-xenial/main i386 Packages [35.4 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [255 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1,002 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [922 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [808 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [742 kB]
Fetched 6,282 kB in 2s (3,081 kB/s)
Reading package lists...
e[36mINFOe[0m[14:40:51] Start installing (golang) with apt-get       
e[36mINFOe[0m[14:40:51]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mConfigs:e[0m
- Version: 26
- Resolution: 240x426
- Density: 120
- Orientation: portrait
- Tag: google_apis
- ABI: x86
- Profile: Nexus 5X
- ID: emulator
- CustomCommandFlags: -no-window -no-audio -debug-init -no-boot-anim
- Overwrite: true
- CustomConfig:
disk.dataPartition.size=1024M
hw.camera.back=emulated
hw.camera.front=emulated
hw.keyboard=yes
hw.gpu.enabled=true
hw.gpu.mode=swiftshader
hw.ramSize=1536
runtime.network.latency=none
runtime.network.speed=full
showDeviceFrame=no
skin.dynamic=yes
skin.path=_no_skin
skin.path.backup=_no_skin
vm.heapSize=384

e[34;1mEnsure sdk packages: [tools platform-tools system-images;android-26;google_apis;x86]e[0m
e[32;1m- Donee[0m

e[34;1mCreate AVDe[0m
e[32;1m- Donee[0m

e[34;1mStart emulatore[0m
- Device with serial: emulator-5554 started
e[32;1m- Donee[0m
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1mβœ“e[0m | e[32;1mavd-manager@0.9.2e[0m                                             | 147 sec  |
+---+---------------------------------------------------------------+----------+

                                          β–Ό

+------------------------------------------------------------------------------+
| (1) activate-ssh-key@3.1.1                                                   |
+------------------------------------------------------------------------------+
| id: activate-ssh-key                                                         |
| version: 3.1.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2018-05-16T14:43:12Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[36mINFOe[0m[14:43:12] Start installing (expect) with apt-get       
e[36mINFOe[0m[14:43:12]  * e[32;1m[OK]e[0m Step dependency (expect) installed, available. 
e[36mINFOe[0m[14:43:12] Start installing (git) with apt-get          
e[36mINFOe[0m[14:43:12]  * e[32;1m[OK]e[0m Step dependency (git) installed, available. 

# Configuration

* Path to save the RSA SSH private key: */root/.ssh/bitrise_step_activate_ssh_key*
* Should remove other identities from the ssh-agent? *true*
-> $ mkdir -p /root/.ssh
-> $ chmod 0600 /root/.ssh/bitrise_step_activate_ssh_key
Could not open a connection to your authentication agent.
 (i) ssh_agent_check_result: 2
 (i) ssh-agent not started
 (i) starting a new ssh-agent and exporting connection information with envman
Agent pid 1689
 (i) Expose SSH_AUTH_SOCK for the new ssh-agent, with envman
spawn ssh-add /root/.ssh/bitrise_step_activate_ssh_key
Identity added: /root/.ssh/bitrise_step_activate_ssh_key (/root/.ssh/bitrise_step_activate_ssh_key)

# Success

The SSH key was saved to */root/.ssh/bitrise_step_activate_ssh_key*
and was successfully added to ssh-agent.
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1mβœ“e[0m | e[32;1mactivate-ssh-key@3.1.1e[0m                                        | 4.28 sec |
+---+---------------------------------------------------------------+----------+

                                          β–Ό

+------------------------------------------------------------------------------+
| (2) git-clone@3.4.1                                                          |
+------------------------------------------------------------------------------+
| id: git-clone                                                                |
| version: 3.4.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-05-16T14:43:16Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[36mINFOe[0m[14:43:16] Start installing (golang) with apt-get       
e[36mINFOe[0m[14:43:16]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mGit Clone Configs:e[0m
- CloneIntoDir: /bitrise/src
- RepositoryURL: git@github.com:Org/Repo.git
e[34;1mGit Checkout Configs:e[0m
- Commit: 20ebc5220b7e1161543c78f24fa147199c095bda
- Tag: 
- Branch: crowdin_translations
- CloneDepth: 
e[34;1mGit Pull Request Configs:e[0m
- PullRequestURI: 
- PullRequestID: 
- BranchDest: 
- PullRequestMergeBranch: 
- ResetRepository: No
e[34;1mBitrise Build Configs:e[0m
- BuildURL: https://www.bitrise.io/build/d390b41f396ad91a
- BuildAPIToken: vXPIGVD16uVW97c8jHsKaw

e[34;1mGit clone repositorye[0m
=> git "init"
=> git "remote" "add" "origin" "git@github.com:Org/Repo.git"
=> git "fetch"
=> git "checkout" "20ebc5220b7e1161543c78f24fa147199c095bda"
=> git "submodule" "update" "--init" "--recursive"
e[34;1mExporting git logse[0m
=> GIT_CLONE_COMMIT_HASH
   value: 20ebc5220b7e1161543c78f24fa147199c095bda

=> GIT_CLONE_COMMIT_MESSAGE_SUBJECT
   value: Cleanup

=> GIT_CLONE_COMMIT_MESSAGE_BODY
   value: 

=> GIT_CLONE_COMMIT_AUTHOR_NAME
   value: Muhammad Osama

=> GIT_CLONE_COMMIT_AUTHOR_EMAIL
   value: example@example.com

=> GIT_CLONE_COMMIT_COMMITER_NAME
   value: Muhammad Osama

=> GIT_CLONE_COMMIT_COMMITER_EMAIL
   value: example@example.com

e[32;1mSuccesse[0m
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1mβœ“e[0m | e[32;1mgit-clone@3.4.1e[0m                                               | 101 sec  |
+---+---------------------------------------------------------------+----------+
| Update available: 3.4.1 -> 4.0.11                                            |
+---+---------------------------------------------------------------+----------+

                                          β–Ό

+------------------------------------------------------------------------------+
| (3) install-missing-android-tools@2.1.1                                      |
+------------------------------------------------------------------------------+
| id: install-missing-android-tools                                            |
| version: 2.1.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-05-16T14:44:57Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[36mINFOe[0m[14:44:57] Start installing (golang) with apt-get       
e[36mINFOe[0m[14:44:57]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mConfigs:e[0m
- GradlewPath: ./gradlew
- AndroidHome: /opt/android-sdk-linux

e[34;1mPreparatione[0m
Set executable permission for gradlew
Initialize Android SDK
Ensure android licences

e[34;1mEnsure required Android SDK componentse[0m
Searching for missing SDK components using:
$ ./gradlew "dependencies"

How much build time do you have? Since if you are on the free plan then you have 10 min build time, the steps before install missing android tools takes ~ 4 min.

That shouldn’t be an issue because I’m on an org plan with 90 minutes of build time.

@osama could you please write us a message on bitrise on-site-chat? I would need more info the debug the issue.

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