0
votes

info: [debug] Setting device id to ZY223DDMM8 info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5) info: [debug] executing cmd: E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 wait-for-device info: [debug] executing cmd: E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 shell "echo 'ready'" info: [debug] Starting logcat capture info: [debug] Pushing unlock helper app to device... info: [debug] executing cmd: E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 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 "E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 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_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.unlock without first uninstalling.]

info: [debug] Error: Command failed: C:\Windows\system32\cmd.exe /s /c "E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 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_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.unlock without first uninstalling.]

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 \"E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 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_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.unlock without first uninstalling.]\r\n)","killed":false,"code":1,"signal":null,"cmd":"C:\Windows\system32\cmd.exe /s /c \"E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 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 \"E:\MobileAutomation\Android\android-sdk\platform-tools\adb.exe -s ZY223DDMM8 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_FAILED_ALREADY_EXISTS: Attempt to re-install io.appium.unlock without first uninstalling.]\r\n"},"sessionId":null} info: <-- POST /wd/hub/session 500 3251.479 ms - 1342

1

1 Answers

0
votes

add --no-reset flag so that appium doesnt try to install the apk again or uninstall the apk before you run the test scripts