Android 7 and 8 emulators work, 9 returns error message unable to find an active device

I’m running Appium with chrome driver 2.40. All my other emulators work and I can connect to them to run automated tests of a web app. But when running a Android 9.0 device, I get the following very inconsistent logging.
On APPIUM console


[AndroidDriver] Looking for a device with Android ‘9.0’
[debug] [ADB] Setting device id to emulator-5554
[ADB] Getting device platform version
[debug] [ADB] Running ‘/Users/anthonybeck/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release’
[debug] [ADB] Current device property ‘ro.build.version.release’: 9
[AndroidDriver] Error: Unable to find an active device or emulator with OS 9.0. The following are available: emulator-5554 (9)

And the console where I am running the tests:
WebDriverError: An unknown server-side error occurred while processing the command. Original error: Unable to find an active device or emulator with OS 9.0. The following are available: emulator-5554 (9)
at Object.checkLegacyResponse

Has anyone else seen this? Any ideas what is causing it and how to fix it?

A truly insane and very inane solution, I discovered that, unlike previous versions, I needed to pass the version “9” and not “9.0”. This is different from the 8.0, 7.0, and back to 4.0 versions, and I an not convinced that this has anything to do with anything I handled differently.

2 Likes

Thanks, @Anthony_Beck, you saved my day. And cannot agree more that this"9" v.s. “9.0” is insane

Thank you so much , you made my day