-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
Windows10, Jenkins2.7.1, Android Emulator 2.15, Appium 1.5.3
The emulator created successfully and appium services started. Appium detects the device also.
$ F:\Android\sdk/tools/android.bat list target [android] Using Android SDK: F:\Android\sdk $ F:\Android\sdk/platform-tools/adb.exe start-server * daemon not running. starting it now on port 5818 * * daemon started successfully * $ F:\Android\sdk/platform-tools/adb.exe start-server [android] Starting Android emulator $ F:\Android\sdk/tools/emulator.exe -engine classic -ports 5754,5755 -report-console tcp:5866,max=60 -avd Android_5_0_API_21 -no-snapshot-load -no-snapshot-save emulator: WARNING: VM heap size set below hardware specified minimum of 192MB emulator: WARNING: Setting VM heap size to 384MB emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored. emulator: device fd:1172 HAXM is working and emulator runs in fast virt mode [android] Emulator reported that the console is available on port 5,754 [android] Waiting for emulator to finish booting... $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop init.svc.bootanim Your emulator is out of date, please update by launching Android Studio: - Start Android Studio - Select menu "Tools > Android > SDK Manager" - Click "SDK Tools" tab - Check "Android SDK Tools" checkbox - Click "OK" [android] Emulator reported that the startup process is 'running' $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop init.svc.bootanim [android] Emulator reported that the startup process is 'running' $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop init.svc.bootanim [android] Emulator reported that the startup process is 'running' $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 wait-for-device shell getprop init.svc.bootanim [android] Emulator reported that the startup process is 'stopped' $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 logcat -v time [android] Attempting to unlock emulator screen $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 shell input keyevent 82 $ F:\Android\sdk/platform-tools/adb.exe -s emulator-5754 shell input keyevent 4 [android] Emulator is ready for use (took 68 seconds) F:\jenkins\workspace\OmnirentApp_Testing\AndroidBuild\Windows_Dell>START /B CMD /K CALL "C:\Program Files\nodejs\node_modules\.bin\appium" --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color F:\jenkins\workspace\OmnirentApp_Testing\AndroidBuild\Windows_Dell>ping -n 40 127.0.0.1 1>nul [Appium] Welcome to Appium v1.5.3 [Appium] Non-default server args: [Appium] address: '127.0.0.1' [Appium] logNoColors: true [Appium] platformName: 'Android' [Appium] platformVersion: '23' [Appium] automationName: 'Appium' [Appium] Deprecated server args: [Appium] --platform-name => --default-capabilities '{"platformName":"Android"}' [Appium] --platform-version => --default-capabilities '{"platformVersion":"23"}' [Appium] --automation-name => --default-capabilities '{"automationName":"Appium"}' [Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities: [Appium] platformName: 'Android' [Appium] platformVersion: '23' [Appium] automationName: 'Appium' [Appium] Appium REST http interface listener started on 127.0.0.1:4723
However i get following error when adb tries to get the platform version.
[ADB] Checking whether adb is present [ADB] Using adb.exe from F:\Android\sdk\platform-tools\adb.exe [AndroidDriver] Retrieving device list [debug] [ADB] Trying to find a connected android device [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [AndroidDriver] Looking for a device with Android 5.0 [debug] [ADB] Setting device id to emulator-5754 [ADB] Getting device platform version [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running F:\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","emulator-5754","shell","getprop","ro.build.version.release"] [debug] [ADB] Running F:\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","emulator-5754","shell","getprop","ro.build.version.release"] [ADB] Error: Error getting device platform version. Original error: Error executing adbExec. Original error: Command 'F:\\Android\\sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5754 shell getprop ro.build.version.release' exited with code 1{"stdout":"","stderr":"error: device 'emulator-5754' not found\r\n","code":1}
Same issue is not reproducible if i run these commands manually.
It fails only when running through jenkins.
Also is there an option/settings to suppress the emulator not to generate ports dynamically?