I can't get the "noReset" feature not work the way I expect it to

Hello, members of the forum

I have set “desired caps” as below:

    desired_caps = {}
    desired_caps['platformName'] = 'Android'
    desired_caps['deviceName'] = 'Android'
    desired_caps['automationName'] = 'UiAutomator2'
    desired_caps['udid'] = Udid
    desired_caps['app'] = (PathFileAPK+'Instagram_x86.apk')
    desired_caps['appPackage'] = "com.instagram.android"
    desired_caps['appActivity'] = 'com.instagram.android.activity.MainTabActivity'
    desired_caps['noReset'] = True

    global driver
    driver = webdriver.Remote(f'http://127.0.0.1:4723/wd/hub', desired_caps)

But when the “noReset” feature is set to “True”, the application does not run!!!
And if I set it to “False” then it will exit Instagram “Log in” mode and that’s another problem!

Log:

[Appium] Welcome to Appium v2.5.4
[Appium] Non-default server args:
[Appium] {
[Appium]   basePath: '/wd/hub'
[Appium] }
[Appium] The autodetected Appium home path: /Users/amir/.appium
[Appium] Attempting to load driver mac2...
[Appium] Attempting to load driver espresso...
[Appium] Attempting to load driver safari...
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-mac2-driver/build/index.js
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-safari-driver/build/index.js
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-espresso-driver/build/index.js
[Appium] Mac2Driver has been successfully loaded in 2.310s
[Appium] SafariDriver has been successfully loaded in 2.310s
[Appium] EspressoDriver has been successfully loaded in 2.311s
[Appium] Attempting to load driver gecko...
[Appium] Attempting to load driver chromium...
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-uiautomator2-driver/build/index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 1.025s
(node:8860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
[Appium] Attempting to load driver xcuitest...
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-chromium-driver/index.js
[Appium] ChromiumDriver has been successfully loaded in 1.856s
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-geckodriver/build/index.js
[Appium] GeckoDriver has been successfully loaded in 1.964s
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-xcuitest-driver/build/index.js
[Appium] XCUITestDriver has been successfully loaded in 1.994s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723/wd/hub
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] 	http://127.0.0.1:4723/wd/hub (only accessible from the same host)
[Appium] 	http://192.168.43.94:4723/wd/hub
[Appium] 	http://172.17.255.1:4723/wd/hub
[Appium] Available drivers:
[Appium]   - [email protected] (automationName 'Mac2')
[Appium]   - [email protected] (automationName 'Espresso')
[Appium]   - [email protected] (automationName 'Safari')
[Appium]   - [email protected] (automationName 'Gecko')
[Appium]   - [email protected] (automationName 'Chromium')
[Appium]   - [email protected] (automationName 'UiAutomator2')
[Appium]   - [email protected] (automationName 'XCUITest')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] Request idempotency key: 71f4b74b-38cc-4393-b3a2-20b44c6fe49e
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"Android","appium:deviceName":"Android","appium:automationName":"UiAutomator2","appium:udid":"emulator-5554","appium:app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appium:appPackage":"com.instagram.android","appium:appActivity":"com.instagram.android.activity.MainTabActivity","appium:noReset":true}]},"desiredCapabilities":{"platformName":"Android","deviceName":"Android","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true}}
[AppiumDriver@3fac] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","deviceName":"Android","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true},null,{"firstMatch":[{"platformName":"Android","appium:deviceName":"Android","appium:automationName":"UiAutomator2","appium:udid":"emulator-5554","appium:app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appium:appPackage":"com.instagram.android","appium:appActivity":"com.instagram.android.activity.MainTabActivity","appium:noReset":true}]}]
[AppiumDriver@3fac] Event 'newSessionRequested' logged at 1714919965001 (18:09:25 GMT+0330 (Iran Standard Time))
[Appium] Attempting to find matching driver for automationName 'UiAutomator2' and platformName 'Android'
[Appium] The 'uiautomator2' driver was installed and matched caps.
[Appium] Will require it at /Users/amir/.appium/node_modules/appium-uiautomator2-driver
[Appium] Requiring driver at /Users/amir/.appium/node_modules/appium-uiautomator2-driver/build/index.js
[AppiumDriver@3fac] Appium v2.5.4 creating new AndroidUiautomator2Driver (v3.2.0) session
[AppiumDriver@3fac] Checking BaseDriver versions for Appium and AndroidUiautomator2Driver
[AppiumDriver@3fac] Appium's BaseDriver version is 9.6.0
[AppiumDriver@3fac] AndroidUiautomator2Driver's BaseDriver version is 9.4.1
[AndroidUiautomator2Driver@1e75] Creating session with W3C capabilities: {
[AndroidUiautomator2Driver@1e75]   "alwaysMatch": {
[AndroidUiautomator2Driver@1e75]     "platformName": "Android",
[AndroidUiautomator2Driver@1e75]     "appium:deviceName": "Android",
[AndroidUiautomator2Driver@1e75]     "appium:automationName": "UiAutomator2",
[AndroidUiautomator2Driver@1e75]     "appium:udid": "emulator-5554",
[AndroidUiautomator2Driver@1e75]     "appium:app": "/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk",
[AndroidUiautomator2Driver@1e75]     "appium:appPackage": "com.instagram.android",
[AndroidUiautomator2Driver@1e75]     "appium:appActivity": "com.instagram.android.activity.MainTabActivity",
[AndroidUiautomator2Driver@1e75]     "appium:noReset": true
[AndroidUiautomator2Driver@1e75]   },
[AndroidUiautomator2Driver@1e75]   "firstMatch": [
[AndroidUiautomator2Driver@1e75]     {}
[AndroidUiautomator2Driver@1e75]   ]
[AndroidUiautomator2Driver@1e75] }
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Session created with session id: 7ac1f1b9-42e8-4b65-a895-d29745f404dd
[ADB] Found 2 'build-tools' folders under '/Users/amir/Library/Android/sdk' (newest first):
[ADB]     /Users/amir/Library/Android/sdk/build-tools/34.0.0
[ADB]     /Users/amir/Library/Android/sdk/build-tools/33.0.1
[ADB] Using 'adb' from '/Users/amir/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Retrieving device list
[ADB] Trying to find connected Android devices
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Using device: emulator-5554
[ADB] Using 'adb' from '/Users/amir/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[ADB] Setting device id to emulator-5554
[BaseDriver] Using local app '/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Checking whether app is actually present
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 27
[ADB] Device API level: 27
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Pushing settings apk to the device...
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -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 ('5.7.9' >= '5.7.9')
[ADB] There is no need to install/upgrade '/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] io.appium.settings is already running. There is no need to reset its permissions.
[Logcat] Starting logs capture with command: /Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Forwarding UiAutomator2 Server port 6790 to local port 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[ADB] Getting package info for 'io.appium.uiautomator2.server'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[ADB] Getting install status for io.appium.uiautomator2.server.test
[ADB] Getting install status for com.instagram.android
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cmd package list packages'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cmd package list packages'
[ADB] 'io.appium.uiautomator2.server.test' is installed
[ADB] 'com.instagram.android' is installed
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] noReset has been requested and the app is already installed. Doing nothing
[ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('7.0.5' >= '7.0.5')
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Server packages status: [{"installState":"sameVersionInstalled","appPath":"/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v7.0.5.apk","appId":"io.appium.uiautomator2.server"},{"installState":"sameVersionInstalled","appPath":"/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk","appId":"io.appium.uiautomator2.server.test"}]
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Server packages are not going to be (re)installed
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Waiting up to 30000ms for services to be available
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] 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 '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Performing shallow cleanup of automation leftovers
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] The following obsolete sessions are still running: ["cb820b9a-a08d-4762-8097-539cc9e4b837"]
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Cleaning up 1 obsolete session
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Starting UIAutomator2 server 7.0.5
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Using UIAutomator2 server from '/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v7.0.5.apk' and test from '/Users/amir/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Waiting up to 30000ms for UiAutomator2 to be online...
[ADB] Creating ADB subprocess with args: ["-P","5037","-s","emulator-5554","shell","am","instrument","-w","-e","disableAnalytics","true","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/status' to command name 'getStatus'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] socket hang up
[Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/status' to command name 'getStatus'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] socket hang up
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/status' to command name 'getStatus'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] socket hang up
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/status' to command name 'getStatus'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] The initialization of the instrumentation process took 3185ms
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/session' to command name 'createSession'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [POST /session] to [POST http://127.0.0.1:8200/session] with body: {"capabilities":{"firstMatch":[{"platformName":"Android","deviceName":"emulator-5554","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true},"deviceUDID":"emulator-5554"}],"alwaysMatch":{}}}
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Got response with status 200: {"sessionId":"18e3b1b4-5e3a-4c7c-b814-d5b49357bf26","value":{"capabilities":{"firstMatch":[{"platformName":"Android","deviceName":"emulator-5554","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true},"deviceUDID":"emulator-5554"}],"alwaysMatch":{}},"sessionId":"18e3b1b4-5e3a-4c7c-b814...
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Determined the downstream protocol as 'W3C'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/session/18e3b1b4-5e3a-4c7c-b814-d5b49357bf26/appium/device/pixel_ratio] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/session/18e3b1b4-5e3a-4c7c-b814-d5b49357bf26/appium/device/system_bars] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/window/current/size' to command name 'getWindowSize'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/session/18e3b1b4-5e3a-4c7c-b814-d5b49357bf26/window/current/size] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/session/18e3b1b4-5e3a-4c7c-b814-d5b49357bf26/appium/device/info] with no body
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys power'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Got response with status 200: {"sessionId":"18e3b1b4-5e3a-4c7c-b814-d5b49357bf26","value":3.5}
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Got response with status 200: {"sessionId":"18e3b1b4-5e3a-4c7c-b814-d5b49357bf26","value":{"statusBar":84}}
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Got response with status 200: {"sessionId":"18e3b1b4-5e3a-4c7c-b814-d5b49357bf26","value":{"height":2960,"width":1440}}
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Screen already unlocked, doing nothing
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Starting 'com.instagram.android/com.instagram.android.activity.MainTabActivity and waiting for 'com.instagram.android/com.instagram.android.activity.MainTabActivity'
[ADB] Getting IDs of all 'com.instagram.android' processes
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)com\.instagram\.android\(\[\[:blank:\]\]\|\$\)'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] 'com.instagram.android' is already running and noReset is enabled. Set forceAppLaunch capability to true if the app must be forcefully restarted on session startup.
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Got response with status 200: {"sessionId":"18e3b1b4-5e3a-4c7c-b814-d5b49357bf26","value":{"androidId":"9e229e136f4bdd6f","apiVersion":"27","bluetooth":null,"brand":"samsung","carrierName":"Android","displayDensity":560,"locale":"en_US","manufacturer":"samsung","model":"SM-G9500","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":102400,"linkUpstreamBandwidthKbps":51200,"networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_IA,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":13,"subtypeName":"LTE","type":0,"typeName":"MOBILE"},{"capabilities":{"SSID":null,"linkDownBandwidthKbps":1048576,"linkUpstreamBandwidthKbps":1048576,...
[AppiumDriver@3fac] New AndroidUiautomator2Driver session created successfully, session 7ac1f1b9-42e8-4b65-a895-d29745f404dd added to master session list
[AppiumDriver@3fac] Event 'newSessionStarted' logged at 1714919970923 (18:09:30 GMT+0330 (Iran Standard Time))
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Cached the protocol value 'W3C' for the new session 7ac1f1b9-42e8-4b65-a895-d29745f404dd
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Responding to client with driver.createSession() result: {"capabilities":{"platformName":"Android","deviceName":"emulator-5554","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android","automationName":"UiAutomator2","udid":"emulator-5554","app":"/Users/amir/Documents/07-Affiliate/Robots-Instagram-with-Appium/FileAPK/Instagram_x86.apk","appPackage":"com.instagram.android","appActivity":"com.instagram.android.activity.MainTabActivity","noReset":true},"deviceUDID":"emulator-5554","pixelRatio":"3.5","statBarHeight":84,"viewportRect":{"left":0,"top":84,"width":1440,"height":2876},"deviceApiLevel":27,"platformVe...
[HTTP] <-- POST /wd/hub/session 200 5927 ms - 1211
[HTTP] 
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Shutting down because we waited 60 seconds for a command
[AppiumDriver@3fac] Ending session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[AppiumDriver@3fac] Removing session '7ac1f1b9-42e8-4b65-a895-d29745f404dd' from our master session list
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Deleting UiAutomator2 session
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Deleting UiAutomator2 server session
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Matched '/' to command name 'deleteSession'
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/session/18e3b1b4-5e3a-4c7c-b814-d5b49357bf26] with no body
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] socket hang up
[AndroidUiautomator2Driver@1e75 (7ac1f1b9)] 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
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200 
[ADB] Running '/Users/amir/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200'