Android emulator is not booting after it is created and started by AVD manager step

Hi,
Previously the step was working fine with emulator launching and booting properly. But suddenly it has stopped working. After creating emulator using AVD manager step. I’m waiting for the device to get booted completely. Which is just not happening.

I have attached the logs as well. I’ve increased the timeout also. Not sure why this has stopped working. My stack is “Android & Docker, On Ubuntu 16.04”
±-----------------------------------------------------------------------------+

| (4) avd-manager@0.9.2 |
±-----------------------------------------------------------------------------+
| id: avd-manager |
| version: 0.9.2 |
| collection: GitHub - bitrise-io/bitrise-steplib: New Bitrise StepLib |
| toolkit: go |
| time: 2018-11-19T10:11:17Z |
±-----------------------------------------------------------------------------+
| |
INFO[10:11:17] Start installing (golang) with apt-get
INFO[10:11:17] * [OK] Step dependency (go) installed, available.
Configs:

  • Version: 28
  • Resolution: 1080x1920
  • Density: 420
  • Orientation: portrait
  • Tag: google_apis
  • ABI: x86
  • Profile: Nexus 5X
  • ID: emulator
  • CustomCommandFlags: -no-window -no-audio -debug-init
  • Overwrite: true
  • CustomConfig:
    image.sysdir.1=system-images/android-28/google_apis/x86/
    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
    Ensure sdk packages: [tools platform-tools system-images;android-28;google_apis;x86]
  • Done
    Create AVD
  • Done
    Start emulator
  • Device with serial: emulator-5554 started
  • Done
    | |
    ±–±--------------------------------------------------------------±---------+
    | ✓ | avd-manager@0.9.2 | 57 sec |
    ±–±--------------------------------------------------------------±---------+

    ±-----------------------------------------------------------------------------+

| (5) wait-for-android-emulator@1.0.4 |
±-----------------------------------------------------------------------------+
| id: wait-for-android-emulator |
| version: 1.0.4 |
| collection: GitHub - bitrise-io/bitrise-steplib: New Bitrise StepLib |
| toolkit: go |
| time: 2018-11-19T10:12:15Z |
±-----------------------------------------------------------------------------+
| |
INFO[10:12:15] Start installing (golang) with apt-get
INFO[10:12:15] * [OK] Step dependency (go) installed, available.
Configs:

  • emulatorSerial: emulator-5554
  • bootTimeout: 1000
  • AndroidHome: /opt/android-sdk-linux
    Waiting for emulator boot

Checking if device booted…
Checking if device booted…
Checking if device booted…
Checking if device booted…
Running command timed out, retry…
Failed to check emulator boot status, error: * daemon not running; starting now at tcp:5037

  • daemon started successfully
    error: device offline - exit status 1
    | |
    ±–±--------------------------------------------------------------±---------+
    | x | wait-for-android-emulator@1.0.4 (exit code: 1) | 50 sec |
    ±–±--------------------------------------------------------------±---------+
    | Issue tracker: …com/bitrise-steplib/steps-wait-for-android-emulator/issues |
    | Source: GitHub - bitrise-steplib/steps-wait-for-android-emulator |
    ±–±--------------------------------------------------------------±---------+

Hi @Sumitbera, sorry to hear about the issue. Can you please include a build URL about the issue as well?

Hi @bitce Thanks for your quick response. Please see the build URL https://app.bitrise.io/build/577d88c6045863c4
Let me know in case you need anything else such as YML file.

Hello there @Sumitbera!

The build URL You sent us is a different build I think for this is a time out on a custom step called bitrise-step-update-jira-issue-field

but for the testing issue I would recommend this tutorial on the Virtual Device Test for Android tutorial of ours.

https://devcenter.bitrise.io/testing/device-testing-for-android/

as far as experience goes, this practice is much more reliable than avd manager.

@fehersanyi-bitrise There are two workflows in the build url

  1. deploy
  2. build_test
    build_test depends on execution of deploy.
    Can you see those workflows ? Because the issue is happening in build_test workflow.
    For the custom step of bitrise-step-update-jira-issue-field we don’t have any issues as it is just a warning.
    One thing I would like to know here can we install the apk generated in run-time from a workflow to a virtual device if we use Virtual Device Test for Android?

@Sumitbera

this is a log of the report-test workflow.
yes you absolutely do that in that step :upside_down_face:

Hi @fehersanyi-bitrise I checked the documentation and step of "Virtual Device Test ". Does it return emulator $BITRISE_EMULATOR_SERIAL ? As this is important for me to tell my appium test automation script to refer the current running emulator.
That’s the reason I was using AVD Manager step or Create & Wait for emulator step.
Do let me know if there is anyway I can handle this.

VDT step operates on Firebase test lab: https://firebase.google.com/docs/test-lab/android/avds
Those devices are not connected with CI environment.

Make sense and understood your point. That means I’ve to realia on AVD Manager step since the objective is to run automation tests. I’ve tried both AVD Manager and Create Emulator->Start Emulator->Wait for Booting. Still the emulators are not booting in both ways. This was happening till last week very strange.

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