Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14901

Emulator start failed on Ubuntu (SDK 20.0.3)

    XMLWordPrintable

Details

    Description

      This problem seems to be an Ubuntu clone of JENKINS-10815.

      The relevant portion of my build transcript:
      =============================================
      $ /usr/android/tools/android list target
      [android] Using Android SDK: /usr/android
      $ /usr/android/platform-tools/adb start-server
      [android] Starting Android emulator
      [android] Erasing existing emulator data...
      $ /usr/android/tools/emulator -no-boot-anim -ports 38413,41117 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_HVGA_android-8 -no-snapshot-load -no-snapshot-save -wipe-data -no-window

      • daemon not running. starting it now on port 33846 *
      • daemon started successfully *
        [android] Emulator did not appear to start; giving up
        $ /usr/android/platform-tools/adb disconnect localhost:41117
        [android] Stopping Android emulator
        $ /usr/android/platform-tools/adb kill-server
        ==============================================

      I tried running the emulator manually as the same user and I got an Google/Android "Send usage" window. I acknowledged this thinking that perhaps the plugin was hanging on this dialog. When that didn't seem to fix the problem I hunted around more and found JENKINS-10815. I tried moving the emulator to emulator.orig and then linking emulator-arm to the name emulator. The resulting build had different errors, but it seemed to successfully detect the running emulator.

      After the above work-around
      ===============================================
      $ /usr/android/tools/android list target
      [android] Using Android SDK: /usr/android
      [android] Creating Android AVD: /home/hudson/.android/avd/hudson_en-US_160_HVGA_android-8.avd
      [android] /usr/android/tools/android create avd -f -a -s HVGA -n hudson_en-US_160_HVGA_android-8 -t android-8
      $ /usr/android/platform-tools/adb start-server
      $ /usr/android/tools/emulator -snapshot-list -no-window -avd hudson_en-US_160_HVGA_android-8
      [android] Starting Android emulator and creating initial snapshot
      $ /usr/android/tools/emulator -no-boot-anim -ports 56650,46980 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_HVGA_android-8 -no-snapshot-load -no-snapshot-save -wipe-data -no-window
      waitpid(): No child processes
      emulator: ERROR: Could not load OpenGLES emulation library: libOpenglRender.so: cannot open shared object file: No such file or directory
      emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.

      • daemon not running. starting it now on port 39329 *
      • daemon started successfully *

      $ /usr/android/platform-tools/adb connect localhost:46980
      [android] Waiting for emulator to finish booting...
      $ /usr/android/platform-tools/adb -s localhost:46980 shell getprop dev.bootcomplete

      $ /usr/android/platform-tools/adb connect localhost:46980

      $ /usr/android/platform-tools/adb -s localhost:46980 shell getprop dev.bootcomplete

      $ /usr/android/platform-tools/adb connect localhost:46980

      $ /usr/android/platform-tools/adb -s localhost:46980 shell getprop dev.bootcomplete
      $ /usr/android/platform-tools/adb disconnect localhost:46980
      $ /usr/android/platform-tools/adb connect localhost:46980

      $ /usr/android/platform-tools/adb -s localhost:46980 shell getprop dev.bootcomplete
      $ /usr/android/platform-tools/adb -s localhost:46980 logcat -v time
      [android] Giving the system some time to settle before creating initial snapshot...

      $ /usr/android/platform-tools/adb connect localhost:46980
      $ /usr/android/platform-tools/adb -s localhost:46980 logcat -c
      $ /usr/android/platform-tools/adb -s localhost:46980 shell log -p v -t Jenkins "Creating snapshot..."
      [android] Creating snapshot...

      $ /usr/android/platform-tools/adb connect localhost:46980
      [android] Emulator is ready for use (took 86 seconds)
      ================================================

      Attachments

        Activity

          I just discovered the pull request from Nicolas (and fixed my GitHub notification settings)...

          I guess this shouldn't have any adverse affects on non-Linux systems, but I'll try and give it a quick test before the next release.
          Have you guys managed to test this patch on other systems at all?

          orrc Christopher Orr added a comment - I just discovered the pull request from Nicolas (and fixed my GitHub notification settings)... I guess this shouldn't have any adverse affects on non-Linux systems, but I'll try and give it a quick test before the next release. Have you guys managed to test this patch on other systems at all?

          The pull request code did not work for me but I got the following error:

          Starting xvnc
          [tests] $ vncserver :10 -localhost -nolisten tcp

          New 'X' desktop is madmax2.ecolane.com:10

          Starting applications specified in /var/lib/jenkins/.vnc/xstartup
          Log file is /var/lib/jenkins/.vnc/madmax2.ecolane.com:10.log

          [android] Using Android SDK: /opt/adt-bundle-linux-x86_64/sdk
          [android] Waiting 30 seconds before starting emulator...
          $ /opt/adt-bundle-linux-x86_64/sdk/platform-tools/adb start-server
          [android] Starting Android emulator
          $ /opt/adt-bundle-linux-x86_64/sdk/tools/emulator -no-boot-anim -ports 32988,58093 -avd Android2.3GoogleAPIs -no-snapshot-load -no-snapshot-save
          SDL init failure, reason is: No available video device

          • daemon not running. starting it now on port 5037 *
          • daemon started successfully *

          [android] Emulator did not appear to start; giving up

          matti Matti Linnanvuori added a comment - The pull request code did not work for me but I got the following error: Starting xvnc [tests] $ vncserver :10 -localhost -nolisten tcp New 'X' desktop is madmax2.ecolane.com:10 Starting applications specified in /var/lib/jenkins/.vnc/xstartup Log file is /var/lib/jenkins/.vnc/madmax2.ecolane.com:10.log [android] Using Android SDK: /opt/adt-bundle-linux-x86_64/sdk [android] Waiting 30 seconds before starting emulator... $ /opt/adt-bundle-linux-x86_64/sdk/platform-tools/adb start-server [android] Starting Android emulator $ /opt/adt-bundle-linux-x86_64/sdk/tools/emulator -no-boot-anim -ports 32988,58093 -avd Android2.3GoogleAPIs -no-snapshot-load -no-snapshot-save SDL init failure, reason is: No available video device daemon not running. starting it now on port 5037 * daemon started successfully * [android] Emulator did not appear to start; giving up
          achuinard Tony Chuinard added a comment -

          Adding the -noaudio emulator option fixed this for me

          achuinard Tony Chuinard added a comment - Adding the -noaudio emulator option fixed this for me

          Seems to be fixed since the patch above was merged.
          Other bugs appear to be due to the emulator binary (i.e. out of our control), for which there are workarounds noted above (different emulator binaries, or emulator flags).

          orrc Christopher Orr added a comment - Seems to be fixed since the patch above was merged. Other bugs appear to be due to the emulator binary (i.e. out of our control), for which there are workarounds noted above (different emulator binaries, or emulator flags).

          Marking old "resolved" issues as "closed".

          orrc Christopher Orr added a comment - Marking old "resolved" issues as "closed".

          People

            orrc Christopher Orr
            josht Joshua Tharp
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: