Is there a way to continue using the session before restarting the program

In the development, I modified or added some code. For testing, I always need to close the program by ctrl+c , and then re-run node test.js . At this time, the APP controlled by the code will restart.

Is there a way to keep the app in its current state, no matter how many times my program restarts?

I used one of the Capabilities supported by Appium: noReset, but it didn’t work.

Environment

  • Appium version : 7.14.1
  • Desktop OS/version used to run Appium: Windows10
  • Node.js version (unless using Appium.app|exe): v16.3.0
  • Npm or Yarn package manager: Npm
  • Mobile platform/version under test: Android6.0
  • Real device or emulator/simulator: emulator/simulator

When my program is testing an interface of the APP, I may find that the code is wrong, and then I want to modify my program code, and then test again, this is a very normal thing.
The problem is that every time I run the test, the target APP will restart and return to its first interface, so I have to make the APP enter the interface that needs to be tested.
When the APP interface I want to test is very deep, this matter becomes strenuous.
Am I the only one encountering this problem? Do you like to restart the app when you test it?

Below is my code appium_test.mjs

import wdio from 'webdriverio'

const opts = {
    path: '/wd/hub',
    port: 4723,
    capabilities: {
	"platformName": "Android",
	"platformVersion": "6.0.1",
	"deviceName": "xiaomi",
	"app": "e:/Instagram_v208.0.0.32.135_apkpure.com.apk",
	"appPackage": "com.instagram.android",
	"appActivity": "com.instagram.mainactivity.MainActivity",
	"automationName": "UiAutomator2",
	"newCommandTimeout": 3600,
	"noReset": true
    }
}

async function main () {
    const client = await wdio.remote(opts)
    console.log(client)
}

main()

I ran node appium_test.mjs twice. After the first run, the app was opened, and after the second run, the app was restarted.
I read the appium log carefully, and when I ran the test for the second time, it output:

The following obsolete sessions are still running: ["cabc7768-800e-4f21-aa4d-5a908622bd34"]
Cleaning up 1 obsolete session

The following is the complete appium log.


[Appium] Welcome to Appium v1.22.0
[Appium] Non-default server args:
[Appium]   relaxedSecurityEnabled: true
[Appium]   allowInsecure: {
[Appium]   }
[Appium]   denyInsecure: {
[Appium]   }
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true}}
[W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},null,{"alwaysMatch":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"firstMatch":[{}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1634086735062 (08:58:55 GMT+0800 (中国标准时间))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   platformVersion
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   appPackage
[BaseDriver]   appActivity
[BaseDriver]   automationName
[BaseDriver]   newCommandTimeout
[BaseDriver]   noReset
[Appium] Appium v1.22.0 creating new AndroidUiautomator2Driver (v1.69.0) session
[Appium] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver]   "alwaysMatch": {
[BaseDriver]     "platformName": "Android",
[BaseDriver]     "appium:platformVersion": "6.0.1",
[BaseDriver]     "appium:deviceName": "xiaomi",
[BaseDriver]     "appium:app": "e:/Instagram_v208.0.0.32.135_apkpure.com.apk",
[BaseDriver]     "appium:appPackage": "com.instagram.android",
[BaseDriver]     "appium:appActivity": "com.instagram.mainactivity.MainActivity",
[BaseDriver]     "appium:automationName": "UiAutomator2",
[BaseDriver]     "appium:newCommandTimeout": 3600,
[BaseDriver]     "appium:noReset": true
[BaseDriver]   },
[BaseDriver]   "firstMatch": [
[BaseDriver]     {}
[BaseDriver]   ]
[BaseDriver] }
[BaseDriver] Session created with session id: cada8794-83db-4944-87e8-f294ea102cbd
[BaseDriver] Using local app 'e:/Instagram_v208.0.0.32.135_apkpure.com.apk'
[UiAutomator2] Checking whether app is actually present
[ADB] Found 2 'build-tools' folders under 'D:\Android' (newest first):
[ADB]     D:/Android/build-tools/30.0.3
[ADB]     D:/Android/build-tools/28.0.3
[ADB] Using 'adb.exe' from 'D:\Android\platform-tools\adb.exe'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 start-server'
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"127.0.0.1:7555","state":"device"}]
[AndroidDriver] Looking for a device with Android '6.0.1'
[ADB] Setting device id to 127.0.0.1:7555
[ADB] Getting device platform version
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 6.0.1
[AndroidDriver] Using device: 127.0.0.1:7555
[ADB] Using 'adb.exe' from 'D:\Android\platform-tools\adb.exe'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 start-server'
[ADB] Setting device id to 127.0.0.1:7555
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 23
[ADB] Device API level: 23
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 wait-for-device'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.settings'
[ADB] 'io.appium.settings' is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 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.4.0' >= '3.4.0')
[ADB] There is no need to install/upgrade 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\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 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'pgrep --help; echo $?''
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[AndroidDriver] Granting permissions SET_ANIMATION_SCALE,CHANGE_CONFIGURATION,ACCESS_FINE_LOCATION to 'io.appium.settings'
[ADB] Granting permissions ["android.permission.SET_ANIMATION_SCALE","android.permission.CHANGE_CONFIGURATION","android.permission.ACCESS_FINE_LOCATION"] to 'io.appium.settings'
[ADB] Got the following command chunks to execute: [["pm","grant","io.appium.settings","android.permission.SET_ANIMATION_SCALE",";","pm","grant","io.appium.settings","android.permission.CHANGE_CONFIGURATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_FINE_LOCATION",";"]]
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pm grant io.appium.settings android.permission.SET_ANIMATION_SCALE ; pm grant io.appium.settings android.permission.CHANGE_CONFIGURATION ; pm grant io.appium.settings android.permission.ACCESS_FINE_LOCATION ;'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[ADB] Starting Appium Settings app
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell appops set io.appium.settings android:mock_location allow'
[Logcat] Starting logs capture with command: D:\\Android\\platform-tools\\adb.exe -P 5037 -s 127.0.0.1\:7555 logcat -v threadtime
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward tcp:8200 tcp:6790'
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 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 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 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.24.0' >= '4.24.0')
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[ADB] Checking app cert for C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk
[ADB] Using 'apksigner.jar' from 'D:\Android\build-tools\30.0.3\lib\apksigner.jar'
[ADB] Starting apksigner: D:\\Java\\jdk-15\\bin\\java.exe -Xmx1024M -Xss1m -jar D:\\Android\\build-tools\\30.0.3\\lib\\apksigner.jar verify --print-certs 'C:\\Users\\dashe\\AppData\\Local\\Programs\\Appium Server GUI\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-v4.24.0.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] sha256 hash did match for 'appium-uiautomator2-server-v4.24.0.apk'
[ADB] 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk' is signed with the default certificate
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] 'io.appium.uiautomator2.server.test' is installed
[ADB] Checking app cert for C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] Starting apksigner: D:\\Java\\jdk-15\\bin\\java.exe -Xmx1024M -Xss1m -jar D:\\Android\\build-tools\\30.0.3\\lib\\apksigner.jar verify --print-certs 'C:\\Users\\dashe\\AppData\\Local\\Programs\\Appium Server GUI\\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] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\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 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pm list instrumentation'
[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
[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",";"]]
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[ADB] Checking app cert for e:/Instagram_v208.0.0.32.135_apkpure.com.apk
[ADB] Starting apksigner: D:\\Java\\jdk-15\\bin\\java.exe -Xmx1024M -Xss1m -jar D:\\Android\\build-tools\\30.0.3\\lib\\apksigner.jar verify --print-certs e\:/Instagram_v208.0.0.32.135_apkpure.com.apk
[ADB] apksigner stdout: Signer #1 certificate DN: CN=Kevin Systrom, O=Instagram Inc, L=San Francisco, ST=California, C=US
[ADB] Signer #1 certificate SHA-256 digest: 5f3e50f435583c9ae626302a71f7340044087a7e2c60adacfc254205a993e305
[ADB] Signer #1 certificate SHA-1 digest: c56fb7d591ba6704df047fd98f535372fea00211
[ADB] Signer #1 certificate MD5 digest: f9cf2124dfaaccc45e7e3f739eca55ae
[ADB] 
[ADB] 'e:/Instagram_v208.0.0.32.135_apkpure.com.apk' is signed with a non-default certificate
[ADB] Getting install status for com.instagram.android
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package com.instagram.android'
[ADB] 'com.instagram.android' is installed
[ADB] Getting package info for 'com.instagram.android'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package com.instagram.android'
[ADB] The version code of the installed 'com.instagram.android' is greater than the application version code (320804014 > 320804012)
[ADB] There is no need to downgrade 'com.instagram.android'
[UiAutomator2] Performing shallow cleanup of automation leftovers
[UiAutomator2] No obsolete sessions have been detected (socket hang up)
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 4.24.0
[UiAutomator2] Using UIAutomator2 server from 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk' and test from 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\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","127.0.0.1:7555","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[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:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[UiAutomator2] The initialization of the instrumentation process took 2049ms
[WD Proxy] Matched '/session' to command name 'createSession'
[WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/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":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"platformName":"Android","platformVersion":"6.0.1","deviceName":"127.0.0.1:7555","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}}}
[WD Proxy] Got response with status 200: {"sessionId":"cabc7768-800e-4f21-aa4d-5a908622bd34","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"platformName":"Android","platformVersion":"6.0.1","deviceName":"127.0.0.1:7555","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}},"sessionId":"cabc7768-800e-4f21-aa4d-5a908622bd34"}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/cabc7768-800e-4f21-aa4d-5a908622bd34/appium/device/info] with no body
[WD Proxy] Got response with status 200: {"sessionId":"cabc7768-800e-4f21-aa4d-5a908622bd34","value":{"androidId":"86ec4e0efac0eea9","apiVersion":"23","bluetooth":{"state":"OFF"},"brand":"Xiaomi","carrierName":"中国电信","displayDensity":270,"locale":"zh_CN","manufacturer":"Xiaomi","model":"MI 6 Plus","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":1048576,"linkUpstreamBandwidthKbps":1048576,"networkCapabilities":"NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_INTERNET,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_VALIDATED","signalStrength":-55,"transportTypes":"TRANSPORT_WIFI"},"detailedState":"CONNECTED","extraInfo":"\"Yy3137xs\"","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":0,"subtypeName":"","type":1,"typeName":"WIFI"}],"platformVersion":"6.0.1","realDisplaySize":"1440x810","timeZone":"Asia/Shanghai"}}
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.instagram.android/com.instagram.mainactivity.MainActivity and waiting for 'com.instagram.android/com.instagram.mainactivity.MainActivity'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am start -W -n com.instagram.android/com.instagram.mainactivity.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/cabc7768-800e-4f21-aa4d-5a908622bd34/appium/device/pixel_ratio] with no body
[WD Proxy] Got response with status 200: {"sessionId":"cabc7768-800e-4f21-aa4d-5a908622bd34","value":1.6875}
[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:8200/wd/hub/session/cabc7768-800e-4f21-aa4d-5a908622bd34/appium/device/system_bars] with no body
[WD Proxy] Got response with status 200: {"sessionId":"cabc7768-800e-4f21-aa4d-5a908622bd34","value":{"statusBar":41}}
[WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/cabc7768-800e-4f21-aa4d-5a908622bd34/window/current/size] with no body
[WD Proxy] Got response with status 200: {"sessionId":"cabc7768-800e-4f21-aa4d-5a908622bd34","value":{"height":1440,"width":810}}
[Appium] New AndroidUiautomator2Driver session created successfully, session cada8794-83db-4944-87e8-f294ea102cbd added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1634086751511 (08:59:11 GMT+0800 (中国标准时间))
[W3C (cada8794)] Cached the protocol value 'W3C' for the new session cada8794-83db-4944-87e8-f294ea102cbd
[W3C (cada8794)] 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":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"platformName":"Android","platformVersion":"6.0.1","deviceName":"127.0.0.1:7555","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true,"deviceUDID":"127.0.0.1:7555","deviceApiLevel":23,"deviceScreenSize":"1440x810","deviceScreenDensity":270,"deviceModel":"MI 6 Plus","deviceManufacturer":"Xiaomi","pixelRatio":1.6875,"statBarHeight":41,"viewpo...
[HTTP] <-- POST /wd/hub/session 200 16453 ms - 1137
[HTTP] 
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true}}
[W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},null,{"alwaysMatch":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"firstMatch":[{}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1634086852076 (09:00:52 GMT+0800 (中国标准时间))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   platformVersion
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   appPackage
[BaseDriver]   appActivity
[BaseDriver]   automationName
[BaseDriver]   newCommandTimeout
[BaseDriver]   noReset
[Appium] Appium v1.22.0 creating new AndroidUiautomator2Driver (v1.69.0) session
[Appium] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[BaseDriver] Creating session with W3C capabilities: {
[BaseDriver]   "alwaysMatch": {
[BaseDriver]     "platformName": "Android",
[BaseDriver]     "appium:platformVersion": "6.0.1",
[BaseDriver]     "appium:deviceName": "xiaomi",
[BaseDriver]     "appium:app": "e:/Instagram_v208.0.0.32.135_apkpure.com.apk",
[BaseDriver]     "appium:appPackage": "com.instagram.android",
[BaseDriver]     "appium:appActivity": "com.instagram.mainactivity.MainActivity",
[BaseDriver]     "appium:automationName": "UiAutomator2",
[BaseDriver]     "appium:newCommandTimeout": 3600,
[BaseDriver]     "appium:noReset": true
[BaseDriver]   },
[BaseDriver]   "firstMatch": [
[BaseDriver]     {}
[BaseDriver]   ]
[BaseDriver] }
[BaseDriver] Session created with session id: 8965cb8a-7ef9-481b-8389-49fd8513c5fd
[BaseDriver] Using local app 'e:/Instagram_v208.0.0.32.135_apkpure.com.apk'
[UiAutomator2] Checking whether app is actually present
[ADB] Using 'adb.exe' from 'D:\Android\platform-tools\adb.exe'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 start-server'
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"127.0.0.1:7555","state":"device"}]
[AndroidDriver] Looking for a device with Android '6.0.1'
[ADB] Setting device id to 127.0.0.1:7555
[ADB] Getting device platform version
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 6.0.1
[AndroidDriver] Using device: 127.0.0.1:7555
[ADB] Using 'adb.exe' from 'D:\Android\platform-tools\adb.exe'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 start-server'
[ADB] Setting device id to 127.0.0.1:7555
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 23
[ADB] Device API level: 23
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 wait-for-device'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.settings'
[ADB] 'io.appium.settings' is installed
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 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.4.0' >= '3.4.0')
[ADB] There is no need to install/upgrade 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\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 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1\:7555 shell 'pgrep --help; echo $?''
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell appops set io.appium.settings android:mock_location allow'
[Logcat] Starting logs capture with command: D:\\Android\\platform-tools\\adb.exe -P 5037 -s 127.0.0.1\:7555 logcat -v threadtime
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8201
[ADB] Forwarding system: 8201 to device: 6790
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 forward tcp:8201 tcp:6790'
[ADB] Getting install status for io.appium.uiautomator2.server
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 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 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 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.24.0' >= '4.24.0')
[UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[ADB] Checking app cert for C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk
[ADB] Using the previously cached signature entry for 'appium-uiautomator2-server-v4.24.0.apk'
[ADB] sha256 hash did match for 'appium-uiautomator2-server-v4.24.0.apk'
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package io.appium.uiautomator2.server.test'
[ADB] 'io.appium.uiautomator2.server.test' is installed
[ADB] Checking app cert for C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[ADB] Using the previously cached signature entry for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Server packages are not going to be (re)installed
[UiAutomator2] Waiting up to 30000ms for services to be available
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell pm list instrumentation'
[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
[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",";"]]
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[ADB] Checking app cert for e:/Instagram_v208.0.0.32.135_apkpure.com.apk
[ADB] Using the previously cached signature entry for 'Instagram_v208.0.0.32.135_apkpure.com.apk'
[ADB] Getting install status for com.instagram.android
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package com.instagram.android'
[ADB] 'com.instagram.android' is installed
[ADB] Getting package info for 'com.instagram.android'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys package com.instagram.android'
[ADB] The version code of the installed 'com.instagram.android' is greater than the application version code (320804014 > 320804012)
[ADB] There is no need to downgrade 'com.instagram.android'
[UiAutomator2] Performing shallow cleanup of automation leftovers
[UiAutomator2] The following obsolete sessions are still running: ["cabc7768-800e-4f21-aa4d-5a908622bd34"]
[UiAutomator2] Cleaning up 1 obsolete session
[Instrumentation] .
[Instrumentation] Time: 111.291
[Instrumentation] 
[Instrumentation] OK (1 test)
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am force-stop io.appium.uiautomator2.server.test'
[Instrumentation] The process has exited with code 0
[UiAutomator2] Starting UIAutomator2 server 4.24.0
[UiAutomator2] Using UIAutomator2 server from 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk' and test from 'C:\Users\dashe\AppData\Local\Programs\Appium Server GUI\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","127.0.0.1:7555","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[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] socket hang up
[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] socket hang up
[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":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[UiAutomator2] The initialization of the instrumentation process took 2068ms
[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":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"platformName":"Android","platformVersion":"6.0.1","deviceName":"127.0.0.1:7555","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}}}
[WD Proxy] Got response with status 200: {"sessionId":"4235a42e-2f5f-4b67-b999-f07e2a7966dd","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"platformName":"Android","platformVersion":"6.0.1","deviceName":"127.0.0.1:7555","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true,"deviceUDID":"127.0.0.1:7555"}],"alwaysMatch":{}},"sessionId":"4235a42e-2f5f-4b67-b999-f07e2a7966dd"}}
[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/4235a42e-2f5f-4b67-b999-f07e2a7966dd/appium/device/info] with no body
[WD Proxy] Got response with status 200: {"sessionId":"4235a42e-2f5f-4b67-b999-f07e2a7966dd","value":{"androidId":"86ec4e0efac0eea9","apiVersion":"23","bluetooth":{"state":"OFF"},"brand":"Xiaomi","carrierName":"中国电信","displayDensity":270,"locale":"zh_CN","manufacturer":"Xiaomi","model":"MI 6 Plus","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":1048576,"linkUpstreamBandwidthKbps":1048576,"networkCapabilities":"NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_INTERNET,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_VALIDATED","signalStrength":-55,"transportTypes":"TRANSPORT_WIFI"},"detailedState":"CONNECTED","extraInfo":"\"Yy3137xs\"","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":0,"subtypeName":"","type":1,"typeName":"WIFI"}],"platformVersion":"6.0.1","realDisplaySize":"810x1440","timeZone":"Asia/Shanghai"}}
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.instagram.android/com.instagram.mainactivity.MainActivity and waiting for 'com.instagram.android/com.instagram.mainactivity.MainActivity'
[ADB] Running 'D:\Android\platform-tools\adb.exe -P 5037 -s 127.0.0.1:7555 shell am start -W -n com.instagram.android/com.instagram.mainactivity.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8201/wd/hub/session/4235a42e-2f5f-4b67-b999-f07e2a7966dd/appium/device/pixel_ratio] with no body
[WD Proxy] Got response with status 200: {"sessionId":"4235a42e-2f5f-4b67-b999-f07e2a7966dd","value":1.6875}
[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/4235a42e-2f5f-4b67-b999-f07e2a7966dd/appium/device/system_bars] with no body
[WD Proxy] Got response with status 200: {"sessionId":"4235a42e-2f5f-4b67-b999-f07e2a7966dd","value":{"statusBar":41}}
[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/4235a42e-2f5f-4b67-b999-f07e2a7966dd/window/current/size] with no body
[WD Proxy] Got response with status 200: {"sessionId":"4235a42e-2f5f-4b67-b999-f07e2a7966dd","value":{"height":1440,"width":810}}
[Appium] New AndroidUiautomator2Driver session created successfully, session 8965cb8a-7ef9-481b-8389-49fd8513c5fd added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1634086862247 (09:01:02 GMT+0800 (中国标准时间))
[W3C (8965cb8a)] Cached the protocol value 'W3C' for the new session 8965cb8a-7ef9-481b-8389-49fd8513c5fd
[W3C (8965cb8a)] 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":"6.0.1","deviceName":"xiaomi","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true},"platformName":"Android","platformVersion":"6.0.1","deviceName":"127.0.0.1:7555","app":"e:/Instagram_v208.0.0.32.135_apkpure.com.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.mainactivity.MainActivity","automationName":"UiAutomator2","newCommandTimeout":3600,"noReset":true,"deviceUDID":"127.0.0.1:7555","deviceApiLevel":23,"deviceScreenSize":"810x1440","deviceScreenDensity":270,"deviceModel":"MI 6 Plus","deviceManufacturer":"Xiaomi","pixelRatio":1.6875,"statBarHeight":41,"viewpo...
[HTTP] <-- POST /wd/hub/session 200 10172 ms - 1137
[HTTP] 

Try adding fullReset to capabilities and set it to false. Don’t remove noReset.

https://appium.io/docs/en/writing-running-appium/other/reset-strategies/index.html