Thanks a lot @Hassan_Radi .. I need a other help from yourside .
When i use Selendroid mode with Appium version 1.3.4 and with selendroid port as 8080, then i am getting the following error .
I dont have any port running with 8080.
My app has a INTERNET persmission in the manifest file as well..
Can you please throw some light and help me on this issue. I have been struggling hard for the past 2 days.
info: Welcome to Appium v1.1.0 (REV e433bbc31511f199287db7724e1ce692bcb32117)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: socket.io started
info: Non-default server args: {"app":"/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk","androidPackage":"com.myntra.android","androidActivity":"com.myntra.android.activities.LoginRegisterActivity","deviceName":"Emulator","platformName":"Android","platformVersion":"4.2","automationName":"Selendroid","defaultCommandTimeout":7200}
info: Responding to client with success: {"status":0,"value":{"build":{"version":"1.1.0","revision":"e433bbc31511f199287db7724e1ce692bcb32117"}}}
debug: Appium request initiated at /wd/hub/status
GET /wd/hub/status 200 6ms - 143b
debug: Request received with params: {}
debug: Appium request initiated at /wd/hub/status
info: Responding to client with success: {"status":0,"value":{"build":{"version":"1.1.0","revision":"e433bbc31511f199287db7724e1ce692bcb32117"}}}
debug: Request received with params: {}
GET /wd/hub/status 200 1ms - 143b
debug: Appium request initiated at /wd/hub/status
info: Responding to client with success: {"status":0,"value":{"build":{"version":"1.1.0","revision":"e433bbc31511f199287db7724e1ce692bcb32117"}}}
debug: Request received with params: {}
debug: Appium request initiated at /wd/hub/sessions
debug: Request received with params: {}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platformName":"Android","platformVersion":"4.2","newCommandTimeout":"999999","automationName":"Selendroid","deviceName":"Emulator"}}
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" devices
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 wait-for-device
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "echo 'ready'"
debug: Checking app cert for /tmp/selendroid.com.myntra.android.apk: java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/helpers/verify.jar" "/tmp/selendroid.com.myntra.android.apk"
debug: Checking app cert for /Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk: java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/helpers/verify.jar" "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk"
debug: App already signed.
debug: zipAlignApk: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/build-tools/19.0.1/zipalign" -f 4 "/tmp/selendroid.com.myntra.android.apk" "/var/folders/y8/v8mswzvj24q92_y6tzb94yysqm0c7g/T/appium115112-48835-d234v5.tmp"
debug: App already signed.
debug: zipAlignApk: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/build-tools/19.0.1/zipalign" -f 4 "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk" "/var/folders/y8/v8mswzvj24q92_y6tzb94yysqm0c7g/T/appium115112-48835-qlpbd8.tmp"
debug: Getting install status for com.myntra.android.selendroid
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "pm list packages -3 com.myntra.android.selendroid"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "getprop persist.sys.language"
debug: Current device language: en
debug: java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/helpers/strings_from_apk.jar" "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk" "/tmp/com.myntra.android" en
debug: java -jar "/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/helpers/strings_from_apk.jar" "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk" "/tmp/com.myntra.android"
debug: Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:540)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:76)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:68)
at strings.StringsXML.run(StringsXML.java:84)
at strings.StringsXML.main(StringsXML.java:151)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:43)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 5 more
debug: Not uninstalling app since server not started with --full-reset
debug: Checking app cert for /Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk: java -jar "/Applications/Appium.app/C
GET /wd/hub/status 200 0ms - 143b
info: Responding to client with success: {"status":0,"value":[]}
GET /wd/hub/sessions 200 1ms - 32b
info: Using local app from command line: /Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk
info: Creating new appium session 263f0537-9cdd-492f-b974-ca0820243c1c
info: Starting selendroid server
info: Checking whether selendroid is built yet
info: Selendroid server exists!
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from /Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
info: [ADB] 1 device(s) connected
info: Setting device id to 4d0061964e7f3177
info: [ADB] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: Starting logcat capture
info: Rebuilt selendroid apk exists, doing nothing
info: Rebuilt selendroid server already exists, no need to rebuild it with a new manifest
info: Checking signed status of /tmp/selendroid.com.myntra.android.apk
info: Checking signed status of /Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk
info: Zip-aligning /tmp/selendroid.com.myntra.android.apk
info: Checking whether zipalign is present
info: [ADB] Using zipalign from /Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/build-tools/19.0.1/zipalign
info: Zip-aligning /Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk
info: Checking whether zipalign is present
info: [ADB] Using zipalign from /Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/build-tools/19.0.1/zipalign
info: [ADB] App is installed
info: Rebuilt selendroid is already installed
info: No strings.xml for language 'en', getting default strings.xml
warn: Error getting strings.xml from apk
info: Zip-aligning /Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk
info: Checking whether zipalign is present
info: [ADB] Using zipalign from /Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/build-tools/19.0.1/zipalign
info: MD5 for app is 396704003712edcec12bc62efd3f16f4
info: [ADB] App is not installed
info: Removing any old apks
info: Uninstalling com.myntra.android
info: [ADB] Forwarding system:8080 to device:8080
info: Writing dumpsys output to /Applications/Appium.app/Contents/Resources/node_modules/appium/.dumpsys.log
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info:
ontents/Resources/node_modules/appium/lib/devices/android/helpers/verify.jar" "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk"
debug: App already signed.
debug: zipAlignApk: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/build-tools/19.0.1/zipalign" -f 4 "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk" "/var/folders/y8/v8mswzvj24q92_y6tzb94yysqm0c7g/T/appium115112-48835-d2yzo1.tmp"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "ls /data/local/tmp/396704003712edcec12bc62efd3f16f4.apk"
debug: Getting install status for com.myntra.android
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "pm list packages -3 com.myntra.android"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "mkdir -p /data/local/tmp/"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "ls /data/local/tmp/*.apk"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell rm "/data/local/tmp/15a486aac1cbb34b9465c67d4cbd2de4.apk"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 push "/Users/c.sivasubramanian/Downloads/Myntra-Android-qa.apk" /data/local/tmp/396704003712edcec12bc62efd3f16f4.apk
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "am force-stop com.myntra.android"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 uninstall com.myntra.android
debug: App was not uninstalled, maybe it wasn't on device?
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "pm install -r /data/local/tmp/396704003712edcec12bc62efd3f16f4.apk"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 forward tcp:8080 tcp:8080
debug: Pushing unlock helper app to device...
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 install "/Applications/Appium.app/Contents/Resources/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk"
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "dumpsys window"
debug: Screen already unlocked, continuing.
debug: executing: "/Users/c.sivasubramanian/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/adb" -s 4d0061964e7f3177 shell "am instrument -e main_activity 'com.myntra.android.activities.LoginRegisterActivity' com.myntra.android.selendroid/io.selendroid.ServerInstrumentation"
error: Failed to start an Appium session, err was: Error: Waited 20 secs for selendroid server and it never showed up
Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Making http request with opts: {"url":"http://localhost:8080/wd/hub/status","method":"GET"}
info: Cleaning up appium session
info: Error: Waited 20 secs for selendroid server and it never showed up
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/selendroid.js:261:14
at Request.callback (/Applications/Appium.app/Contents/Resources/nodemodules/appium/lib/devices/common.js:104:5)
at self.callback (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/request/request.js:121:22)
at Request.EventEmitter.emit (events.js:95:17)
at ClientRequest.self.clientErrorHandler (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/request/request.js:230:10)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketOnEnd as onend
at Socket.g (events.js:180:16)
at Socket.EventEmitter.emit (events.js:117:20)
at streamreadable.js:919:16
info: 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}
POST /wd/hub/session 500 35945ms - 268b
debug: Appium request initiated at /wd/hub/status
info: Responding to client with success: {"status":0,"value":{"build":{"version":"1.1.0","revision":"e433bbc31511f199287db7724e1ce692bcb32117"}}}
debug: Request received with params: {}
GET /wd/hub/status 200 2ms - 143b