• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • OSX: 10.10, Jenkins ver. 1.598, Android Emulator Plugin 2.12, Android Platform Tools 21

      [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

          [JENKINS-26893] Unable to run emulator-arm to start emulator

          Thanks thats great. Do you know which version it will be fixed in and when will it be released?

          Wesley Archbell added a comment - Thanks thats great. Do you know which version it will be fixed in and when will it be released?

          It will be fixed in the next release, which I'm hoping to do within a week — I have some larger changes that need to be tested first.

          In the meantime, you can try installing the latest build, which has this fix included. You can find the .hpi file which you can upload via the Jenkins web UI here:
          https://jenkins.ci.cloudbees.com/job/plugins/job/android-emulator-plugin/lastSuccessfulBuild/org.jenkins-ci.plugins$android-emulator/

          Alternatively, you can make a symlink in your Android SDK directory so that emulator-arm appears to exist:
          cd /Users/wesley/apps/android/sdk/tools; ln -s emulator64-arm emulator-arm

          Christopher Orr added a comment - It will be fixed in the next release, which I'm hoping to do within a week — I have some larger changes that need to be tested first. In the meantime, you can try installing the latest build, which has this fix included. You can find the .hpi file which you can upload via the Jenkins web UI here: https://jenkins.ci.cloudbees.com/job/plugins/job/android-emulator-plugin/lastSuccessfulBuild/org.jenkins-ci.plugins$android-emulator/ Alternatively, you can make a symlink in your Android SDK directory so that emulator-arm appears to exist: cd /Users/wesley/apps/android/sdk/tools; ln -s emulator64-arm emulator-arm

          Yep i was using the symlink in the past. Thanks

          Wesley Archbell added a comment - Yep i was using the symlink in the past. Thanks

          I know this is a separate issue but when will we be able to run this plugin against HAXM emulator?

          Wesley Archbell added a comment - I know this is a separate issue but when will we be able to run this plugin against HAXM emulator?

          That has always been possible (well, since shortly after HAXM appeared). Are you having problems starting an x86 emulator?

          Christopher Orr added a comment - That has always been possible (well, since shortly after HAXM appeared). Are you having problems starting an x86 emulator?

          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

          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

          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'

          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.

          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.

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

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

              Created:
              Updated:
              Resolved: