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

Emulator startup shouldn't fail when .ini is missing

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      17:14:47  [android] Starting Android emulator
      17:14:47  [android] Erasing existing emulator data...
      17:14:47  $ /Users/buildserver/Android/sdk/tools/emulator -no-boot-anim -ports 58108,58109 -prop persist.sys.language=en -prop persist.sys.country=US -avd hudson_en-US_160_841x490_android-7 -no-snapshot-load -no-snapshot-save -wipe-data -no-window -no-snapshot-update-time
      17:14:50  PANIC: Could not open: /tmp/jenkins-root-ssh/workspace/client_android_staging_test/.android/avd/hudson_en-US_160_841x490_android-7.ini* daemon not running. starting it now on port 58110 *
      17:14:50  * daemon started successfully *
      17:15:52  [android] Emulator did not appear to start; giving up
      

      I'm guessing the code tests for a .avd but not a .ini - I don't know how my machine managed to end up with only a .avd (I checked, and it existed), but in that scenario, the plugin should probably recreate the emulator (android create avd -f).

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          The command used for that AVD would be (assuming an SD card of 16MB):

          android create avd -a -c 16M -s WVGA -n hudson_en-US_160_WVGA_Google_Inc._Google_APIs_7.avd -t "Google Inc.:Google APIs:7"

          Show
          orrc Christopher Orr added a comment - The command used for that AVD would be (assuming an SD card of 16MB): android create avd -a -c 16M -s WVGA -n hudson_en-US_160_WVGA_Google_Inc._Google_APIs_7.avd -t "Google Inc.:Google APIs:7"
          Hide
          francisdb francisdb added a comment -

          I found the issue

          /opt/android-sdk-linux/tools/android create avd -a -c 16M -s WVGA -n hudson_en-US_160_WVGA_Google_Inc._Google_APIs_7.avd -t "Google Inc.:Google APIs:7"
          Valid skins: WVGA854, WQVGA400, HVGA, WQVGA432, QVGA, WVGA800 (default)
          Error: 'WVGA' is not a valid skin name or size (NNNxMMM)
          

          After that I tried this on the console:

          /opt/android-sdk-linux/tools/android create avd -a -c 16M -s WVGA800 -n hudson_en-US_160_WVGA_Google_Inc._Google_APIs_7.avd -t "Google Inc.:Google APIs:7"
          Auto-selecting single ABI armeabi
          Error: Unable to find a '/opt/android-sdk-linux/tools/lib/emulator/snapshots.img' file to copy into the AVD folder.
          

          This was a permission issue where the folder was not accessible (missing +x persmission).

          Could you make sure the plugin shows the error output in the future?

          Show
          francisdb francisdb added a comment - I found the issue /opt/android-sdk-linux/tools/android create avd -a -c 16M -s WVGA -n hudson_en-US_160_WVGA_Google_Inc._Google_APIs_7.avd -t "Google Inc.:Google APIs:7" Valid skins: WVGA854, WQVGA400, HVGA, WQVGA432, QVGA, WVGA800 ( default ) Error: 'WVGA' is not a valid skin name or size (NNNxMMM) After that I tried this on the console: /opt/android-sdk-linux/tools/android create avd -a -c 16M -s WVGA800 -n hudson_en-US_160_WVGA_Google_Inc._Google_APIs_7.avd -t "Google Inc.:Google APIs:7" Auto-selecting single ABI armeabi Error: Unable to find a '/opt/android-sdk-linux/tools/lib/emulator/snapshots.img' file to copy into the AVD folder. This was a permission issue where the folder was not accessible (missing +x persmission). Could you make sure the plugin shows the error output in the future?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java
          http://jenkins-ci.org/commit/android-emulator-plugin/21b1693bafc80a989a31f7b08290f9492ed1d4c1
          Log:
          [FIXED JENKINS-12120] Check for config.ini before starting or after creating AVD.

          Also show error output if AVD creation fails for some unknown reason.

          This allows the plugin to detect and recover from incorrectly-created AVDs;
          existing AVDs found without a config.ini file will be replaced with a new AVD.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java http://jenkins-ci.org/commit/android-emulator-plugin/21b1693bafc80a989a31f7b08290f9492ed1d4c1 Log: [FIXED JENKINS-12120] Check for config.ini before starting or after creating AVD. Also show error output if AVD creation fails for some unknown reason. This allows the plugin to detect and recover from incorrectly-created AVDs; existing AVDs found without a config.ini file will be replaced with a new AVD.
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_android-emulator #28
          [FIXED JENKINS-12120] Check for config.ini before starting or after creating AVD. (Revision 21b1693bafc80a989a31f7b08290f9492ed1d4c1)

          Result = SUCCESS
          Christopher Orr :
          Files :

          • src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_android-emulator #28 [FIXED JENKINS-12120] Check for config.ini before starting or after creating AVD. (Revision 21b1693bafc80a989a31f7b08290f9492ed1d4c1) Result = SUCCESS Christopher Orr : Files : src/main/java/hudson/plugins/android_emulator/EmulatorConfig.java
          Hide
          orrc Christopher Orr added a comment -

          This has been released in version 2.2 of the plugin.

          Show
          orrc Christopher Orr added a comment - This has been released in version 2.2 of the plugin.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              jorgenpt Jørgen Tjernø
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: