[UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)

Hi All,

I am trying to run a script and it is throwing the “[UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)” error.

I have tried the below but no luck:

  1. upgrading Appium (current version: 1.17.1-1)
  2. changing the port
  3. upgrading the PyCharm (my IDE)
  4. upgrading python (my programming language)

Please find the Appium log below:

The server is running
[Appium] Welcome to Appium v1.17.1
[Appium] Non-default server args:
[Appium] port: 8222
[Appium] allowInsecure: {
[Appium] }
[Appium] denyInsecure: {
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:8222
[HTTP] --> POST /wd/hub/session
[HTTP] {“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:platformVersion”:“7.1.1”,“appium:deviceName”:“emulator-5554”,“appium:noReset”:“false”,“appium:udid”:“emulator-5554”,“appium:app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“appium:autoGrantPermissions”:“true”,“appium:fullReset”:"",“appium:autoAcceptAlerts”:“true”,“appium:appPackage”:“com.blueyonder.mobile.eso”,“appium:appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”}]},“desiredCapabilities”:{“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:“false”,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:“true”,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”}}
[W3C] Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:“false”,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:“true”,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”},null,{“firstMatch”:[{“platformName”:“Android”,“appium:platformVersion”:“7.1.1”,“appium:deviceName”:“emulator-5554”,“appium:noReset”:“false”,“appium:udid”:“emulator-5554”,“appium:app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“appium:autoGrantPermissions”:“true”,“appium:fullReset”:"",“appium:autoAcceptAlerts”:“true”,“appium:appPackage”:“com.blueyonder.mobile.eso”,“appium:appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1610895589851 (20:29:49 GMT+0530 (India Standard Time))
[Appium]
[Appium] ======================================================================
[Appium] DEPRECATION WARNING:
[Appium]
[Appium] The ‘automationName’ capability was not provided in the desired
[Appium] capabilities for this Android session
[Appium]
[Appium] Setting ‘automationName=UiAutomator2’ by default and using the
[Appium] UiAutomator2 Driver
[Appium]
[Appium] The next major version of Appium (2.x) will require the
[Appium] ‘automationName’ capability to be set for all sessions on all
[Appium] platforms
[Appium]
[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] ‘automationName=UiAutomator1’
[Appium]
[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add ‘automationName=UiAutomator1’ to your desired capabilities
[Appium]
[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] ‘Drivers’ menu
[Appium]
[Appium] ======================================================================
[Appium]
[Appium] Appium v1.17.1 creating new AndroidUiautomator2Driver (v1.44.2) session
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver] “alwaysMatch”: {
[BaseDriver] “platformName”: “Android”,
[BaseDriver] “appium:platformVersion”: “7.1.1”,
[BaseDriver] “appium:deviceName”: “emulator-5554”,
[BaseDriver] “appium:noReset”: “false”,
[BaseDriver] “appium:udid”: “emulator-5554”,
[BaseDriver] “appium:app”: “C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,
[BaseDriver] “appium:autoGrantPermissions”: “true”,
[BaseDriver] “appium:fullReset”: “”,
[BaseDriver] “appium:autoAcceptAlerts”: “true”,
[BaseDriver] “appium:appPackage”: “com.blueyonder.mobile.eso”,
[BaseDriver] “appium:appActivity”: “crc644e5a39b7cfaf2c9e.SplashActivity”
[BaseDriver] },
[BaseDriver] “firstMatch”: [
[BaseDriver] {}
[BaseDriver] ]
[BaseDriver] }
[BaseDriver] Capability ‘noReset’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability ‘autoGrantPermissions’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] autoAcceptAlerts
[BaseDriver] Session created with session id: 83a16833-45fe-42f1-9d7e-6c5d81fab002
[BaseDriver] Using local app ‘C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk’
[UiAutomator2] Checking whether app is actually present
[ADB] Using ‘adb.exe’ from ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe’
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices…
[ADB] Connected devices: [{“udid”:“emulator-5554”,“state”:“device”}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using ‘adb.exe’ from ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe’
[ADB] Setting device id to emulator-5554
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk’
[ADB] Current device property ‘ro.build.version.sdk’: 25
[ADB] Device API level: 25
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping’
[AndroidDriver] Pushing settings apk to device…
[ADB] Getting install status for io.appium.settings
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings’
[ADB] ‘io.appium.settings’ is installed
[ADB] Getting package info for ‘io.appium.settings’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings’
[ADB] The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘3.1.0’ >= ‘3.1.0’)
[ADB] There is no need to install/upgrade ‘C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk’
[ADB] Getting IDs of all ‘io.appium.settings’ processes
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell ‘pgrep --help; echo $?’’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell ‘pgrep ^appium\.settings$ || pgrep ^io\.appium\.setti$’’
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android:mock_location allow’
[Logcat] Starting logcat capture
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8201
[ADB] Forwarding system: 8201 to device: 6790
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward tcp:8201 tcp:6790’
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server’
[ADB] ‘io.appium.uiautomator2.server’ is installed
[ADB] Getting package info for ‘io.appium.uiautomator2.server’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server’
[ADB] The version name of the installed ‘io.appium.uiautomator2.server’ is greater or equal to the application version name (‘4.5.5’ >= ‘4.5.5’)
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[ADB] Checking app cert for C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[ADB] Using ‘apksigner.jar’ from ‘C:\Users\1025226\AppData\Local\Android\Sdk\build-tools\29.0.0-rc3\lib\apksigner.jar’
[ADB] Starting apksigner: ‘C:\Program Files\Java\jdk-12.0.1\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Users\1025226\AppData\Local\Android\Sdk\build-tools\29.0.0-rc3\lib\apksigner.jar verify --print-certs C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk
[ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB]
[ADB] ‘C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk’ is signed with the default certificate
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test’
[ADB] ‘io.appium.uiautomator2.server.test’ is installed
[ADB] Checking app cert for C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] Starting apksigner: ‘C:\Program Files\Java\jdk-12.0.1\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Users\1025226\AppData\Local\Android\Sdk\build-tools\29.0.0-rc3\lib\apksigner.jar verify --print-certs C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB]
[ADB] ‘C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk’ is signed with the default certificate
[UiAutomator2] Server packages are not going to be (re)installed
[UiAutomator2] Waiting up to 30000ms for services to be available
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list instrumentation’
[UiAutomator2] Instrumentation target ‘io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner’ is available
[ADB] Checking app cert for C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk
[ADB] Starting apksigner: ‘C:\Program Files\Java\jdk-12.0.1\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Users\1025226\AppData\Local\Android\Sdk\build-tools\29.0.0-rc3\lib\apksigner.jar verify --print-certs ‘C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk’
[ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[ADB]
[ADB] ‘C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk’ is signed with the default certificate
[ADB] Getting install status for com.blueyonder.mobile.eso
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.blueyonder.mobile.eso’
[ADB] ‘com.blueyonder.mobile.eso’ is installed
[ADB] Getting package info for ‘com.blueyonder.mobile.eso’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.blueyonder.mobile.eso’
[ADB] The version name of the installed ‘com.blueyonder.mobile.eso’ is greater or equal to the application version name (‘2020.2.1’ >= ‘2020.2.1’)
[ADB] There is no need to install/upgrade ‘C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk’
[AndroidDriver] Performing fast reset on ‘com.blueyonder.mobile.eso’
[ADB] Getting install status for com.blueyonder.mobile.eso
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.blueyonder.mobile.eso’
[ADB] ‘com.blueyonder.mobile.eso’ is installed
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop com.blueyonder.mobile.eso’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm clear com.blueyonder.mobile.eso’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package com.blueyonder.mobile.eso’
[ADB] Retrieving requested permissions
[ADB] Retrieved 7 permission(s) from [“requested”] group(s)
[ADB] Retrieving granted permissions
[ADB] Retrieved 3 permission(s) from [“install”,“runtime”] group(s)
[ADB] Granting permissions [“android.permission.CAMERA”] to ‘com.blueyonder.mobile.eso’
[ADB] Got the following command chunks to execute: [[“pm”,“grant”,“com.blueyonder.mobile.eso”,“android.permission.CAMERA”,";"]]
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm grant com.blueyonder.mobile.eso android.permission.CAMERA ;’
[AndroidDriver] Performed fast reset on the installed ‘com.blueyonder.mobile.eso’ application (stop and clear)
[UiAutomator2] Performing shallow cleanup of automation leftovers
[UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test’
[UiAutomator2] Starting UIAutomator2 server 4.5.5
[UiAutomator2] Using UIAutomator2 server from ‘C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.5.apk’ and test from ‘C:\Users\1025226\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk’
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online…
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“emulator-5554”,“shell”,“am”,“instrument”,"-w",“io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner”]
[Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got response with unknown status: {“code”:“ECONNRESET”}
[WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8201/wd/hub/status] with no body
[WD Proxy] Got response with status 200: {“sessionId”:“None”,“value”:{“ready”:true,“message”:“UiAutomator2 Server is ready to accept commands”}}
[UiAutomator2] The initialization of the instrumentation process took 2044ms
[WD Proxy] Matched ‘/session’ to command name ‘createSession’
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8201/wd/hub/session] with body: {“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:false,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:true,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”},“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:false,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:true,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”,“deviceUDID”:“emulator-…
[WD Proxy] Got response with status 200: {“sessionId”:“0f959f48-0c7a-4d8a-86ba-39c95374eb1b”,“value”:{“sessionId”:“0f959f48-0c7a-4d8a-86ba-39c95374eb1b”,“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:false,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:true,“fullReset”:”",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”},“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:false,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:true,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPa…
[WD Proxy] Determined the downstream protocol as ‘W3C’
[WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8201/wd/hub/session/0f959f48-0c7a-4d8a-86ba-39c95374eb1b/appium/device/info] with no body
[WD Proxy] Got response with status 200: {“sessionId”:“0f959f48-0c7a-4d8a-86ba-39c95374eb1b”,“value”:{“androidId”:“6ef6c0640ce028fa”,“manufacturer”:“Google”,“model”:“Android SDK built for x86”,“brand”:“google”,“apiVersion”:“25”,“platformVersion”:“7.1.1”,“carrierName”:“Android”,“realDisplaySize”:“1080x1920”,“displayDensity”:420,“networks”:[{“type”:1,“typeName”:“WIFI”,“subtype”:0,“subtypeName”:”",“isConnected”:true,“detailedState”:“CONNECTED”,“state”:“CONNECTED”,“extraInfo”:"“AndroidWifi”",“isAvailable”:true,“isFailover”:false,“isRoaming”:false,“capabilities”:{“transportTypes”:“TRANSPORT_WIFI”,“networkCapabilities”:“NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_INTERNET,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_VALIDATED”,“linkUpstreamBandwidthKbps”:1048576,“linkDownBandwidthKbps”:1048576,“signalStrength”:-50,“networkSpecifier”:null,“SSID”:null}}],“locale”:“en_US”,“timeZone”:“Asia/Calcutta”,“bluetooth”:null}}
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window’
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.blueyonder.mobile.eso/crc644e5a39b7cfaf2c9e.SplashActivity and waiting for ‘com.blueyonder.mobile.eso/crc644e5a39b7cfaf2c9e.SplashActivity’
[ADB] Running ‘C:\Users\1025226\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.blueyonder.mobile.eso/crc644e5a39b7cfaf2c9e.SplashActivity -S’
[WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8201/wd/hub/session/0f959f48-0c7a-4d8a-86ba-39c95374eb1b/appium/device/pixel_ratio] with body: {}
[WD Proxy] Got response with status 200: {“sessionId”:“0f959f48-0c7a-4d8a-86ba-39c95374eb1b”,“value”:2.625}
[WD Proxy] Matched ‘/appium/device/system_bars’ to command name ‘getSystemBars’
[WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8201/wd/hub/session/0f959f48-0c7a-4d8a-86ba-39c95374eb1b/appium/device/system_bars] with body: {}
[WD Proxy] Got response with status 200: {“sessionId”:“0f959f48-0c7a-4d8a-86ba-39c95374eb1b”,“value”:{“statusBar”:63}}
[WD Proxy] Matched ‘/window/current/size’ to command name ‘getWindowSize’
[WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8201/wd/hub/session/0f959f48-0c7a-4d8a-86ba-39c95374eb1b/window/current/size] with body: {}
[WD Proxy] Got response with status 200: {“sessionId”:“0f959f48-0c7a-4d8a-86ba-39c95374eb1b”,“value”:{“height”:1794,“width”:1080}}
[Appium] New AndroidUiautomator2Driver session created successfully, session 83a16833-45fe-42f1-9d7e-6c5d81fab002 added to master session list
[BaseDriver] Event ‘newSessionStarted’ logged at 1610895604096 (20:30:04 GMT+0530 (India Standard Time))
[W3C (83a16833)] Cached the protocol value ‘W3C’ for the new session 83a16833-45fe-42f1-9d7e-6c5d81fab002
[W3C (83a16833)] Responding to client with driver.createSession() result: {“capabilities”:{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:false,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:true,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”},“platformName”:“Android”,“platformVersion”:“7.1.1”,“deviceName”:“emulator-5554”,“noReset”:false,“udid”:“emulator-5554”,“app”:“C:\Users\1025226\OneDrive - JDA Software Inc\jda\ESO\eso_alpha_release_2020.2.1.apk”,“autoGrantPermissions”:true,“fullReset”:"",“autoAcceptAlerts”:“true”,“appPackage”:“com.blueyonder.mobile.eso”,“appActivity”:“crc644e5a39b7cfaf2c9e.SplashActivity”,“deviceUDID”:“emulator-5554”,"deviceAp…
[HTTP] <-- POST /wd/hub/session 200 14249 ms - 1323
[HTTP]

The below steps fixed my issue:

pip uninstall pytest-appium  # get rid of the wrong one
git clone https://github.com/GlobalRadio/pytest-appium.git
cd pytest-appium
pip install .