Cannot start android emulator, no error message

I cannot start the emulator after successfully creating it. There is no way for me to debug the core dump because it is not logged. This is on the stack Android & Docker, on Ubuntu 16.04. It tells me I may be on the wrong stack but does not tell me what the right stack would be.

Configs:

  • Name: test_avd11
  • Platform: android-26
  • Abi: x86
  • Tag: google_apis
  • Options:
  • AndroidHome: /opt/android-sdk-linux
  • CustomHardwareProfileContent:
    Check if platform installed
    installed: true
    Check if system image installed
    Checking path: system-images/android-26/google_apis/x86
    installed: true

Configs:

  • EmulatorName: test_avd11
  • Skin: 768x1280
  • EmulatorOptions: -no-boot-anim -verbose
  • AndroidHome: /opt/android-sdk-linux
  • WaitForBoot: false
  • BootTimeout: 1600
    Validate AVD image
    AVD image (test_avd11) exist
    Start AVD image
    $ /opt/android-sdk-linux/emulator/emulator “-avd” “test_avd11” “-skin” “768x1280” “-no-boot-anim” “-verbose”

Checking for started device serial…
Checking for started device serial…
Failed to start emultor, error: signal: segmentation fault (core dumped)

When I try arm instead with the following configs it is created successfully but still cannot start
Configs:

  • Name: test_avd10
  • Platform: android-21
  • Abi: armeabi-v7a
  • Tag: default
  • Options:
  • AndroidHome: /opt/android-sdk-linux
  • CustomHardwareProfileContent:

Configs:

  • EmulatorName: test_avd10
  • Skin: 768x1280
  • EmulatorOptions: -no-boot-anim -verbose
  • AndroidHome: /opt/android-sdk-linux
  • WaitForBoot: false
  • BootTimeout: 1600
    Validate AVD image
    AVD image (test_avd10) exist
    Start AVD image
    $ /opt/android-sdk-linux/emulator/emulator64-arm “-avd” “test_avd10” “-skin” “768x1280” “-no-boot-anim” “-verbose”
    Failed to start emultor, error: signal: segmentation fault (core dumped)

Curiously, it’s running emulator64-arm when I would expect it to use the emulator command.

What emulator can work on your stack without the no-window option?

Hi @sbaar1,

Can you please copy paste the related build’s bitrise.io URL? We’ll need a bit more info.

The previous builds are all tweaks in emulator api level, abi, and tag to see if any of those would work. Also, the emulator launches and executes the tests when run locally on OS X x86_64 android-21
@viktorbenei

I see you changed the emulator_options input of the start-android-emulator step - can you please include -no-window in it? It’s -no-boot-anim -verbose right now.

Thanks, this solved the problem. I must have disabled it trying to fix something else and didn’t realize it was needed.

1 Like

Yeah, the “right” options for the Android Emulator changed quite a few times in the past; AFAIK if you can use -no-window then you should, that was always one of the most reliable options.

Hi @viktorbenei

I might have the same issue

$ /opt/android-sdk-linux/emulator/emulator64-arm "-avd" "Nexus242" "-skin" "768x1280" "-no-boot-anim" "-no-window" "-verbose" "-gpu" "on"

Failed to start emultor, error: signal: segmentation fault (core dumped)

Builds start failing after Nov 17. I see that agent version and bitrise version updated (0.4.10 → 0.5.0 and 1.23.0 → 1.24.0)

Last succeed build

First failed build

Hello @vixentael!

Could you swap out the Start Android emulator step to the avd manager step? for the first one is a deprecated tool.
Or, here is Our guide to device testing on Android: https://devcenter.bitrise.io/testing/device-testing-for-android/