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

Unable to run emulator-arm to start emulator

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • OSX: 10.10, Jenkins ver. 1.598, Android Emulator Plugin 2.12, Android Platform Tools 21

    Description

      [android] Using Android SDK: /Users/dev/android-sdk-macosx
      $ /Users/dev/android-sdk-macosx/platform-tools/adb start-server

      • daemon not running. starting it now on port 5585 *
      • daemon started successfully *
        $ /Users/dev/android-sdk-macosx/platform-tools/adb start-server
        $ /Users/dev/android-sdk-macosx/tools/emulator-arm -snapshot-list -no-window -avd ARM_Emulator
        FATAL: Cannot run program "/Users/dev/android-sdk-macosx/tools/emulator-arm": error=2, No such file or directory
        java.io.IOException: Cannot run program "/Users/dev/android-sdk-macosx/tools/emulator-arm": error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
        at hudson.Proc$LocalProc.<init>(Proc.java:244)
        at hudson.Proc$LocalProc.<init>(Proc.java:216)
        at hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
        at hudson.Launcher$ProcStarter.start(Launcher.java:381)
        at hudson.Launcher$ProcStarter.join(Launcher.java:388)
        at hudson.plugins.android_emulator.util.Utils.runAndroidTool(Utils.java:425)
        at hudson.plugins.android_emulator.util.Utils.runAndroidTool(Utils.java:403)
        at hudson.plugins.android_emulator.EmulatorConfig.hasExistingSnapshot(EmulatorConfig.java:357)
        at hudson.plugins.android_emulator.AndroidEmulator.doSetUp(AndroidEmulator.java:312)
        at hudson.plugins.android_emulator.AndroidEmulator.setUp(AndroidEmulator.java:263)
        at hudson.model.Build$BuildExecution.doRun(Build.java:154)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
        at hudson.model.Run.execute(Run.java:1718)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:89)
        at hudson.model.Executor.run(Executor.java:240)
        Caused by: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:184)
        at java.lang.ProcessImpl.start(ProcessImpl.java:130)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
        ... 16 more

      Attachments

        Activity

          I can see it start the emulator on mac mini but even once its started, the logs still indicate the device is offline even though emulator has started..

          $ /Users/dev/android-sdk-macosx/tools/android list target
          [android] Using Android SDK: /Users/dev/android-sdk-macosx
          $ /Users/dev/android-sdk-macosx/platform-tools/adb start-server

          • daemon not running. starting it now on port 5799 *
          • daemon started successfully *
            $ /Users/dev/android-sdk-macosx/platform-tools/adb start-server
            [android] Starting Android emulator
            [android] Erasing existing emulator data...
            $ /Users/dev/android-sdk-macosx/tools/emulator -no-boot-anim -ports 5797,5798 -avd HAXM_Emulator -no-snapshot-load -no-snapshot-save -wipe-data
            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
            HAX is working and emulator runs in fast virt mode
            $ /Users/dev/android-sdk-macosx/platform-tools/adb connect emulator-5797
            [android] Waiting for emulator to finish booting...
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
            $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete
            error: device offline
          wesleyarchbell Wesley Archbell added a comment - I can see it start the emulator on mac mini but even once its started, the logs still indicate the device is offline even though emulator has started.. $ /Users/dev/android-sdk-macosx/tools/android list target [android] Using Android SDK: /Users/dev/android-sdk-macosx $ /Users/dev/android-sdk-macosx/platform-tools/adb start-server daemon not running. starting it now on port 5799 * daemon started successfully * $ /Users/dev/android-sdk-macosx/platform-tools/adb start-server [android] Starting Android emulator [android] Erasing existing emulator data... $ /Users/dev/android-sdk-macosx/tools/emulator -no-boot-anim -ports 5797,5798 -avd HAXM_Emulator -no-snapshot-load -no-snapshot-save -wipe-data 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 HAX is working and emulator runs in fast virt mode $ /Users/dev/android-sdk-macosx/platform-tools/adb connect emulator-5797 [android] Waiting for emulator to finish booting... $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline $ /Users/dev/android-sdk-macosx/platform-tools/adb -s emulator-5797 shell getprop dev.bootcomplete error: device offline

          See attachment for plugin configuration. I know the existing emulator works because if i start it manually via AVD it works fine and tests run successfully against it

          wesleyarchbell Wesley Archbell added a comment - See attachment for plugin configuration. I know the existing emulator works because if i start it manually via AVD it works fine and tests run successfully against it

          Also tried setting the 'Emulator executable' Advanced option to emulator-arm (which is a symlink to emulator64-arm) but it still called the 'emulator' executable instead of 'emulator-arm'

          wesleyarchbell Wesley Archbell added a comment - Also tried setting the 'Emulator executable' Advanced option to emulator-arm (which is a symlink to emulator64-arm) but it still called the 'emulator' executable instead of 'emulator-arm'

          That's JENKINS-11952, for which I'm going to publish a fix today and try and get people to test it out.

          orrc Christopher Orr added a comment - That's JENKINS-11952 , for which I'm going to publish a fix today and try and get people to test it out.

          Version 2.13 of the plugin has been released, which includes this fix.

          orrc Christopher Orr added a comment - Version 2.13 of the plugin has been released, which includes this fix.

          People

            orrc Christopher Orr
            wesleyarchbell Wesley Archbell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: