org.openqa.selenium.SessionNotCreatedException: 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 69c7aa170104 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk""
Logs:
info: --> POST /wd/hub/session {"capabilities":[{"desiredCapabilities":{"browserName":"chrome","platformName":"Android","version":"7.0","deviceName":"my Phone","platform":"ANDROID"}},{"requiredCapabilities":{}}],"desiredCapabilities":{"browserName":"chrome","platformName":"Android","version":"7.0","deviceName":"my Phone","platform":"ANDROID"},"requiredCapabilities":{}} 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. : version, platform info: Set mode: Proxying straight through to Chromedriver info: [debug] Looks like we want chrome on android info: [debug] Creating new appium session 9390ac8f-f774-4181-83be-ec947d3f381d 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 69c7aa170104 info: [debug] Setting device id to 69c7aa170104 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 69c7aa170104 wait-for-device info: [debug] executing cmd: "C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 69c7aa170104 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 69c7aa170104 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk" info: [debug] Cleaning up appium session 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 69c7aa170104 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"" Failed to install C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk: Failure [INSTALL_CANCELED_BY_USER]
info: [debug] Error: Command failed: C:\Windows\system32\cmd.exe /s /c ""C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s 69c7aa170104 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"" Failed to install C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk: Failure [INSTALL_CANCELED_BY_USER]
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 69c7aa170104 install \"C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk\"\"\nFailed to install C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk: Failure [INSTALL_CANCELED_BY_USER]\r\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 69c7aa170104 install \"C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk\"\"","origValue":"Command failed: C:\Windows\system32\cmd.exe /s /c \"\"C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe\" -s 69c7aa170104 install \"C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk\"\"\nFailed to install C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk: Failure [INSTALL_CANCELED_BY_USER]\r\n"},"sessionId":null} info: <-- POST /wd/hub/session 500 11882.982 ms - 1223