Socket hang up on Appium Beta

After upgrading appium to beta, I started getting socket hang up error.
My system: Windows 10 x64
Appium version - v1.21.0-beta.0
If i uninstall all ui-automator apps on my device, and rerun tests, the error does not appear and the test succeeds. but all subsequent tests get the same error.
My log in the console:

[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] deviceId
[BaseDriver] remoteAppsCacheLimit
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[Appium] Appium v1.21.0-beta.0 creating new AndroidUiautomator2Driver (v1.64.0) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] “alwaysMatch”: {
[debug] [BaseDriver] “appium:deviceId”: “10.10.1.229”,
[debug] [BaseDriver] “platformName”: “android”,
[debug] [BaseDriver] “appium:remoteAppsCacheLimit”: “10”,
[debug] [BaseDriver] “appium:appActivity”: “eld.trackensure.SplashScreenActivity”,
[debug] [BaseDriver] “appium:appPackage”: “com.trackensure.eld.debug”,
[debug] [BaseDriver] “appium:appWaitActivity”: “eld.trackensure.activityforms.authorization.LoginActivity”,
[debug] [BaseDriver] “appium:autoGrantPermissions”: “true”,
[debug] [BaseDriver] “appium:automationName”: “uiautomator2”,
[debug] [BaseDriver] “appium:deviceName”: “TrackEnsure”,
[debug] [BaseDriver] “appium:disableWindowAnimation”: “true”,
[debug] [BaseDriver] “appium:newCommandTimeout”: “0”,
[debug] [BaseDriver] “appium:noReset”: “false”,
[debug] [BaseDriver] “appium:platformVersion”: “10”,
[debug] [BaseDriver] “appium:systemPort”: “8211”
[debug] [BaseDriver] },
[debug] [BaseDriver] “firstMatch”: [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability ‘noReset’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability ‘disableWindowAnimation’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability ‘autoGrantPermissions’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Capability ‘newCommandTimeout’ changed from string (‘0’) to integer (0). This may cause unexpected behavior[BaseDriver] Capability ‘systemPort’ changed from string (‘8211’) to integer (8211). This may cause unexpected behavior
[BaseDriver] Capability ‘remoteAppsCacheLimit’ changed from string (‘10’) to integer (10). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] deviceId
[BaseDriver] Session created with session id: 343cd0a0-ff6b-46c3-a1c9-da7cc48e87a2
[UiAutomator2] Starting ‘com.trackensure.eld.debug’ directly on the device
[ADB] Using ‘adb.exe’ from ‘C:\Android\sdk\platform-tools\adb.exe’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 start-server’
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{“udid”:“10.10.1.80:5555”,“state”:“device”}]
[AndroidDriver] Looking for a device with Android ‘10.0.0’
[debug] [ADB] Setting device id to 10.10.1.80:5555
[ADB] Getting device platform version
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell getprop ro.build.version.release’
[debug] [ADB] Current device property ‘ro.build.version.release’: 10
[AndroidDriver] Using device: 10.10.1.80:5555
[ADB] Using ‘adb.exe’ from ‘C:\Android\sdk\platform-tools\adb.exe’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 start-server’
[debug] [ADB] Setting device id to 10.10.1.80:5555
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell getprop ro.build.version.sdk’
[debug] [ADB] Current device property ‘ro.build.version.sdk’: 29
[ADB] Getting device platform version
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell getprop ro.build.version.release’
[debug] [ADB] Current device property ‘ro.build.version.release’: 10
[debug] [ADB] Device API level: 29
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell ‘settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1’’
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 wait-for-device’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell echo ping’
[debug] [AndroidDriver] Pushing settings apk to device…
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package io.appium.settings’
[debug] [ADB] ‘io.appium.settings’ is installed
[debug] [ADB] Getting package info for ‘io.appium.settings’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package io.appium.settings’
[debug] [ADB] The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘3.2.1’ >= ‘3.2.1’)
[debug] [ADB] There is no need to install/upgrade ‘C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk’
[debug] [ADB] Getting IDs of all ‘io.appium.settings’ processes
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell ‘pgrep --help; echo $?’’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)’
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell appops set io.appium.settings android:mock_location allow’
[debug] [Logcat] Starting logs capture with command: C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 logcat -v threadtime
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8211
[debug] [ADB] Forwarding system: 8211 to device: 6790
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 forward tcp:8211 tcp:6790’
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package io.appium.uiautomator2.server’
[debug] [ADB] ‘io.appium.uiautomator2.server’ is installed
[debug] [ADB] Getting package info for ‘io.appium.uiautomator2.server’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package io.appium.uiautomator2.server’
[debug] [ADB] The version name of the installed ‘io.appium.uiautomator2.server’ is greater or equal to the application version name (‘4.20.0’ >= ‘4.20.0’)
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [ADB] Checking app cert for C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.20.0.apk
[ADB] Using ‘apksigner.jar’ from ‘C:\Android\sdk\build-tools\29.0.3\lib\apksigner.jar’
[debug] [ADB] Starting apksigner: ‘C:\Program Files\Java\jdk1.8.0_281\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Android\sdk\build-tools\29.0.3\lib\apksigner.jar verify --print-certs C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.20.0.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] sha256 hash did match for ‘appium-uiautomator2-server-v4.20.0.apk’
[ADB] ‘C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.20.0.apk’ is signed with the default certificate
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package io.appium.uiautomator2.server.test’
[debug] [ADB] ‘io.appium.uiautomator2.server.test’ is installed
[debug] [ADB] Checking app cert for C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting apksigner: ‘C:\Program Files\Java\jdk1.8.0_281\bin\java.exe’ -Xmx1024M -Xss1m -jar C:\Android\sdk\build-tools\29.0.3\lib\apksigner.jar verify --print-certs C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: [email protected], CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] sha256 hash did match for ‘appium-uiautomator2-server-debug-androidTest.apk’
[ADB] ‘C:\Users\Vadim\AppData\Roaming\npm\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
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell pm list instrumentation’
[debug] [UiAutomator2] Instrumentation target ‘io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner’ is available
[ADB] Adding packages [“io.appium.settings”,“io.appium.uiautomator2.server”,“io.appium.uiautomator2.server.test”] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [[“dumpsys”,“deviceidle”,“whitelist”,"+io.appium.settings",";",“dumpsys”,“deviceidle”,“whitelist”,"+io.appium.uiautomator2.server",";",“dumpsys”,“deviceidle”,“whitelist”,"+io.appium.uiautomator2.server.test",";"]]
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;’
[debug] [UiAutomator2] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for com.trackensure.eld.debug
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package com.trackensure.eld.debug’
[debug] [ADB] ‘com.trackensure.eld.debug’ is installed
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell am force-stop com.trackensure.eld.debug’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell pm clear com.trackensure.eld.debug’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell dumpsys package com.trackensure.eld.debug’
[debug] [ADB] Retrieving requested permissions
[debug] [ADB] Retrieved 34 permissions from requested group
[debug] [ADB] Retrieving granted permissions
[debug] [ADB] Retrieved 11 permissions from install,runtime groups
[debug] [ADB] Granting permissions [“android.permission.READ_EXTERNAL_STORAGE”,“android.permission.WRITE_EXTERNAL_STORAGE”,“android.permission.READ_PHONE_STATE”,“android.permission.ACCESS_COARSE_LOCATION”,“android.permission.ACCESS_FINE_LOCATION”,“android.permission.CAMERA”,“android.permission.ACCESS_FINE_LOCATION”,“android.permission.READ_EXTERNAL_STORAGE”,“android.permission.ACCESS_COARSE_LOCATION”,“android.permission.READ_PHONE_STATE”,“android.permission.CAMERA”,“android.permission.WRITE_EXTERNAL_STORAGE”] to ‘com.trackensure.eld.debug’
[debug] [ADB] Got the following command chunks to execute: [[“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.READ_EXTERNAL_STORAGE”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.WRITE_EXTERNAL_STORAGE”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.READ_PHONE_STATE”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.ACCESS_COARSE_LOCATION”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.ACCESS_FINE_LOCATION”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.CAMERA”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.ACCESS_FINE_LOCATION”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.READ_EXTERNAL_STORAGE”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.ACCESS_COARSE_LOCATION”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.READ_PHONE_STATE”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.CAMERA”,";",“pm”,“grant”,“com.trackensure.eld.debug”,“android.permission.WRITE_EXTERNAL_STORAGE”,";"]][debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell pm grant com.trackensure.eld.debug android.permission.READ_EXTERNAL_STORAGE ; pm grant com.trackensure.eld.debug android.permission.WRITE_EXTERNAL_STORAGE ; pm grant com.trackensure.eld.debug android.permission.READ_PHONE_STATE ; pm grant com.trackensure.eld.debug android.permission.ACCESS_COARSE_LOCATION ; pm grant com.trackensure.eld.debug android.permission.ACCESS_FINE_LOCATION ; pm grant com.trackensure.eld.debug android.permission.CAMERA ; pm grant com.trackensure.eld.debug android.permission.ACCESS_FINE_LOCATION ; pm grant com.trackensure.eld.debug android.permission.READ_EXTERNAL_STORAGE ; pm grant com.trackensure.eld.debug android.permission.ACCESS_COARSE_LOCATION ; pm grant com.trackensure.eld.debug android.permission.READ_PHONE_STATE ; pm grant com.trackensure.eld.debug android.permission.CAMERA ; pm grant com.trackensure.eld.debug android.permission.WRITE_EXTERNAL_STORAGE ;’
[debug] [AndroidDriver] Performed fast reset on the installed ‘com.trackensure.eld.debug’ application (stop and clear)
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (timeout of 500ms exceeded)
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell am force-stop io.appium.uiautomator2.server.test’
[UiAutomator2] Starting UIAutomator2 server 4.20.0
[UiAutomator2] Using UIAutomator2 server from ‘C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.20.0.apk’ and test from ‘C:\Users\Vadim\AppData\Roaming\npm\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…
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“10.10.1.80:5555”,“shell”,“am”,“instrument”,"-w","–no-window-animation",“io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner”]
[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8211/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“None”,“value”:{“message”:“UiAutomator2 Server is ready to accept commands”,“ready”:true}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 635ms
[debug] [WD Proxy] Matched ‘/session’ to command name ‘createSession’
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8211/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”,“deviceId”:“10.10.1.229”,“remoteAppsCacheLimit”:10,“appActivity”:“eld.trackensure.SplashScreenActivity”,“appPackage”:“com.trackensure.eld.debug”,“appWaitActivity”:“eld.trackensure.activityforms.authorization.LoginActivity”,“autoGrantPermissions”:true,“automationName”:“uiautomator2”,“deviceName”:“TrackEnsure”,“disableWindowAnimation”:true,“newCommandTimeout”:0,“noReset”:false,“platformVersion”:“10”,“systemPort”:8211},“platformName”:“android”,“deviceId”:“10.10.1.229”,“remoteAppsCacheLimit”:10,“appActivity”:“eld.trackensure.SplashScreenActivity”,“appPackage”:“com.trackensure.eld.debug”,“appWaitActivity”:“eld.trackensure.activityforms.authorization.LoginActivity”,“autoGrantPermissions”:true,“automationName”:“uiautomator2”,“deviceName”:“10.10.1.80:5555”,…
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“26c623c2-5314-4c61-8288-98a78c3e6c23”,“value”:{“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“android”,“deviceId”:“10.10.1.229”,“remoteAppsCacheLimit”:10,“appActivity”:“eld.trackensure.SplashScreenActivity”,“appPackage”:“com.trackensure.eld.debug”,“appWaitActivity”:“eld.trackensure.activityforms.authorization.LoginActivity”,“autoGrantPermissions”:true,“automationName”:“uiautomator2”,“deviceName”:“TrackEnsure”,“disableWindowAnimation”:true,“newCommandTimeout”:0,“noReset”:false,“platformVersion”:“10”,“systemPort”:8211},“platformName”:“android”,“deviceId”:“10.10.1.229”,“remoteAppsCacheLimit”:10,“appActivity”:“eld.trackensure.SplashScreenActivity”,“appPackage”:“com.trackensure.eld.debug”,“appWaitActivity”:“eld.trackensure.activityforms.authorization.LoginActivity”,“autoGrantPermissions”:true,"au…
[WD Proxy] Determined the downstream protocol as ‘W3C’
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8211/wd/hub/session/26c623c2-5314-4c61-8288-98a78c3e6c23/appium/device/info] with no body
[WD Proxy] socket hang up
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8211/wd/hub/session/26c623c2-5314-4c61-8288-98a78c3e6c23] with no body
[debug] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [Instrumentation] INSTRUMENTATION_CODE: 0
[debug] [Instrumentation] The process has exited with code 0
[WD Proxy] socket hang up
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell am force-stop com.trackensure.eld.debug’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8211
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 forward --remove tcp:8211’
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell ‘settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy’’
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1614600586295 (14:09:46 GMT+0200 (Восточная Европа, стандартное время))
[debug] [W3C] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
[debug] [W3C] at UIA2Proxy.command (C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:274:13)
[debug] [W3C] at runMicrotasks ()
[debug] [W3C] at processTicksAndRejections (internal/process/task_queues.js:93:5)
[debug] [W3C] at AndroidUiautomator2Driver.commands.mobileGetDeviceInfo (C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\commands\general.js:277:10)
[debug] [W3C] at AndroidUiautomator2Driver.addDeviceInfoToCaps (C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:450:9)
[debug] [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:406:5)
[debug] [W3C] at AndroidUiautomator2Driver.createSession (C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\node_modules\appium-uiautomator2-driver\lib\driver.js:223:7)
[debug] [W3C] at AppiumDriver.createSession (C:\Users\Vadim\AppData\Roaming\npm\node_modules\appium\lib\appium.js:371:35)
[HTTP] <-- POST /wd/hub/session 500 9746 ms - 1537
[HTTP]
[debug] [AndroidDriver] The overall screen recording duration is 904s so far
[debug] [AndroidDriver] Starting the next 180s-chunk of screen recording in order to achieve 1800s total duration
[debug] [ADB] Building screenrecord process with the command line: adb -P 5037 -s 10.10.1.80:5555 shell screenrecord --time-limit 180 /sdcard/f46d6a55.mp4
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell “[ -e ‘/sdcard/f46d6a55.mp4’ ] && echo PASS”’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell “[ -e ‘/sdcard/f46d6a55.mp4’ ] && echo PASS”’
[debug] [AndroidDriver] The overall screen recording duration is 1085s so far
[debug] [AndroidDriver] Starting the next 180s-chunk of screen recording in order to achieve 1800s total duration
[debug] [ADB] Building screenrecord process with the command line: adb -P 5037 -s 10.10.1.80:5555 shell screenrecord --time-limit 180 /sdcard/58b340a2.mp4
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell “[ -e ‘/sdcard/58b340a2.mp4’ ] && echo PASS”’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell “[ -e ‘/sdcard/58b340a2.mp4’ ] && echo PASS”’
[debug] [AndroidDriver] The overall screen recording duration is 1265s so far
[debug] [AndroidDriver] Starting the next 180s-chunk of screen recording in order to achieve 1800s total duration
[debug] [ADB] Building screenrecord process with the command line: adb -P 5037 -s 10.10.1.80:5555 shell screenrecord --time-limit 180 /sdcard/24bd1464.mp4
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell “[ -e ‘/sdcard/24bd1464.mp4’ ] && echo PASS”’
[debug] [ADB] Running ‘C:\Android\sdk\platform-tools\adb.exe -P 5037 -s 10.10.1.80:5555 shell “[ -e ‘/sdcard/24bd1464.mp4’ ] && echo PASS”’

Please provide the logcat output to get more info on why the process is crashing