Android emulator v25 timing out

Description of the issue

The newer Android emulators are timing out.

Environment:

Where did the issue happen?

Docker / Ubuntu 16.04 (latest) stack, Android emulator 25/armeabi-v7a/google_apis

Which build Step causes the issue and which version of the step?

create-android-emulator, latest

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. : No
  • If it’s an issue which happens sporadically, what’s the frequency? (e.g. Once a day ; about x% of the builds) : 100%
  • Does upgrading the build Step to the latest version help? : No
  • When did the issue start? : Possibly 23+, see https://github.com/googlemaps/android-maps-utils/issues/371

Linux/Android stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Haven’t try it yet.

Build log


  ██████╗ ██╗████████╗██████╗ ██╗███████╗███████╗
  ██╔══██╗██║╚══██╔══╝██╔══██╗██║██╔════╝██╔════╝
  ██████╔╝██║   ██║   ██████╔╝██║███████╗█████╗
  ██╔══██╗██║   ██║   ██╔══██╗██║╚════██║██╔══╝
  ██████╔╝██║   ██║   ██║  ██║██║███████║███████╗
  ╚═════╝ ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝╚══════╝╚══════╝

e[32;1mVersion: 1.5.6e[0m

e[34mINFOe[0m[09:37:32] e[33;1mbitrise runs in CI modee[0m           
e[34mINFOe[0m[09:37:32] e[32;1mRunning workflow:e[0m primary         

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

e[34mINFOe[0m[09:37:36] Step uses latest version -- Updating StepLib ... 
e[34mINFOe[0m[09:37:36] Update StepLib (https://github.com/bitrise-io/bitrise-steplib.git)... 
From https://github.com/bitrise-io/bitrise-steplib
   1c77180..5132d64  master     -> origin/master
Updating 1c77180..5132d64
Fast-forward
 steps/gradle-runner/1.5.6/step.yml | 127 +++++++++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)
 create mode 100644 steps/gradle-runner/1.5.6/step.yml
+------------------------------------------------------------------------------+
| (0) cache-pull                                                               |
+------------------------------------------------------------------------------+
| id: cache-pull                                                               |
| version: 0.9.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-05-06T09:37:42Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[09:37:42] Start installing (rsync) with apt-get        
e[34mINFOe[0m[09:37:42]  * e[32;1m[OK]e[0m Step dependency (rsync) installed, available. 
e[34mINFOe[0m[09:37:42] Start installing (tar) with apt-get          
e[34mINFOe[0m[09:37:42]  * e[32;1m[OK]e[0m Step dependency (tar) installed, available. 
$ cd /bitrise/src
2017/05/06 09:37:47 Cache pull...
2017/05/06 09:37:47 => Downloading Cache ...
2017/05/06 09:37:47  [!] Failed to download cache archive: Failed to generate Download URL: Download URL was rejected (http-code:404): {"error":"Build Cache Not Found"}
exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[33;1m!e[0m | e[33;1mcache-pull (exit code: 1)e[0m                                     | 11 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-steplib/steps-cache-pull/issues    |
| Source: https://github.com/bitrise-steplib/steps-cache-pull.git              |
+---+---------------------------------------------------------------+----------+

                                          ▼

e[33mWARNe[0m[09:37:47] Step (cache-pull) failed, but was marked as skippable 
+------------------------------------------------------------------------------+
| (1) create-android-emulator                                                  |
+------------------------------------------------------------------------------+
| id: create-android-emulator                                                  |
| version: 1.1.2                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-05-06T09:37:48Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[09:37:48] Start installing (golang) with apt-get       
e[34mINFOe[0m[09:37:48]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mConfigs:e[0m
- Name: test
- Platform: android-25
- Abi: armeabi-v7a
- Tag: google_apis
- Options: 
- AndroidHome: /opt/android-sdk-linux
- CustomHardwareProfileContent:


e[34;1mCheck if platform installede[0m
e[32;1minstalled: truee[0m

e[34;1mCheck if system image installede[0m
Checking path: system-images/android-25/google_apis/armeabi-v7a
e[32;1minstalled: truee[0m

e[34;1mCreating AVD imagee[0m

e[33;1mFound sdkmanager but no avdmanager, updating SDK Tools...e[0m
Warning: File /root/.android/repositories.cfg could not be loaded.
done
- avdmanager successfully installed

e[32;1m$ /opt/android-sdk-linux/tools/bin/avdmanager "create" "avd" "--force" "--package" "system-images;android-25;google_apis;armeabi-v7a" "--name" "test" "--abi" "armeabi-v7a" "--tag" "google_apis"e[0m

Do you wish to create a custom hardware profile? [no] e[32;1mEmaultor name is exported in environment variable: BITRISE_EMULATOR_NAME (value: test)e[0m
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mcreate-android-emulatore[0m                                       | 60 sec   |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (2) start-android-emulator                                                   |
+------------------------------------------------------------------------------+
| id: start-android-emulator                                                   |
| version: 1.2.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-05-06T09:38:47Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[09:38:47] Start installing (golang) with apt-get       
e[34mINFOe[0m[09:38:47]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mConfigs:e[0m
- EmulatorName: test
- Skin: 768x1280
- EmulatorOptions: -no-boot-anim -no-window
- AndroidHome: /opt/android-sdk-linux
- WaitForBoot: false

e[34;1mValidate AVD imagee[0m
e[32;1mAVD image (test) existe[0m

e[34;1mStart AVD imagee[0m
$ /opt/android-sdk-linux/emulator/emulator "-avd" "test" "-skin" "768x1280" "-no-boot-anim" "-no-window"

e[33;1msh: 1: lspci: not founde[0m
e[33;1msh: 1: glxinfo: not founde[0m
> Checking for started device serial...
e[33;1mpulseaudio: pa_context_connect() failede[0m
e[33;1mpulseaudio: Reason: Connection refusede[0m
e[33;1mpulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio drivere[0m
> Checking for started device serial...
emulator: WARNING: encryption is off
Creating filesystem with parameters:
    Size: 69206016
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 4224
    Inode size: 256
    Journal blocks: 1024
    Label: 
    Blocks: 16896
    Block groups: 1
    Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android SDK Tools" checkbox
 - Click "OK"

> Checking for started device serial...
> Checking for started device serial...
e[32;1m> Started device serial: emulator-5554e[0m

e[32;1mEmulator (emulator-5554) bootede[0m
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mstart-android-emulatore[0m                                        | 25 sec   |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (3) activate-ssh-key                                                         |
+------------------------------------------------------------------------------+
| id: activate-ssh-key                                                         |
| version: 3.1.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-05-06T09:39:13Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[09:39:13] Start installing (expect) with apt-get       
e[34mINFOe[0m[09:39:13]  * e[32;1m[OK]e[0m Step dependency (expect) installed, available. 
e[34mINFOe[0m[09:39:13] Start installing (git) with apt-get          
e[34mINFOe[0m[09:39:13]  * 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 1473
 (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-keye[0m                                              | 2.07 sec |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (4) git-clone                                                                |
+------------------------------------------------------------------------------+
| id: git-clone                                                                |
| version: 3.4.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-05-06T09:39:15Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[09:39:15] Start installing (golang) with apt-get       
e[34mINFOe[0m[09:39:15]  * 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:ishitatsuyuki/[redacted].git
e[34;1mGit Checkout Configs:e[0m
- Commit: 8a16d4068fce78bde1f6fe7af334a27717e3476d
- Tag: 
- Branch: master
- 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/eab8395233770591
- BuildAPIToken: bxhYhTOF6xnTHlYrUDSXEw

e[34;1mGit clone repositorye[0m
=> git "init"
=> git "remote" "add" "origin" "git@github.com:ishitatsuyuki/[redacted].git"
=> git "fetch"
=> git "checkout" "8a16d4068fce78bde1f6fe7af334a27717e3476d"
=> git "submodule" "update" "--init" "--recursive"
e[34;1mExporting git logse[0m
=> GIT_CLONE_COMMIT_HASH
   value: 8a16d4068fce78bde1f6fe7af334a27717e3476d

=> GIT_CLONE_COMMIT_MESSAGE_SUBJECT
   value: Upgrade Edge to 15

=> GIT_CLONE_COMMIT_MESSAGE_BODY
   value: 

=> GIT_CLONE_COMMIT_AUTHOR_NAME
   value: Tatsuyuki Ishi

=> GIT_CLONE_COMMIT_AUTHOR_EMAIL
   value: ishitatsuyuki@gmail.com

=> GIT_CLONE_COMMIT_COMMITER_NAME
   value: Tatsuyuki Ishi

=> GIT_CLONE_COMMIT_COMMITER_EMAIL
   value: ishitatsuyuki@gmail.com

e[32;1mSuccesse[0m
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mgit-clonee[0m                                                     | 4.16 sec |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (5) yarn                                                                     |
+------------------------------------------------------------------------------+
| id: yarn                                                                     |
| version: 0.0.4                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-05-06T09:39:19Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Yarn already installed.
==> Switching to working directory: /bitrise/src/[redacted]
yarn install v0.23.4
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 77.69s.
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1myarne[0m                                                          | 82 sec   |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (6) wait-for-android-emulator                                                |
+------------------------------------------------------------------------------+
| id: wait-for-android-emulator                                                |
| version: 1.0.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-05-06T09:40:41Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[34mINFOe[0m[09:40:41] Start installing (golang) with apt-get       
e[34mINFOe[0m[09:40:41]  * e[32;1m[OK]e[0m Step dependency (go) installed, available. 

e[34;1mConfigs:e[0m
- emulatorSerial: emulator-5554
- bootTimeout: 600
- AndroidHome: /opt/android-sdk-linux

e[34;1mWaiting for emulator boote[0m
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
> Checking if device booted...
e[31;1mWaiting for emulator boot timed out after %!d(string=600) secondse[0m
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[31;1mxe[0m | e[31;1mwait-for-android-emulator (exit code: 1)e[0m                      | 23.4 min |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/bitrise-steplib/steps-wait-for-android-emulator/issues |
| Source: https://github.com/bitrise-steplib/steps-wait-for-android-emulator   |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (7) Do anything with Script step                                             |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-05-06T10:04:04Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
|                                                                              |
e[33mWARNe[0m[10:04:04] A previous step failed, and this step (Do anything with Script step) was not marked as IsAlwaysRun, skipped 
+---+---------------------------------------------------------------+----------+
| e[34;1m-e[0m | e[34;1mDo anything with Script stepe[0m                                  | 0.92 sec |
+---+---------------------------------------------------------------+----------+

                                          ▼

+------------------------------------------------------------------------------+
| (8) cache-push@0.9.4                                                         |
+------------------------------------------------------------------------------+
| id: cache-push                                                               |
| version: 0.9.4                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2017-05-06T10:04:05Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
e[33mWARNe[0m[10:04:05] A previous step failed, and this step (cache-push@0.9.4) was not marked as IsAlwaysRun, skipped 
|                                                                              |
+---+---------------------------------------------------------------+----------+
| e[34;1m-e[0m | e[34;1mcache-push@0.9.4e[0m                                              | 1.17 sec |
+---+---------------------------------------------------------------+----------+


+------------------------------------------------------------------------------+
|                               bitrise summary                                |
+---+---------------------------------------------------------------+----------+
|   | title                                                         | time (s) |
+---+---------------------------------------------------------------+----------+
| e[33;1m!e[0m | e[33;1mcache-pull (exit code: 1)e[0m                                     | 11 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-steplib/steps-cache-pull/issues    |
| Source: https://github.com/bitrise-steplib/steps-cache-pull.git              |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mcreate-android-emulatore[0m                                       | 60 sec   |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mstart-android-emulatore[0m                                        | 25 sec   |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mactivate-ssh-keye[0m                                              | 2.07 sec |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1mgit-clonee[0m                                                     | 4.16 sec |
+---+---------------------------------------------------------------+----------+
| e[32;1m✓e[0m | e[32;1myarne[0m                                                          | 82 sec   |
+---+---------------------------------------------------------------+----------+
| e[31;1mxe[0m | e[31;1mwait-for-android-emulator (exit code: 1)e[0m                      | 23.4 min |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...com/bitrise-steplib/steps-wait-for-android-emulator/issues |
| Source: https://github.com/bitrise-steplib/steps-wait-for-android-emulator   |
+---+---------------------------------------------------------------+----------+
| e[34;1m-e[0m | e[34;1mDo anything with Script stepe[0m                                  | 0.92 sec |
+---+---------------------------------------------------------------+----------+
| e[34;1m-e[0m | e[34;1mcache-push@0.9.4e[0m                                              | 1.17 sec |
+---+---------------------------------------------------------------+----------+
| Total runtime: 26.5 min                                                      |
+------------------------------------------------------------------------------+

e[34mINFOe[0m[10:04:06]                                              
e[34mINFOe[0m[10:04:06] Submitting anonymized usage information...   
e[34mINFOe[0m[10:04:06] For more information visit:                  
e[34mINFOe[0m[10:04:06] https://github.com/bitrise-core/bitrise-plugins-analytics/blob/master/README.md 

Thanks for reporting @ishitatsuyuki , we’ll check this ASAP!

Fix for that is already proposed and waiting for review: https://github.com/bitrise-steplib/steps-start-android-emulator/pull/32

1 Like

Moved it to the top of our todo list, for Monday morning

The issue fixed, PR merged, and the new version is released!

Thank you @koral!

1 Like