A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 192.168.42.101:5555 shell "ps 'uiautomator'""

Hi,
Please help me in solving this.

Error in Appium server:

Checking if an update is available
Update not available
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
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,“platformName”:“Android”,“platformVersion”:“23”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“browserName”:“chrome”,“deviceName”:“My New Phone”,“platform”:“ANDROID”,“platformName”:“Android”,“version”:“7.0”},“capabilities”:{“desiredCapabilities”:{“browserName”:“chrome”,“deviceName”:“My New Phone”,“platform”:“ANDROID”,“platformName”:“Android”,“version”:“7.0”},“firstMatch”:[{“browserName”:“chrome”,“platformName”:“android”}]}}
info: Client User-Agent string: Apache-HttpClient/4.5.3 (Java/1.8.0_131)
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, version
info: Set mode: Proxying straight through to Chromedriver
info: [debug] Looks like we want chrome on android
info: [debug] Creating new appium session 69fabf74-8c4d-4a1b-af1f-e2d713fc0e82
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe
info: [debug] Using fast reset? true
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: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device 192.168.42.101:5555
info: [debug] Setting device id to 192.168.42.101:5555
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 wait-for-device
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 install “C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk”
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 shell “dumpsys window”
info: [debug] Screen already unlocked, continuing.
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 push “C:\Program Files (x86)\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 cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 shell “ps ‘uiautomator’”
info: [debug] Cleaning up appium session
info: [debug] Error: Command failed: C:\Windows\system32\cmd.exe /s /c ““C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 shell “ps ‘uiautomator’””

at ChildProcess.exithandler (child_process.js:751:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit (child_process.js:1088:5)

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 192.168.42.101:5555 shell "ps ‘uiautomator’""\n)”,“killed”:false,“code”:1,“signal”:null,“cmd”:“C:\Windows\system32\cmd.exe /s /c ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 192.168.42.101:5555 shell "ps ‘uiautomator’""”,“origValue”:“Command failed: C:\Windows\system32\cmd.exe /s /c ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 192.168.42.101:5555 shell "ps ‘uiautomator’""\n”},“sessionId”:null}
error: Failed to start an Appium session, err was: Error: Command failed: C:\Windows\system32\cmd.exe /s /c ““C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 shell “ps ‘uiautomator’””

info: ← POST /wd/hub/session 500 4485.408 ms - 700

Error in Eclipse:
A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c ““C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s 192.168.42.101:5555 shell “ps ‘uiautomator’””
) (WARNING: The server did not provide any stacktrace information)

adb device status: virtual device using genymotion is connected

same error is found while trying with real device aswell

Also have a question. should the java path and sdk path should be mandatory in same variable ?? or can be in different variables??

Help me asap. Thanks in advance,

Regards,
Teja