@Hassan_Radi
Thanks.
Yes, Appium servers are started on correct IP addressess and port numbers on individual nodes. (For confirmation you can check the json file of one node i have provided.)
When providing UDID, logs are as follows:
[debug] Error: Device 356446054209569 was not in the list of connected devices
null.<anonymous> (C:\Appium\node_modules\appium\lib\devices\android\android-common.js:406:19)
null.<anonymous> (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:610:9)
null.<anonymous> (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:842:7)
null.<anonymous> (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:172:9)
ChildProcess.exithandler (child_process.js:735:7)
ChildProcess.emit (events.js:110:17)
maybeClose (child_process.js:1008:16)
Process.ChildProcess._handle.onexit (child_process.js:1080:5)
[debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Device 356446054209569 was not in
ist of connected devices)","origValue":"Device 356446054209569 was not in the list of connected devices"},"sessionId":null}
<-- POST /wd/hub/session 500 7189.815 ms - 248
--> GET /wd/hub/status {}
[debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
<-- GET /wd/hub/status 200 2.641 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
--> GET /wd/hub/status {}
[debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
<-- GET /wd/hub/status 200 4.056 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
--> POST /wd/hub/session {"desiredCapabilities":{"app":"C:\\git\\androidautomationnaukriindia\\apks\\NaukriSplashScreen-debug02.apk","platformVersion":"4.3","de
me":"07c54b02864c8a2a","platformName":"Android","appActivity":"com.naukri.fragments.NaukriSplashScreen","browserName":"ANDROID","udid":"357541050536566","appPac
"naukriApp.appModules.login"}}
Client User-Agent string: Apache-HttpClient/4.3.2 (java 1.5)
[debug] Using local app from desired caps: C:\git\androidautomationnaukriindia\apks\NaukriSplashScreen-debug02.apk
[debug] Creating new appium session 15829be6-71d1-41d3-9f93-73762d649fdb
Starting android appium
[debug] Getting Java version
Java version is: 1.7.0_25
[debug] Using fast reset? true
[debug] Preparing device for session
[debug] Checking whether app is actually present
[debug] Checking whether adb is present
[debug] Using adb from D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe
Retrieving device
[debug] Trying to find a connected android device
[debug] Getting connected devices...
[debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe devices
[debug] 2 device(s) connected
[debug] Sent shutdown command, waiting for UiAutomator to stop...
--> GET /wd/hub/status {}
[debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"
e6-71d1-41d3-9f93-73762d649fdb"}
<-- GET /wd/hub/status 200 5.133 ms - 155 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"1
6-71d1-41d3-9f93-73762d649fdb"}
UiAutomator did not shut down fast enough, calling it gone
[debug] Cleaning up android objects
[debug] Cleaning up appium session
Failed to start an Appium session, err was: Error: Device 357541050536566 was not in the list of connected devices
[debug] Error: Device 357541050536566 was not in the list of connected devices
null.<anonymous> (C:\Appium\node_modules\appium\lib\devices\android\android-common.js:406:19)
null.<anonymous> (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:610:9)
null.<anonymous> (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:842:7)
null.<anonymous> (C:\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:172:9)
ChildProcess.exithandler (child_process.js:735:7)
ChildProcess.emit (events.js:110:17)
maybeClose (child_process.js:1008:16)
Process.ChildProcess._handle.onexit (child_process.js:1080:5)
[debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Device 357541050536566 was not in
ist of connected devices)","origValue":"Device 357541050536566 was not in the list of connected devices"},"sessionId":null}
<-- POST /wd/hub/session 500 7184.242 ms - 248
Logs when UDID is not provided:
info: <-- GET /wd/hub/status 200 93016.713 ms - 104 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}}}
info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"C:\\git\\androidautomationnaukriindia\\apks\\NaukriSplashScreen-debug02.apk","platformVersion":"4.3","de
viceName":"07c54b02864c8a2a","platformName":"Android","appActivity":"com.naukri.fragments.NaukriSplashScreen","browserName":"ANDROID","appPackage":"naukriApp.appModul
es.login"}}
info: Client User-Agent string: Apache-HttpClient/4.3.2 (java 1.5)
info: [debug] Using local app from desired caps: C:\git\androidautomationnaukriindia\apks\NaukriSplashScreen-debug02.apk
info: [debug] Creating new appium session 26544b18-0d5d-4e5e-b759-50f42cc14968
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_25
info: [debug] Using fast reset? true
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 D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe devices
info: [debug] 2 device(s) connected
info: Found device 4df707995bd4215b
info: [debug] Setting device id to 4df707995bd4215b
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b wait-for-device
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 18
info: Device API level is: 18
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "getprop persist.sys.language"
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar "C:\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\git\androidautomationnaukriindia\apks\N
aukriSplashScreen-debug02.apk" "C:\Users\RASHI~1.ATR\AppData\Local\Temp\naukriApp.appModules.login" en
info: [debug] No strings.xml for language 'en', getting default strings.xml
info: [debug] java -jar "C:\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\git\androidautomationnaukriindia\apks\N
aukriSplashScreen-debug02.apk" "C:\Users\RASHI~1.ATR\AppData\Local\Temp\naukriApp.appModules.login"
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b push "C:\\Users\\RASHI~1.ATR\\AppData\\Local\\Temp\\nau
kriApp.appModules.login\\strings.json" /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from D:\adt-bundle-windows-x86-20130729\sdk\build-tools\android-4.3\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\build-tools\android-4.3\aapt.exe dump xmltree C:\git\androidautomationnaukriindia\apks\NaukriSplas
hScreen-debug02.apk AndroidManifest.xml
info: [debug] Set app process to: naukriApp.appModules.login
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\git\androidautomationnaukriindia\apks\NaukriSplashScreen-debug02.apk.
info: [debug] executing cmd: java -jar C:\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar C:\git\androidautomationnaukriindia\apks\NaukriSplashScre
en-debug02.apk
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"
26544b18-0d5d-4e5e-b759-50f42cc14968"}
info: <-- GET /wd/hub/status 200 2.839 ms - 155 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"2
6544b18-0d5d-4e5e-b759-50f42cc14968"}
info: [debug] App already signed.
info: [debug] Zip-aligning C:\git\androidautomationnaukriindia\apks\NaukriSplashScreen-debug02.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from D:\adt-bundle-windows-x86-20130729\sdk\build-tools\20.0.0\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\build-tools\20.0.0\zipalign.exe -f 4 C:\git\androidautomationnaukriindia\apks\NaukriSplashScreen-d
ebug02.apk C:\Users\RASHI~1.ATR\AppData\Local\Temp\appium115912-8656-12e5dk5.tmp
info: [debug] MD5 for app is 066cb494e957769820f384372c5893ed
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "ls /data/local/tmp/066cb494e957769820f384372c589
3ed.apk"
info: [debug] Getting install status for naukriApp.appModules.login
info: [debug] Getting device API level
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 18
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "pm list packages -3 naukriApp.appModules.login"
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "am force-stop naukriApp.appModules.login"
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "pm clear naukriApp.appModules.login"
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b push "C:\\Appium\\node_modules\\appium\\build\\android_
bootstrap\\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b install "C:\Appium\node_modules\appium\build\settings_a
pk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b install "C:\Appium\node_modules\appium\build\unlock_apk
\unlock_apk-debug.apk"
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"
26544b18-0d5d-4e5e-b759-50f42cc14968"}
info: <-- GET /wd/hub/status 200 3.557 ms - 155 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"2
6544b18-0d5d-4e5e-b759-50f42cc14968"}
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "ps 'uiautomator'"
info: [debug] Attempting to kill process 20444
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "kill 20444"
info: [debug] Running bootstrap
info: [debug] spawning: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell uiautomator runtest AppiumBootstrap.jar -c io.appium.a
ndroid.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "dumpsys window"
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"\/data\/local\/tmp","status":0}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] Getting device API level
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "getprop ro.build.version.sdk"
info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}
info: [debug] Device is at API Level 18
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "am start -S -a android.intent.action.MAIN -c and
roid.intent.category.LAUNCHER -f 0x10200000 -n naukriApp.appModules.login/com.naukri.fragments.NaukriSplashScreen"
info: [debug] Waiting for pkg "naukriApp.appModules.login" and activity "com.naukri.fragments.NaukriSplashScreen" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb.exe -s 4df707995bd4215b shell "dumpsys window windows"
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId 26544b18-0d5d-4e5e-b759-50f42cc14968
info: <-- POST /wd/hub/session 303 11406.100 ms - 9
info: --> GET /wd/hub/session/26544b18-0d5d-4e5e-b759-50f42cc14968 {}
info: [debug] Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"ANDROID","platformVersion":"4.3","webStorageEnabled":false,"ta
kesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"app":"C:
\\git\\androidautomationnaukriindia\\apks\\NaukriSplashScreen-debug02.apk","platformVersion":"4.3","deviceName":"07c54b02864c8a2a","platformName":"Android","appActivi
ty":"com.naukri.fragments.NaukriSplashScreen","browserName":"ANDROID","appPackage":"naukriApp.appModules.login"},"app":"C:\\git\\androidautomationnaukriindia\\apks\\N
aukriSplashScreen-debug02.apk","deviceName":"07c54b02864c8a2a","platformName":"Android","appActivity":"com.naukri.fragments.NaukriSplashScreen","appPackage":"naukriAp
p.appModules.login"},"sessionId":"26544b18-0d5d-4e5e-b759-50f42cc14968"}
info: <-- GET /wd/hub/session/26544b18-0d5d-4e5e-b759-50f42cc14968 200 4.722 ms - 853 {"status":0,"value":{"platform":"LINUX","browserName":"ANDROID","platformVersion
":"4.3","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":fal
se,"warnings":{},"desired":{"app":"C:\\git\\androidautomationnaukriindia\\apks\\NaukriSplashScreen-debug02.apk","platformVersion":"4.3","deviceName":"07c54b02864c8a2a
","platformName":"Android","appActivity":"com.naukri.fragments.NaukriSplashScreen","browserName":"ANDROID","appPackage":"naukriApp.appModules.login"},"app":"C:\\git\\
androidautomationnaukriindia\\apks\\NaukriSplashScreen-debug02.apk","deviceName":"07c54b02864c8a2a","platformName":"Android","appActivity":"com.naukri.fragments.Naukr
iSplashScreen","appPackage":"naukriApp.appModules.login"},"sessionId":"26544b18-0d5d-4e5e-b759-50f42cc14968"}
info: --> GET /wd/hub/status {}
info: [debug] Responding to client with success: {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"
26544b18-0d5d-4e5e-b759-50f42cc14968"}
info: <-- GET /wd/hub/status 200 3.028 ms - 155 {"status":0,"value":{"build":{"version":"1.3.4","revision":"c8c79a85fbd6870cd6fc3d66d038a115ebe22efe"}},"sessionId":"2
6544b18-0d5d-4e5e-b759-50f42cc14968"}
How can I get hub logs, I have limited knowledge about Selenium Grid.
Please help me find problem, so that solution could be found.