Unable to execute selendroid script on real device

Hi Folks,

We are unable to execute selendroid script on real device. Script works fine on Emulator but, facing an issue with real device.
Configurations:-

  1. Appium:-1.2.4.1
  2. Android version:-4.1.2

Please find the capabilities code:-
File appDir = new File(“C:\AndroidDocuments\Appium_Test\”);
//File app = new File(appDir, “robodemo-sample-1.0.1.apk”);
File app = new File(appDir, “Airfryer.apk”);
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“deviceName”, “4d08d8c26a009000”);
capabilities.setCapability(“automationName”, “Selendroid”);
capabilities.setCapability(“platformVersion”, “4.1.2”);
capabilities.setCapability(“platformName”, “Android”);
capabilities.setCapability(“appPackage”, “com.philips.cl.dl.kitchenappliances.airfryer”);
capabilities.setCapability(“appium-version”, “1.2.4.1”);
capabilities.setCapability(“app”, app.getAbsolutePath());
capabilities.setCapability(CapabilityType.PLATFORM, “WINDOW”);
capabilities.setCapability(“appactivity”, “com.wordpad.Main”);
driver = new AppiumDriver(new URL(“http://127.0.0.1:5552/wd/hub”),
capabilities);

Please find the Appium log:-

Starting Node Server
info: Welcome to Appium v1.2.4 (REV 71584425ecf777349e3215f0f18e71e7782acfb6)
info: Appium REST http interface listener started on 127.0.0.1:5552
info: [debug] Non-default server args: {“app”:“C:\AndroidDocuments\Appium_Test\Airfryer.apk”,“address”:“127.0.0.1”,“port”:5552,“logNoColors”:true,“deviceName”:“4d08d8c26a009000”,“platformName”:“Android”,“platformVersion”:“16”,“automationName”:“Selendroid”,“language”:“en”,“selendroidPort”:5552}
info: Console LogLevel: debug
info: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“appPackage”:“com.philips.cl.dl.kitchenappliances.airfryer”,“app”:“C:\AndroidDocuments\Appium_Test\Airfryer.apk”,“appium-version”:“1.2.4.1”,“appactivity”:“com.wordpad.Main”,“platformVersion”:“4.1.2”,“automationName”:“Selendroid”,“platformName”:“Android”,“deviceName”:“4d08d8c26a009000”,“platform”:“WINDOW”}}e[39m
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, appactivity, platform
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Creating new appium session 186dcb68-246b-4986-a37e-ed8e1543848a
info: [debug] Starting selendroid server
info: [debug] Checking whether selendroid is built yet
info: [debug] Selendroid server exists!
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe
info: [debug] Setting Android Device Language to en
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “setprop persist.sys.language en;”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “stop; sleep 2; setprop sys.boot_completed 0; start”
info: [debug] waiting for reboot, this takes time.
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “getprop sys.boot_completed”
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device 4d08d8c26a009000
info: [debug] Setting device id to 4d08d8c26a009000
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 wait-for-device
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe
info: [debug] hasInternetPermissionFromManifest: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe” dump badging “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe
info: [debug] packageAndLaunchActivityFromManifest: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe” dump badging “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] badging package: com.philips.cl.di.kitchenappliances.airfryer
info: [debug] badging act: com.philips.cl.di.kitchenappliances.views.SplashScreenActivity
info: [debug] Parsed package and activity are: com.philips.cl.di.kitchenappliances.airfryer/com.philips.cl.di.kitchenappliances.views.SplashScreenActivity
info: [debug] Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
info: [debug] Checking signed status of C:\Windows\Temp\selendroid.com.philips.cl.dl.kitchenappliances.airfryer.apk
info: [debug] Checking app cert for C:\Windows\Temp\selendroid.com.philips.cl.dl.kitchenappliances.airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\Windows\Temp\selendroid.com.philips.cl.dl.kitchenappliances.airfryer.apk”
info: [debug] Checking signed status of C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking app cert for C:\AndroidDocuments\Appium_Test\Airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Windows\Temp\selendroid.com.philips.cl.dl.kitchenappliances.airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\Windows\Temp\selendroid.com.philips.cl.dl.kitchenappliances.airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141026-4156-184a8jv.tmp”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141026-4156-5amsu7.tmp”
info: [debug] Rebuilt selendroid apk does not exist, uninstalling any instances of it on device to make way for new one
info: [debug] Uninstalling com.philips.cl.dl.kitchenappliances.airfryer.selendroid
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am force-stop com.philips.cl.dl.kitchenappliances.airfryer.selendroid”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 uninstall com.philips.cl.dl.kitchenappliances.airfryer.selendroid
info: [debug] App was not uninstalled, maybe it wasn’t on device?
info: [debug] Getting install status for com.philips.cl.dl.kitchenappliances.airfryer.selendroid
info: [debug] Getting device API level
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 16
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm list packages -3 com.philips.cl.dl.kitchenappliances.airfryer.selendroid”
info: [debug] App is not installed
info: [debug] Rebuilt selendroid is not installed, installing it
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install -r “C:\Windows\Temp\selendroid.com.philips.cl.dl.kitchenappliances.airfryer.apk”
info: [debug] Cleaning up appium session
info: [debug] Error: spawn OK
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: spawn OK)”,“code”:“OK”,“errno”:“OK”,“syscall”:“spawn”,“origValue”:“spawn OK”},“sessionId”:null}
info: e[37m<-- POST /wd/hub/session e[39me[31m500e[39me[90m 10712.412 ms - 181e[39m e[90me[39m
error: Failed to start an Appium session, err was: Error: spawn OK

Should I use any other capabilities or installation to work with API level below 17(For selendroid)

Any suggestions/help would be appreciated.

Thanks&Regards,
Matti

There is something wrong with the rebuilt Selendroid app, try cleaning your

C:/Windows/Temp

directory and try again.

Thank you Hassan for your reply…

I have followed your solution, that works fine. App getting installed into device now but, unable to run that app. Please refer below log.

Starting Node Server
info: Welcome to Appium v1.2.4 (REV 71584425ecf777349e3215f0f18e71e7782acfb6)
info: Appium REST http interface listener started on 127.0.0.1:5552
info: [debug] Non-default server args: {“app”:“C:\AndroidDocuments\Appium_Test\Airfryer.apk”,“address”:“127.0.0.1”,“port”:5552,“logNoColors”:true,“deviceName”:“4d08d8c26a009000”,“platformName”:“Android”,“platformVersion”:“16”,“automationName”:“Selendroid”,“language”:“en”}
info: Console LogLevel: debug
info: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“app”:“C:\AndroidDocuments\Appium_Test\Airfryer.apk”,“automationName”:“Selendroid”,“platformName”:“Android”,“deviceName”:“4d08d8c26a009000”,“platform”:“WINDOW”}}e[39m
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Creating new appium session ac4b33ba-99a7-4aa9-b4f3-2fd119d3041f
info: [debug] Starting selendroid server
info: [debug] Checking whether selendroid is built yet
info: [debug] Selendroid server exists!
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe
info: [debug] Setting Android Device Language to en
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “setprop persist.sys.language en;”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “stop; sleep 2; setprop sys.boot_completed 0; start”
info: [debug] waiting for reboot, this takes time.
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “getprop sys.boot_completed”
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device 4d08d8c26a009000
info: [debug] Setting device id to 4d08d8c26a009000
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 wait-for-device
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe
info: [debug] hasInternetPermissionFromManifest: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe” dump badging “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe
info: [debug] packageAndLaunchActivityFromManifest: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe” dump badging “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] badging package: com.philips.cl.di.kitchenappliances.airfryer
info: [debug] badging act: com.philips.cl.di.kitchenappliances.views.SplashScreenActivity
info: [debug] Parsed package and activity are: com.philips.cl.di.kitchenappliances.airfryer/com.philips.cl.di.kitchenappliances.views.SplashScreenActivity
info: [debug] Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
info: [debug] Checking signed status of C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk
info: [debug] Checking app cert for C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk”
info: [debug] Checking signed status of C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking app cert for C:\AndroidDocuments\Appium_Test\Airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141026-3108-1t3iv6g.tmp”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141026-3108-11tglox.tmp”
info: [debug] Rebuilt selendroid apk does not exist, uninstalling any instances of it on device to make way for new one
info: [debug] Uninstalling com.philips.cl.di.kitchenappliances.airfryer.selendroid
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am force-stop com.philips.cl.di.kitchenappliances.airfryer.selendroid”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 uninstall com.philips.cl.di.kitchenappliances.airfryer.selendroid
info: [debug] App was uninstalled
info: [debug] Getting install status for com.philips.cl.di.kitchenappliances.airfryer.selendroid
info: [debug] Getting device API level
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 16
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm list packages -3 com.philips.cl.di.kitchenappliances.airfryer.selendroid”
info: [debug] App is not installed
info: [debug] Rebuilt selendroid is not installed, installing it
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install -r “C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop persist.sys.language”
info: [debug] Current device language: en
info: [debug] java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Windows\Temp\com.philips.cl.di.kitchenappliances.airfryer” en
info: [debug] No strings.xml for language ‘en’, getting default strings.xml
info: [debug] java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Windows\Temp\com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\AndroidDocuments\Appium_Test\Airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141026-3108-uo7png.tmp”
info: [debug] MD5 for app is 811597b146c9abb95552c76fd4ecf9b4
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “ls /data/local/tmp/811597b146c9abb95552c76fd4ecf9b4.apk”
info: [debug] Getting install status for com.philips.cl.di.kitchenappliances.airfryer
info: [debug] Getting device API level
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 16
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm list packages -3 com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am force-stop com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm clear com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] Forwarding system:8080 to device:8080
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 forward tcp:8080 tcp:8080
info: [debug] Pushing settings apk to device…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am instrument -e main_activity ‘com.philips.cl.di.kitchenappliances.views.SplashScreenActivity’ com.philips.cl.di.kitchenappliances.airfryer.selendroid/io.selendroid.ServerInstrumentation”
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Cleaning up appium session
info: [debug] Error: Waited 20 secs for selendroid server and it never showed up
error: Failed to start an Appium session, err was: Error: Waited 20 secs for selendroid server and it never showed up
at Request._callback (C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\lib\devices\common.js:116:5)
at self.callback (C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\request\request.js:121:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\request\request.js:230:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickDomainCallback (node.js:459:13)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Waited 20 secs for selendroid server and it never showed up)”,“origValue”:“Waited 20 secs for selendroid server and it never showed up”},“sessionId”:null}
info: e[37m<-- POST /wd/hub/session e[39me[31m500e[39me[90m 62617.239 ms - 240e[39m e[90me[39m

Please assist me to resolve this issue.

Thanks&Regards,
Matti

For some reason your Selendroid server failed to start after 20 seconds. There is a server configuration for Selendroid to increase that default timeout

-serverStartTimeout
Maximum time in milliseconds to wait for the selendroid-server to come up on the device. Default: 20000

As far as I know, we don’t have any way to invoke the Selendroid server with the custom configuration via Appium. @bootstraponline can help confirming that.

Thank you Hassan for your assistance and time…

We have tried as per the above solution but, no luck. I guess the problem is in the port number because in log it’s looking for:

info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}

I have not selected selendroid port in Appium settings. Do you think this setting will effect the launch communication? Could you please explain the actual use of selendroid port and from where its taking 8080 port number.

App getting installed into device, launch failed.
Appium version:-1.2.4.1
Selendroid API level:-16
Android version:-4.1.2

Please find the below log file.

Starting Node Server
info: Welcome to Appium v1.2.4 (REV 71584425ecf777349e3215f0f18e71e7782acfb6)
info: Appium REST http interface listener started on 127.0.0.1:5552
info: [debug] Non-default server args: {“app”:“C:\AndroidDocuments\Appium_Test\Airfryer.apk”,“address”:“127.0.0.1”,“port”:5552,“logNoColors”:true,“androidDeviceReadyTimeout”:“200”,“deviceName”:“4d08d8c26a009000”,“platformName”:“Android”,“platformVersion”:“19”,“automationName”:“Selendroid”,“language”:“en”}
info: Console LogLevel: debug
info: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“app”:“C:\AndroidDocuments\Appium_Test\Airfryer.apk”,“appium-version”:“1.2.4.1”,“appactivity”:“com.wordpad.Main”,“platformVersion”:“4.1.2”,“serverStartTimeout”:“20000”,“automationName”:“Selendroid”,“platformName”:“Android”,“deviceName”:“4d08d8c26a009000”,“platform”:“WINDOW”}}e[39m
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, appactivity, serverStartTimeout, platform
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Creating new appium session 2131953d-69ee-4718-a473-dc71f70dc1b8
info: [debug] Starting selendroid server
info: [debug] Checking whether selendroid is built yet
info: [debug] Selendroid server exists!
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe
info: [debug] Setting Android Device Language to en
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “setprop persist.sys.language en;”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “stop; sleep 2; setprop sys.boot_completed 0; start”
info: [debug] waiting for reboot, this takes time.
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” shell “getprop sys.boot_completed”
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device 4d08d8c26a009000
info: [debug] Setting device id to 4d08d8c26a009000
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 200)
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 wait-for-device
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe
info: [debug] hasInternetPermissionFromManifest: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe” dump badging “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe
info: [debug] packageAndLaunchActivityFromManifest: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\aapt.exe” dump badging “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] badging package: com.philips.cl.di.kitchenappliances.airfryer
info: [debug] badging act: com.philips.cl.di.kitchenappliances.views.SplashScreenActivity
info: [debug] Parsed package and activity are: com.philips.cl.di.kitchenappliances.airfryer/com.philips.cl.di.kitchenappliances.views.SplashScreenActivity
info: [debug] Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
info: [debug] Checking signed status of C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk
info: [debug] Checking app cert for C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk”
info: [debug] Checking signed status of C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking app cert for C:\AndroidDocuments\Appium_Test\Airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141027-1296-1atxsld.tmp”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141027-1296-87f4xc.tmp”
info: [debug] Rebuilt selendroid apk does not exist, uninstalling any instances of it on device to make way for new one
info: [debug] Uninstalling com.philips.cl.di.kitchenappliances.airfryer.selendroid
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am force-stop com.philips.cl.di.kitchenappliances.airfryer.selendroid”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 uninstall com.philips.cl.di.kitchenappliances.airfryer.selendroid
info: [debug] App was uninstalled
info: [debug] Getting install status for com.philips.cl.di.kitchenappliances.airfryer.selendroid
info: [debug] Getting device API level
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 16
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm list packages -3 com.philips.cl.di.kitchenappliances.airfryer.selendroid”
info: [debug] App is not installed
info: [debug] Rebuilt selendroid is not installed, installing it
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install -r “C:\Windows\Temp\selendroid.com.philips.cl.di.kitchenappliances.airfryer.apk”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop persist.sys.language”
info: [debug] Current device language: en
info: [debug] java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Windows\Temp\com.philips.cl.di.kitchenappliances.airfryer” en
info: [debug] No strings.xml for language ‘en’, getting default strings.xml
info: [debug] java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Windows\Temp\com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\AndroidDocuments\Appium_Test\Airfryer.apk: java -jar “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” “C:\AndroidDocuments\Appium_Test\Airfryer.apk”
info: [debug] App already signed.
info: [debug] Zip-aligning C:\AndroidDocuments\Appium_Test\Airfryer.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe
info: [debug] zipAlignApk: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\build-tools\android-4.4W\zipalign.exe” -f 4 “C:\AndroidDocuments\Appium_Test\Airfryer.apk” “C:\Users\Automob\AppData\Local\Temp\appium1141027-1296-1qjcqc8.tmp”
info: [debug] MD5 for app is 811597b146c9abb95552c76fd4ecf9b4
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “ls /data/local/tmp/811597b146c9abb95552c76fd4ecf9b4.apk”
info: [debug] Getting install status for com.philips.cl.di.kitchenappliances.airfryer
info: [debug] Getting device API level
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 16
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm list packages -3 com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am force-stop com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “pm clear com.philips.cl.di.kitchenappliances.airfryer”
info: [debug] Forwarding system:8080 to device:8080
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 forward tcp:8080 tcp:8080
info: [debug] Pushing settings apk to device…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 install “C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] executing: “C:\AndroidDocuments\adt-bundle-windows-x86-20140702\sdk\platform-tools\adb.exe” -s 4d08d8c26a009000 shell “am instrument -e main_activity ‘com.philips.cl.di.kitchenappliances.views.SplashScreenActivity’ com.philips.cl.di.kitchenappliances.airfryer.selendroid/io.selendroid.ServerInstrumentation”
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Making http request with opts: {“url”:“http://localhost:8080/wd/hub/status",“method”:"GET”}
info: [debug] Cleaning up appium session
info: [debug] Error: Waited 20 secs for selendroid server and it never showed up
at C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\lib\devices\android\selendroid.js:338:14
at Request._callback (C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\lib\devices\common.js:116:5)
at self.callback (C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\request\request.js:121:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (C:\AndroidDocuments\AppiumForWindows-1.2.4.1\Appium\node_modules\appium\node_modules\request\request.js:230:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickDomainCallback (node.js:459:13)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Waited 20 secs for selendroid server and it never showed up)”,“origValue”:“Waited 20 secs for selendroid server and it never showed up”},“sessionId”:null}
info: e[37m<-- POST /wd/hub/session e[39me[31m500e[39me[90m 47364.575 ms - 240e[39m e[90me[39m
error: Failed to start an Appium session, err was: Error: Waited 20 secs for selendroid server and it never showed up

PFA for the Appium setting screenshot.

Thanks&Regards,
Matti

The problem might be because some other application is using port 8080 and that’s why Selendroid is not responding and causes this timeout failure.

Try to change the default Selendroid port number to use another port:

I have tried by changing the selendroid port number but no luck…

What’s the use of this Selendroid port even though we have port number in general settings…

Thanks&Regards,
Matti

The port number in the general settings is the Appium server’s port number. Selendroid however has its own server with another different Ip address and port number.

You can try with another mobile device to make sure that it’s not a device related issue.

Sure…we will check with the another device and update the status…

Thanks&Regards,
Matti

I have checked in another devices, able to install app and launching successfully in higher android version(5.0) but, issue exists with android version 4.1 and API level 16(Selendroid).
This one is the blocker issue for us.

Could you please check and assist to overcome from this blocker.

Thanks&Regards,
Matti

Try with Selendroid only to see if it’s an Appium issue or something else.

I think that’s correct.