I am trying to run a script using android emulator. The emulator is detected when running the adb devices command in cmd.
In appoum logs also it is seen that the device is detected initially. But the emulator is not detected when the shell commands are initiated. Logs are below. Please help in resolving this.
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:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device emulator-5554
info: [debug] Setting device id to emulator-5554
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell “echo ‘ready’”
info: [debug] Retrying restartAdb
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 kill-server
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 devices
info: [debug] 0 device(s) connected
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] Retrying restartAdb
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 kill-server
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 devices
info: [debug] 0 device(s) connected
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] Retrying restartAdb
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 kill-server
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 devices
info: [debug] 0 device(s) connected
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 kill-server
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 devices
info: [debug] 0 device(s) connected
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\Users\gopikrishnan_r01\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 wait-for-device
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
warn: UiAutomator did not shut down fast enough, calling it gone
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Device did not become ready in 5 secs; are you sure it’s powered on?
info: [debug] undefined
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created.”,“origValue”:“Device did not become ready in 5 secs; are you sure it’s powered on?”},“sessionId”:null}
info: ← POST /wd/hub/session 500 63345.459 ms - 171