hi all,
i am getting this error while running my java testcase
at first time it ran successfully afterwards its not running and
here is the log which is generated
info: Welcome to Appium v1.2.3 (REV 90d746b373f55e8653a251d2ce8c62df37941919)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {“address”:“127.0.0.1”,“logNoColors”:true,“androidDeviceReadyTimeout”:“40”,“platformName”:“Android”,“platformVersion”:“18”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: e[37m–>e[39m e[37mPOSTe[39m e[37m/wd/hub/sessione[39m e[90m{“desiredCapabilities”:{“platformVersion”:“4.3”,“deviceName”:“Android”,“platformName”:“Android”,“browserName”:“Chrome”}}e[39m
info: Set mode: Proxying straight through to Chromedriver
info: [debug] Looks like we want chrome on android
info: [debug] Creating new appium session 518b7fa7-cc7c-43be-8560-73ff7cbf395d
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it’s already on the device
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\AndroidSetup\platform-tools\adb.exe
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device E8AZCY237063
info: [debug] Setting device id to E8AZCY237063
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 40)
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 wait-for-device
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Pushing unlock helper app to device…
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 install “C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 shell “dumpsys window”
info: [debug] Writing dumpsys output to C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium.dumpsys.log
info: [debug] Screen already unlocked, continuing.
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 push “C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: Starting App
info: [debug] Attempting to kill all ‘uiautomator’ processes
info: [debug] Getting all processes with ‘uiautomator’
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\AndroidSetup\platform-tools\adb.exe -s E8AZCY237063 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1e[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunnere[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrape[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=e[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:e[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1e[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServere[39m
info: [debug] e[90m[UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1e[39m
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] Pushing command to appium work queue: [“getDataDir”,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] [BOOTSTRAP] [debug] Client connected
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] Creating Chrome session
info: [debug] Set chromedriver binary as: C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] Ensuring Chromedriver exists
info: [debug] Killing any old chromedrivers, running: FOR /F “usebackq tokens=5” %a in (netstat -nao ^| findstr /R /C:"9515 "
) do (FOR /F “usebackq” %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe
) do (IF NOT %b==“” TASKKILL /F /PID %b))
info: [debug] No old chromedrivers seemed to exist
info: [debug] Spawning chromedriver with: C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
info: [debug] [CHROMEDRIVER] Starting ChromeDriver (v2.10.267521) on port 9515
Only local connections are allowed.
info: [debug] Making http request with opts: {“url”:“http://127.0.0.1:9515/wd/hub/session",“method”:“POST”,“json”:{“sessionId”:null,“desiredCapabilities”:{“chromeOptions”:{“androidPackage”:“com.android.chrome”,“androidDeviceSerial”:"E8AZCY237063”}}}}
info: [debug] [CHROMEDRIVER STDERR] [0.004][SEVERE]: Could not bind socket to 127.0.0.1:9515
info: [debug] [CHROMEDRIVER] Port not available. Exiting…
info: [debug] Chromedriver exited with code 1
info: [debug] Getting connected devices…
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 devices
error: Chromedriver create session did not work. Status was 200 and body was {“sessionId”:“56651cae714e33035a278a03df0e2dcc”,“status”:13,“value”:{“message”:“unknown error: Device E8AZCY237063 is already in use\n (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)”}}
error: Failed to start an Appium session, err was: Error: Did not get session redirect from Chromedriver
info: [debug] Error: Did not get session redirect from Chromedriver
at null. (C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\lib\devices\android\chromedriver.js:220:12)
at Request._callback (C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\lib\devices\common.js:116:5)
at Request.self.callback (C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\node_modules\request\request.js:121:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request. (C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\node_modules\request\request.js:985:14)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage. (C:\Users\sinsfm\Desktop\AppiumForWindows-1.2.3.1\Appium\node_modules\appium\node_modules\request\request.js:936:12)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
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: Did not get session redirect from Chromedriver)”,“origValue”:“Did not get session redirect from Chromedriver”},“sessionId”:null}
info: e[37m<-- POST /wd/hub/session e[39me[31m500e[39me[90m 2364.674 ms - 214e[39m e[90me[39m
info: [debug] 1 device(s) connected
info: [debug] executing: “C:\AndroidSetup\platform-tools\adb.exe” -s E8AZCY237063 shell “am force-stop com.android.chrome”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] Cleaning up appium session