• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Ubuntu 12.04

      Apparently a separator fix for latest version (2.11.1) broke how paths are built, and this leads to failed builds on Linux slaves.

      2.10:
      [android] Ensuring platform(s) are installed: [android-8, android-19]
      $ /home/jenkins/android-sdk-linux/tools/android list target

      2.11.1:
      [android] Ensuring platform(s) are installed: [android-8, android-19]
      $ /home/jenkins/android-sdk-linux\tools\android list target
      FATAL: Cannot run program "/home/jenkins/android-sdk-linux\tools\android": error=2, No such file or directory
      java.io.IOException: Cannot run program "/home/jenkins/android-sdk-linux\tools\android": error=2, No such file or directory

          [JENKINS-23134] Mixed separators fail for Linux paths

          Hi,
          any word on this?

          I am currently stuck because latest won't work on my linux slaves without this regression fixed, while the old version doesn't work anymore since Google introduced brackets in their image names :/
          id: 16 or "Google Inc.:Google APIs (x86 System Image):19"
          Name: Google APIs (x86 System Image)
          When creating a new image of course the file system doesn't allow brackets. Is new version able to cope with that btw?

          Diego Costantini added a comment - Hi, any word on this? I am currently stuck because latest won't work on my linux slaves without this regression fixed, while the old version doesn't work anymore since Google introduced brackets in their image names :/ id: 16 or "Google Inc.:Google APIs (x86 System Image):19" Name: Google APIs (x86 System Image) When creating a new image of course the file system doesn't allow brackets. Is new version able to cope with that btw?

          I think the problem has been introduced long ago (short after 2.10 release) in this commit:
          https://github.com/jenkinsci/android-emulator-plugin/commit/d49096f96884b9ac405c988afa32f467de750d82

          Before, the slashes were hardcoded, now apparently somewhere File.separator returns backslashes, but I couldn't find where, and I don't have the environment to try to debug it myself.

          Diego Costantini added a comment - I think the problem has been introduced long ago (short after 2.10 release) in this commit: https://github.com/jenkinsci/android-emulator-plugin/commit/d49096f96884b9ac405c988afa32f467de750d82 Before, the slashes were hardcoded, now apparently somewhere File.separator returns backslashes, but I couldn't find where, and I don't have the environment to try to debug it myself.

          I worked around the issue by rolling back some line to hardcoded slashes, but before doing that, I saw that tests (on the plugin code) with slashes on Windows fail.
          I supposed they were performed only on Linux (or Mac), nevertheless, I don't know why on my Linux slaves I get backslashes...

          Diego Costantini added a comment - I worked around the issue by rolling back some line to hardcoded slashes, but before doing that, I saw that tests (on the plugin code) with slashes on Windows fail. I supposed they were performed only on Linux (or Mac), nevertheless, I don't know why on my Linux slaves I get backslashes...

          Barak Weiss added a comment -

          I have the same problem. When I run the groovy script "println File.separator" it prints the correct slash. How's that possible?

          Barak Weiss added a comment - I have the same problem. When I run the groovy script "println File.separator" it prints the correct slash. How's that possible?

          Josh Cohen added a comment -

          Was anyone able to resolve this issue? This is a big problem for the tests running on my Linux slaves.

          Josh Cohen added a comment - Was anyone able to resolve this issue? This is a big problem for the tests running on my Linux slaves.

          I haven't been able to reproduce this problem so far.

          For people having this issue, what OS is the master running on, and where are builds running? If on separate slaves, which OS are they using?

          Christopher Orr added a comment - I haven't been able to reproduce this problem so far. For people having this issue, what OS is the master running on, and where are builds running? If on separate slaves, which OS are they using?

          Josh Cohen added a comment -

          The master is running Windows, and I have two slaves (one Linux and one Mac OSX) running builds.

          Josh Cohen added a comment - The master is running Windows, and I have two slaves (one Linux and one Mac OSX) running builds.

          Windows master, 2 Ubuntu slaves.

          Diego Costantini added a comment - Windows master, 2 Ubuntu slaves.

          I rebuilt with some ugly temporary fix just to get going.
          If you are interested until a proper fix is out, here they are:
          https://github.com/cowst/android-emulator-plugin/tree/slash-workaround

          Diego Costantini added a comment - I rebuilt with some ugly temporary fix just to get going. If you are interested until a proper fix is out, here they are: https://github.com/cowst/android-emulator-plugin/tree/slash-workaround

          Sorry for the delay everyone.

          I'll get my hands on a Windows machine this week and get this fixed.

          Christopher Orr added a comment - Sorry for the delay everyone. I'll get my hands on a Windows machine this week and get this fixed.

          The same here with the latest Jenkins LTS version 1.580.1 and android-emulator-plugin version 2.12.
          It was fine with the previous version of android-emulator-plugin 2.10 and Jenkins LTS 1.565.1.
          The master is a windows and the slave is OS X.

          > git clean -fdx # timeout=10
          $ /opt/dailybuild/android/sdk\tools\android list target
          FATAL: Cannot run program "/opt/dailybuild/android/sdk\tools\android": error=2, No such file or directory
          java.io.IOException: Cannot run program "/opt/dailybuild/android/sdk\tools\android": error=2, No such file or directory

          Nicolae Ghimbovschi added a comment - The same here with the latest Jenkins LTS version 1.580.1 and android-emulator-plugin version 2.12. It was fine with the previous version of android-emulator-plugin 2.10 and Jenkins LTS 1.565.1. The master is a windows and the slave is OS X. > git clean -fdx # timeout=10 $ /opt/dailybuild/android/sdk\tools\android list target FATAL: Cannot run program "/opt/dailybuild/android/sdk\tools\android": error=2, No such file or directory java.io.IOException: Cannot run program "/opt/dailybuild/android/sdk\tools\android": error=2, No such file or directory

          Nicolae Ghimbovschi added a comment - - edited

          Also, adb -s emulator-5834 shell getprop dev.bootcomplete does not work on OSX.
          It works only with adb connect localhost:5834

          Nicolae Ghimbovschi added a comment - - edited Also, adb -s emulator-5834 shell getprop dev.bootcomplete does not work on OSX. It works only with adb connect localhost:5834

          So I did a terrible job of reviewing the code that caused this bug, and a terrible job of fixing it so far.

          I've been working on some other fixes and will do a release soon. So I will merge and test this pull request which should fix this issue: https://github.com/jenkinsci/android-emulator-plugin/pull/44

          Christopher Orr added a comment - So I did a terrible job of reviewing the code that caused this bug, and a terrible job of fixing it so far. I've been working on some other fixes and will do a release soon. So I will merge and test this pull request which should fix this issue: https://github.com/jenkinsci/android-emulator-plugin/pull/44

          Code changed in jenkins
          User: Dave Brown
          Path:
          src/main/java/hudson/plugins/android_emulator/sdk/DefaultToolLocator.java
          src/main/java/hudson/plugins/android_emulator/sdk/PlatformToolLocator.java
          http://jenkins-ci.org/commit/android-emulator-plugin/28f76bb7acfd96a16a1eb5626b2527ad9b96856f
          Log:
          JENKINS-23134 Replace File.separator with "/".

          When using this plugin on a Windows master delegating to a Unix slave
          File.separator resolves to "
          " resulting in erroneous paths.

          Signed-off-by: Dave Brown <d.brown@bigdavedev.com>

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Dave Brown Path: src/main/java/hudson/plugins/android_emulator/sdk/DefaultToolLocator.java src/main/java/hudson/plugins/android_emulator/sdk/PlatformToolLocator.java http://jenkins-ci.org/commit/android-emulator-plugin/28f76bb7acfd96a16a1eb5626b2527ad9b96856f Log: JENKINS-23134 Replace File.separator with "/". When using this plugin on a Windows master delegating to a Unix slave File.separator resolves to " " resulting in erroneous paths. Signed-off-by: Dave Brown <d.brown@bigdavedev.com>

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/hudson/plugins/android_emulator/sdk/DefaultToolLocator.java
          src/main/java/hudson/plugins/android_emulator/sdk/PlatformToolLocator.java
          http://jenkins-ci.org/commit/android-emulator-plugin/98d2a53130cb7165b80e08b2496822ec20bbda68
          Log:
          Merge pull request #44 from bigdavedev/master

          [FIXED JENKINS-23134] Replace File.separator with "/".

          Fixes inability to launch Android tools on Unix slaves from a Windows master.

          Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/a0589ce14556...98d2a53130cb

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/sdk/DefaultToolLocator.java src/main/java/hudson/plugins/android_emulator/sdk/PlatformToolLocator.java http://jenkins-ci.org/commit/android-emulator-plugin/98d2a53130cb7165b80e08b2496822ec20bbda68 Log: Merge pull request #44 from bigdavedev/master [FIXED JENKINS-23134] Replace File.separator with "/". Fixes inability to launch Android tools on Unix slaves from a Windows master. Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/a0589ce14556...98d2a53130cb

          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
            cowst Diego Costantini
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: