Android emulator is being started again [SOLVED: Case sensitive emulator's name]

Let me explain the problem like this. Normally when implementing new feature/test case, I would first run Appium desktop to see what element are on the screen in the app. That means I open Appium desktop, and to start inspection, I need to start Emulator in terminal running this command:

./emulator -avd {name_of_emulator}

… then, I inspect the elements, write some scripts etc…
Now, while Emulator is already running, I try to run this script by hitting Play button in IntelliJ and here is the problem. - New Emulator is trying to be started (with the same name) and I get this server error:

2019-03-27 10:06:07:778 [Appium] Welcome to Appium v1.11.1
2019-03-27 10:06:07:786 [Appium] Non-default server args:
2019-03-27 10:06:07:786 [Appium] sessionOverride: true
2019-03-27 10:06:07:786 [Appium] logFile: /Users/zigas/Projects/xxxApp/xxx-app-ui-automation/AppiumLogFile.txt
2019-03-27 10:06:07:787 [Appium] loglevel: error:info
2019-03-27 10:06:07:823 [Appium] Appium REST http interface listener started on 0.0.0.0:4723
2019-03-27 10:06:07:877 [HTTP] → GET /wd/hub/status
2019-03-27 10:06:07:877 [HTTP] {}
2019-03-27 10:06:07:887 [HTTP] ← GET /wd/hub/status 200 6 ms - 68
2019-03-27 10:06:07:887 [HTTP]
2019-03-27 10:06:18:581 [HTTP] → POST /wd/hub/session
2019-03-27 10:06:18:581 [HTTP] {“desiredCapabilities”:{“app”:“/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk”,“appWaitActivity”:“com.xxx.app.intro.IntroActivity”,“appWaitPackage”:“com.xxx.app.staging”,“deviceName”:“Nexus_5X_API_25”,“deviceReadyTimeout”:180,“avd”:“Nexus_5X_API_25”,“androidInstallTimeout”:180000,“avdLaunchTimeout”:300000,“newCommandTimeout”:300,“automationName”:“UiAutomator2”,“platformName”:“Android”,“avdReadyTimeout”:300000,“printPageSourceOnFindFailure”:true},“capabilities”:{“firstMatch”:[{“appium:androidInstallTimeout”:180000,“appium:app”:“/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk”,“appium:appWaitActivity”:“com.xxx.app.intro.IntroActivity”,“appium:appWaitPackage”:“com.xxx.app.staging”,“appium:automationName”:“UiAutomator2”,“appium:avd”:“Nexus_5X_API_25”,“appium:avdLaunchTimeout”:300000,“appium:avdReadyTimeout”:300000,“appium:deviceName”:“Nexus_5X_API_25”,“appium:deviceReadyTimeout”:180,“appium:newCommandTimeout”:300,"p
2019-03-27 10:06:18:586 [BaseDriver] The capabilities [“printPageSourceOnFindFailure”] are not standard capabilities and should have an extension prefix
2019-03-27 10:06:18:590 [Appium] Creating new AndroidUiautomator2Driver (v1.29.1) session
2019-03-27 10:06:18:590 [Appium] Capabilities:
2019-03-27 10:06:18:590 [Appium] platformName: android
2019-03-27 10:06:18:590 [Appium] printPageSourceOnFindFailure: true
2019-03-27 10:06:18:590 [Appium] androidInstallTimeout: 180000
2019-03-27 10:06:18:590 [Appium] app: /Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk
2019-03-27 10:06:18:591 [Appium] appWaitActivity: com.xxx.app.intro.IntroActivity
2019-03-27 10:06:18:591 [Appium] appWaitPackage: com.xxx.app.staging
2019-03-27 10:06:18:591 [Appium] automationName: UiAutomator2
2019-03-27 10:06:18:591 [Appium] avd: Nexus_5X_API_25
2019-03-27 10:06:18:591 [Appium] avdLaunchTimeout: 300000
2019-03-27 10:06:18:591 [Appium] avdReadyTimeout: 300000
2019-03-27 10:06:18:591 [Appium] deviceName: Nexus_5X_API_25
2019-03-27 10:06:18:591 [Appium] deviceReadyTimeout: 180
2019-03-27 10:06:18:591 [Appium] newCommandTimeout: 300
2019-03-27 10:06:18:601 [BaseDriver] Session created with session id: 60c0a5e4-ec4a-46ab-b1b7-59b0f7f3cbcd
2019-03-27 10:06:18:674 [BaseDriver] Using local app ‘/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk’
2019-03-27 10:06:18:679 [ADB] Checking whether adb is present
2019-03-27 10:06:18:688 [ADB] Found 1 ‘build-tools’ folders under ‘/Users/zigas/Library/Android/sdk’ (newest first):
2019-03-27 10:06:18:688 [ADB] /Users/zigas/Library/Android/sdk/build-tools/28.0.3
2019-03-27 10:06:18:688 [ADB] Using adb from /Users/zigas/Library/Android/sdk/platform-tools/adb
2019-03-27 10:06:18:714 [ADB] Checking whether emulator is present
2019-03-27 10:06:18:715 [ADB] Using emulator from /Users/zigas/Library/Android/sdk/emulator/emulator
2019-03-27 10:06:21:089 [ADB] [AVD OUTPUT] emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.
2019-03-27 10:06:21:089 [ADB] [AVD OUTPUT] Please use -read-only flag to enable this feature.
2019-03-27 10:06:21:095 [ADB] Emulator avd Nexus_5X_API_25 exited with code 1

The problem is, I can not start the test until I quit the emulator and let the test start it itself. Attaching to already running one is not an option, which can take several minutes to start (and is complete waste of time).

What can I do to get the test running without quitting the Emulator?

Note:

  • Setting ‘skipDeviceInitialization’ capability to TRUE will not solve this issue.
    - Once the Emulator is run from test, next time I run the test again, it will take the running Emulator and will not try to start new one.
  • I’m not changing default ‘abdPort’ capability in test.

Can you enable debug logging and attach the updated log? In general the driver just tries to detect if the emulator with the given name (avd cap) is already running (see https://github.com/appium/appium-adb/blob/527c8b417d7b62717ececfdf068309b0ee4dbd8f/lib/tools/system-calls.js#L524) and only executes a new instance if it does not or if -wipe-data arg is provided: https://github.com/appium/appium-android-driver/blob/32bace944aaf4192e5736d0e4e6a0077534a6bd5/lib/android-helpers.js#L113

Thanks for your reply. Here is the log:

2019-03-28 10:11:48:537 [Appium] Welcome to Appium v1.11.1
2019-03-28 10:11:48:540 [Appium] Non-default server args:
2019-03-28 10:11:48:540 [Appium]   sessionOverride: true
2019-03-28 10:11:48:541 [Appium]   logFile: /Users/zigas/Projects/xxxApp/xxx-app-ui-automation/AppiumLogFile.txt
2019-03-28 10:11:48:541 [Appium]   loglevel: error:debug
2019-03-28 10:11:48:582 [Appium] Appium REST http interface listener started on 0.0.0.0:4723
2019-03-28 10:11:48:754 [HTTP] --> GET /wd/hub/status
2019-03-28 10:11:48:755 [HTTP] {}
2019-03-28 10:11:48:756 [GENERIC] Calling AppiumDriver.getStatus() with args: []
2019-03-28 10:11:48:758 [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.11.1"}}
2019-03-28 10:11:48:765 [HTTP] <-- GET /wd/hub/status 200 6 ms - 68
2019-03-28 10:11:48:765 [HTTP] 
2019-03-28 10:11:59:456 [HTTP] --> POST /wd/hub/session
2019-03-28 10:11:59:456 [HTTP] {"desiredCapabilities":{"app":"/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk","appWaitActivity":"com.xxx.app.intro.IntroActivity","appWaitPackage":"com.xxx.app.staging","deviceName":"Nexus_5X_API_25","deviceReadyTimeout":180,"avd":"Nexus_5X_API_25","androidInstallTimeout":180000,"avdLaunchTimeout":300000,"newCommandTimeout":300,"automationName":"UiAutomator2","platformName":"Android","avdReadyTimeout":300000,"printPageSourceOnFindFailure":true},"capabilities":{"firstMatch":[{"appium:androidInstallTimeout":180000,"appium:app":"/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk","appium:appWaitActivity":"com.xxx.app.intro.IntroActivity","appium:appWaitPackage":"com.xxx.app.staging","appium:automationName":"UiAutomator2","appium:avd":"Nexus_5X_API_25","appium:avdLaunchTimeout":300000,"appium:avdReadyTimeout":300000,"appium:deviceName":"Nexus_5X_API_25","appium:deviceReadyTimeout":180,"appium:newCommandTimeout":300,"p
2019-03-28 10:11:59:457 [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk","appWaitActivity":"com.xxx.app.intro.IntroActivity","appWaitPackage":"com.xxx.app.staging","deviceName":"Nexus_5X_API_25","deviceReadyTimeout":180,"avd":"Nexus_5X_API_25","androidInstallTimeout":180000,"avdLaunchTimeout":300000,"newCommandTimeout":300,"automationName":"UiAutomator2","platformName":"Android","avdReadyTimeout":300000,"printPageSourceOnFindFailure":true},null,{"firstMatch":[{"appium:androidInstallTimeout":180000,"appium:app":"/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk","appium:appWaitActivity":"com.xxx.app.intro.IntroActivity","appium:appWaitPackage":"com.xxx.app.staging","appium:automationName":"UiAutomator2","appium:avd":"Nexus_5X_API_25","appium:avdLaunchTimeout":300000,"appium:avdReadyTimeout":300000,"appium:deviceName":"Nexus_5X_API_25","appium:deviceReadyTimeout":180,"appium:newCommandTimeout":300,"platformName":"android","printPageSourceOnFindFailure"...
2019-03-28 10:11:59:457 [BaseDriver] Event 'newSessionRequested' logged at 1553767919457 (11:11:59 GMT+0100 (Central European Standard Time))
2019-03-28 10:11:59:460 [BaseDriver] The capabilities ["printPageSourceOnFindFailure"] are not standard capabilities and should have an extension prefix
2019-03-28 10:11:59:464 [Appium] Creating new AndroidUiautomator2Driver (v1.29.1) session
2019-03-28 10:11:59:464 [Appium] Capabilities:
2019-03-28 10:11:59:465 [Appium]   platformName: android
2019-03-28 10:11:59:465 [Appium]   printPageSourceOnFindFailure: true
2019-03-28 10:11:59:465 [Appium]   androidInstallTimeout: 180000
2019-03-28 10:11:59:465 [Appium]   app: /Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk
2019-03-28 10:11:59:465 [Appium]   appWaitActivity: com.xxx.app.intro.IntroActivity
2019-03-28 10:11:59:465 [Appium]   appWaitPackage: com.xxx.app.staging
2019-03-28 10:11:59:465 [Appium]   automationName: UiAutomator2
2019-03-28 10:11:59:465 [Appium]   avd: Nexus_5X_API_25
2019-03-28 10:11:59:466 [Appium]   avdLaunchTimeout: 300000
2019-03-28 10:11:59:466 [Appium]   avdReadyTimeout: 300000
2019-03-28 10:11:59:466 [Appium]   deviceName: Nexus_5X_API_25
2019-03-28 10:11:59:466 [Appium]   deviceReadyTimeout: 180
2019-03-28 10:11:59:466 [Appium]   newCommandTimeout: 300
2019-03-28 10:11:59:468 [BaseDriver] W3C capabilities {"alwaysMatch":{"platformNa... and MJSONWP desired capabilities {"app":"/Users/zigas/Projec... were provided
2019-03-28 10:11:59:469 [BaseDriver] Creating session with W3C capabilities: {"alwaysMatch":{"platformNa...
2019-03-28 10:11:59:475 [BaseDriver] Session created with session id: 7a7d8af7-47e3-4eb7-b2fb-384c4945b0f7
2019-03-28 10:11:59:540 [BaseDriver] Using local app '/Users/zigas/Projects/xxxApp/xxx-app-ui-automation/apppackage/xxx.apk'
2019-03-28 10:11:59:541 [UiAutomator2] Checking whether app is actually present
2019-03-28 10:11:59:546 [ADB] Checking whether adb is present
2019-03-28 10:11:59:552 [ADB] Found 1 'build-tools' folders under '/Users/zigas/Library/Android/sdk' (newest first):
2019-03-28 10:11:59:553 [ADB]     /Users/zigas/Library/Android/sdk/build-tools/28.0.3
2019-03-28 10:11:59:553 [ADB] Using adb from /Users/zigas/Library/Android/sdk/platform-tools/adb
2019-03-28 10:11:59:553 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:11:59:554 [ADB] Getting connected emulators
2019-03-28 10:11:59:554 [ADB] Getting connected devices...
2019-03-28 10:11:59:563 [ADB] 1 device(s) connected
2019-03-28 10:11:59:564 [ADB] 1 emulator(s) connected
2019-03-28 10:11:59:564 [ADB] Sending telnet command to device: avd name
2019-03-28 10:11:59:564 [ADB] Getting running emulator port
2019-03-28 10:11:59:568 [ADB] Socket connection to device created
2019-03-28 10:11:59:569 [ADB] Socket connection to device ready
2019-03-28 10:11:59:569 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:11:59:570 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:11:59:571 [ADB] Launching Emulator with AVD Nexus_5X_API_25, launchTimeout 300000ms and readyTimeout 300000ms
2019-03-28 10:11:59:571 [ADB] Checking whether emulator is present
2019-03-28 10:11:59:572 [ADB] Using emulator from /Users/zigas/Library/Android/sdk/emulator/emulator
2019-03-28 10:11:59:618 [ADB] Running '/Users/zigas/Library/Android/sdk/emulator/emulator' with args: ["-avd","Nexus_5X_API_25"]
2019-03-28 10:11:59:624 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:11:59:624 [ADB] Getting connected emulators
2019-03-28 10:11:59:624 [ADB] Getting connected devices...
2019-03-28 10:11:59:633 [ADB] 1 device(s) connected
2019-03-28 10:11:59:634 [ADB] 1 emulator(s) connected
2019-03-28 10:11:59:634 [ADB] Sending telnet command to device: avd name
2019-03-28 10:11:59:634 [ADB] Getting running emulator port
2019-03-28 10:11:59:635 [ADB] Socket connection to device created
2019-03-28 10:11:59:636 [ADB] Socket connection to device ready
2019-03-28 10:11:59:636 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:11:59:637 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:00:641 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:00:641 [ADB] Getting connected emulators
2019-03-28 10:12:00:642 [ADB] Getting connected devices...
2019-03-28 10:12:00:650 [ADB] 1 device(s) connected
2019-03-28 10:12:00:650 [ADB] 1 emulator(s) connected
2019-03-28 10:12:00:650 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:00:650 [ADB] Getting running emulator port
2019-03-28 10:12:00:651 [ADB] Socket connection to device created
2019-03-28 10:12:00:652 [ADB] Socket connection to device ready
2019-03-28 10:12:00:652 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:00:653 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:01:655 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:01:656 [ADB] Getting connected emulators
2019-03-28 10:12:01:657 [ADB] Getting connected devices...
2019-03-28 10:12:01:666 [ADB] 1 device(s) connected
2019-03-28 10:12:01:666 [ADB] 1 emulator(s) connected
2019-03-28 10:12:01:666 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:01:667 [ADB] Getting running emulator port
2019-03-28 10:12:01:668 [ADB] Socket connection to device created
2019-03-28 10:12:01:668 [ADB] Socket connection to device ready
2019-03-28 10:12:01:669 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:01:669 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:01:952 [ADB] [AVD OUTPUT] emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.
2019-03-28 10:12:01:952 [ADB] [AVD OUTPUT] Please use -read-only flag to enable this feature.
2019-03-28 10:12:01:958 [ADB] Emulator avd Nexus_5X_API_25 exited with code 1
2019-03-28 10:12:02:676 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:02:676 [ADB] Getting connected emulators
2019-03-28 10:12:02:677 [ADB] Getting connected devices...
2019-03-28 10:12:02:685 [ADB] 1 device(s) connected
2019-03-28 10:12:02:686 [ADB] 1 emulator(s) connected
2019-03-28 10:12:02:686 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:02:686 [ADB] Getting running emulator port
2019-03-28 10:12:02:688 [ADB] Socket connection to device created
2019-03-28 10:12:02:688 [ADB] Socket connection to device ready
2019-03-28 10:12:02:689 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:02:689 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:03:690 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:03:691 [ADB] Getting connected emulators
2019-03-28 10:12:03:691 [ADB] Getting connected devices...
2019-03-28 10:12:03:699 [ADB] 1 device(s) connected
2019-03-28 10:12:03:699 [ADB] 1 emulator(s) connected
2019-03-28 10:12:03:699 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:03:699 [ADB] Getting running emulator port
2019-03-28 10:12:03:702 [ADB] Socket connection to device created
2019-03-28 10:12:03:703 [ADB] Socket connection to device ready
2019-03-28 10:12:03:703 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:03:704 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:04:707 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:04:707 [ADB] Getting connected emulators
2019-03-28 10:12:04:707 [ADB] Getting connected devices...
2019-03-28 10:12:04:716 [ADB] 1 device(s) connected
2019-03-28 10:12:04:716 [ADB] 1 emulator(s) connected
2019-03-28 10:12:04:716 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:04:716 [ADB] Getting running emulator port
2019-03-28 10:12:04:718 [ADB] Socket connection to device created
2019-03-28 10:12:04:718 [ADB] Socket connection to device ready
2019-03-28 10:12:04:719 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:04:719 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:05:724 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:05:724 [ADB] Getting connected emulators
2019-03-28 10:12:05:724 [ADB] Getting connected devices...
2019-03-28 10:12:05:735 [ADB] 1 device(s) connected
2019-03-28 10:12:05:736 [ADB] 1 emulator(s) connected
2019-03-28 10:12:05:736 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:05:736 [ADB] Getting running emulator port
2019-03-28 10:12:05:738 [ADB] Socket connection to device created
2019-03-28 10:12:05:738 [ADB] Socket connection to device ready
2019-03-28 10:12:05:738 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:05:739 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:06:747 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:06:750 [ADB] Getting connected emulators
2019-03-28 10:12:06:750 [ADB] Getting connected devices...
2019-03-28 10:12:06:819 [ADB] 1 device(s) connected
2019-03-28 10:12:06:820 [ADB] 1 emulator(s) connected
2019-03-28 10:12:06:820 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:06:820 [ADB] Getting running emulator port
2019-03-28 10:12:06:823 [ADB] Socket connection to device created
2019-03-28 10:12:06:824 [ADB] Socket connection to device ready
2019-03-28 10:12:06:825 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:06:826 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:07:827 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:07:827 [ADB] Getting connected emulators
2019-03-28 10:12:07:828 [ADB] Getting connected devices...
2019-03-28 10:12:07:840 [ADB] 1 device(s) connected
2019-03-28 10:12:07:840 [ADB] 1 emulator(s) connected
2019-03-28 10:12:07:841 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:07:841 [ADB] Getting running emulator port
2019-03-28 10:12:07:845 [ADB] Socket connection to device created
2019-03-28 10:12:07:846 [ADB] Socket connection to device ready
2019-03-28 10:12:07:846 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:07:847 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:08:851 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:08:852 [ADB] Getting connected emulators
2019-03-28 10:12:08:852 [ADB] Getting connected devices...
2019-03-28 10:12:08:870 [ADB] 1 device(s) connected
2019-03-28 10:12:08:870 [ADB] 1 emulator(s) connected
2019-03-28 10:12:08:871 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:08:871 [ADB] Getting running emulator port
2019-03-28 10:12:08:873 [ADB] Socket connection to device created
2019-03-28 10:12:08:873 [ADB] Socket connection to device ready
2019-03-28 10:12:08:874 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:08:875 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:09:879 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:09:879 [ADB] Getting connected emulators
2019-03-28 10:12:09:879 [ADB] Getting connected devices...
2019-03-28 10:12:09:890 [ADB] 1 device(s) connected
2019-03-28 10:12:09:891 [ADB] 1 emulator(s) connected
2019-03-28 10:12:09:891 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:09:891 [ADB] Getting running emulator port
2019-03-28 10:12:09:896 [ADB] Socket connection to device created
2019-03-28 10:12:09:896 [ADB] Socket connection to device ready
2019-03-28 10:12:09:897 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:09:898 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:10:899 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:10:899 [ADB] Getting connected emulators
2019-03-28 10:12:10:900 [ADB] Getting connected devices...
2019-03-28 10:12:10:916 [ADB] 1 device(s) connected
2019-03-28 10:12:10:917 [ADB] 1 emulator(s) connected
2019-03-28 10:12:10:918 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:10:918 [ADB] Getting running emulator port
2019-03-28 10:12:10:921 [ADB] Socket connection to device created
2019-03-28 10:12:10:921 [ADB] Socket connection to device ready
2019-03-28 10:12:10:922 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:10:923 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:10:963 [Appium] Received SIGINT - shutting down
2019-03-28 10:12:11:370 [HTTP] <-- POST /wd/hub/session - - ms - -
2019-03-28 10:12:11:370 [HTTP] 
2019-03-28 10:12:11:924 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:11:924 [ADB] Getting connected emulators
2019-03-28 10:12:11:925 [ADB] Getting connected devices...
2019-03-28 10:12:11:942 [ADB] 1 device(s) connected
2019-03-28 10:12:11:942 [ADB] 1 emulator(s) connected
2019-03-28 10:12:11:942 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:11:942 [ADB] Getting running emulator port
2019-03-28 10:12:11:944 [ADB] Socket connection to device created
2019-03-28 10:12:11:945 [ADB] Socket connection to device ready
2019-03-28 10:12:11:946 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:11:947 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:12:951 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:12:952 [ADB] Getting connected emulators
2019-03-28 10:12:12:952 [ADB] Getting connected devices...
2019-03-28 10:12:12:995 [ADB] 1 device(s) connected
2019-03-28 10:12:12:996 [ADB] 1 emulator(s) connected
2019-03-28 10:12:12:997 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:12:997 [ADB] Getting running emulator port
2019-03-28 10:12:13:000 [ADB] Socket connection to device created
2019-03-28 10:12:13:001 [ADB] Socket connection to device ready
2019-03-28 10:12:13:001 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:13:002 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:14:007 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:14:008 [ADB] Getting connected emulators
2019-03-28 10:12:14:009 [ADB] Getting connected devices...
2019-03-28 10:12:14:030 [ADB] 1 device(s) connected
2019-03-28 10:12:14:030 [ADB] 1 emulator(s) connected
2019-03-28 10:12:14:030 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:14:030 [ADB] Getting running emulator port
2019-03-28 10:12:14:032 [ADB] Socket connection to device created
2019-03-28 10:12:14:032 [ADB] Socket connection to device ready
2019-03-28 10:12:14:033 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:14:034 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:15:037 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:15:037 [ADB] Getting connected emulators
2019-03-28 10:12:15:038 [ADB] Getting connected devices...
2019-03-28 10:12:15:060 [ADB] 1 device(s) connected
2019-03-28 10:12:15:060 [ADB] 1 emulator(s) connected
2019-03-28 10:12:15:061 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:15:061 [ADB] Getting running emulator port
2019-03-28 10:12:15:064 [ADB] Socket connection to device created
2019-03-28 10:12:15:065 [ADB] Socket connection to device ready
2019-03-28 10:12:15:067 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:15:074 [ADB] Emulator Nexus_5X_API_25 not running
2019-03-28 10:12:16:079 [ADB] Trying to find Nexus_5X_API_25 emulator
2019-03-28 10:12:16:079 [ADB] Getting connected emulators
2019-03-28 10:12:16:081 [ADB] Getting connected devices...
2019-03-28 10:12:16:133 [ADB] 1 device(s) connected
2019-03-28 10:12:16:134 [ADB] 1 emulator(s) connected
2019-03-28 10:12:16:134 [ADB] Sending telnet command to device: avd name
2019-03-28 10:12:16:134 [ADB] Getting running emulator port
2019-03-28 10:12:16:139 [ADB] Socket connection to device created
2019-03-28 10:12:16:140 [ADB] Socket connection to device ready
2019-03-28 10:12:16:143 [ADB] Telnet command got response: nexus_5x_api_25
2019-03-28 10:12:16:144 [ADB] Emulator Nexus_5X_API_25 not running

It looks like the current emulator name comparison algorithm is case sensitive. I’ll fix it, but you can just use exactly the same letter case for avd and the actual emulator name in order to workaround the problem

1 Like

I renamed emulator to lower case and the name of the emulator to use for testing and it works.
But before i had the same:

  • Avd Manager emulator’s name: Nexus_5X_API_25
  • Appium properties: Nexus_5X_API_25

… so it might need to be lower cased.

Thanks for your help!