Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'DELETE /' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed) #1670
Description
The server is running
[HTTP] Waiting until the server is closed
[HTTP] Received server close event
[Appium] Welcome to Appium v1.20.2
[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] {"desiredCapabilities":{"VERSION":"10","appActivity":"com.pixelvide.fmsapp.activities.PreSplash","appPackage":"com.pixelvide.fmsapp","automationName ":"UiAutomator2","deviceName":"IFMIS","ensureWebviewsHavePages":true,"platformName":"Android","skipServerInstallation":"true","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"VERSION":"10","appActivity":"com.pixelvide.fmsapp.activities.PreSplash","appPackage":"com.pixelvide.fmsapp","automationName ":"UiAutomator2","deviceName":"IFMIS","ensureWebviewsHavePages":true,"platformName":"Android","skipServerInstallation":"true","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1648550713430 (16:15:13 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.20.2 creating new AndroidUiautomator2Driver (v1.61.2) 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] Creating session with MJSONWP desired capabilities: {
[BaseDriver] "VERSION": "10",
[BaseDriver] "appActivity": "com.pixelvide.fmsapp.activities.PreSplash",
[BaseDriver] "appPackage": "com.pixelvide.fmsapp",
[BaseDriver] "automationName ": "UiAutomator2",
[BaseDriver] "deviceName": "IFMIS",
[BaseDriver] "ensureWebviewsHavePages": true,
[BaseDriver] "platformName": "Android",
[BaseDriver] "skipServerInstallation": "true",
[BaseDriver] "newCommandTimeout": 0,
[BaseDriver] "connectHardwareKeyboard": true
[BaseDriver] }
[BaseDriver] Capability 'skipServerInstallation' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] VERSION
[BaseDriver] automationName
[BaseDriver] connectHardwareKeyboard
[BaseDriver] Session created with session id: fb8b12a4-93be-4107-9e41-1917a3cd059a
[UiAutomator2] Starting 'com.pixelvide.fmsapp' directly on the device
[ADB] Using 'adb' from '/Users/karthik/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[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' from '/Users/karthik/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[ADB] Setting device id to emulator-5554
[ADB] Running '/Users/karthik/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': 29
[ADB] Getting device platform version
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 10
[ADB] Device API level: 29
[UiAutomator2] Relaxing hidden api policy
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 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
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting install status for io.appium.settings
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -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 '/Users/karthik/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 ('3.2.1' >= '3.2.1')
[ADB] There is no need to install/upgrade '/Applications/Appium.app/Contents/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 '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)'
[AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[Logcat] Starting logs capture with command: /Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[ADB] Forwarding system: 8200 to device: 6790
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[UiAutomator2] 'skipServerInstallation' is set. Skipping UIAutomator2 server installation.
[UiAutomator2] No app capability. Assuming it is already on the device
[ADB] Getting install status for com.pixelvide.fmsapp
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.pixelvide.fmsapp'
[ADB] 'com.pixelvide.fmsapp' is installed
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.pixelvide.fmsapp'
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear com.pixelvide.fmsapp'
[AndroidDriver] Performed fast reset on the installed 'com.pixelvide.fmsapp' application (stop and clear)
[UiAutomator2] Performing shallow cleanup of automation leftovers
[UiAutomator2] No obsolete sessions have been detected (socket hang up)
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] 'skipServerInstallation' is set. Attempting to use UIAutomator2 server from the device
[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"]
[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] android.util.AndroidException: INSTRUMENTATION_FAILED: io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner
[Instrumentation] at com.android.commands.am.Instrument.run(Instrument.java:514)
[Instrumentation] at com.android.commands.am.Am.runInstrument(Am.java:196)
[Instrumentation] at com.android.commands.am.Am.onRun(Am.java:80)
[Instrumentation] at com.android.internal.os.BaseCommand.run(BaseCommand.java:56)
[Instrumentation] at com.android.commands.am.Am.main(Am.java:50)
[Instrumentation] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[Instrumentation] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:338)
[Instrumentation] FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x97dfd000)
[Instrumentation] The process has exited with code 1
[UiAutomator2] The instrumentation process has been unexpectedly terminated. Retrying UiAutomator2 startup (#1 of 1)
[UiAutomator2] Performing strict cleanup of automation leftovers
[UiAutomator2] No obsolete sessions have been detected (socket hang up)
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting IDs of all 'uiautomator' processes
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)uiautomator([[:blank:]]|$)'
[ADB] No 'uiautomator' process has been found
[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"]
[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] android.util.AndroidException: INSTRUMENTATION_FAILED: io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner
[Instrumentation] at com.android.commands.am.Instrument.run(Instrument.java:514)
[Instrumentation] INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner}
[Instrumentation] INSTRUMENTATION_STATUS: id=ActivityManagerService
[Instrumentation] INSTRUMENTATION_STATUS_CODE: -1
[Instrumentation] at com.android.commands.am.Am.runInstrument(Am.java:196)
[Instrumentation] at com.android.commands.am.Am.onRun(Am.java:80)
[Instrumentation] at com.android.internal.os.BaseCommand.run(BaseCommand.java:56)
[Instrumentation] at com.android.commands.am.Am.main(Am.java:50)
[Instrumentation] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[Instrumentation] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:338)
[Instrumentation] The process has exited with code 1
[UiAutomator2] The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
[UiAutomator2] Deleting UiAutomator2 session
[UiAutomator2] Deleting UiAutomator2 server session
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'DELETE /' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.pixelvide.fmsapp'
[Logcat] Stopping logcat capture
[ADB] Removing forwarded port socket connection: 8200
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[ADB] Running '/Users/karthik/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[BaseDriver] Event 'newSessionStarted' logged at 1648550721359 (16:15:21 GMT+0530 (India Standard Time))
[MJSONWP] Encountered internal error running command: Error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
[MJSONWP] at Object.errorAndThrow (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-support/lib/logging.js:94:35)
[MJSONWP] at UiAutomator2Server.startSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/uiautomator2.js:241:13)
[MJSONWP] at AndroidUiautomator2Driver.startUiAutomator2Session (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:407:5)
[MJSONWP] at AndroidUiautomator2Driver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:224:7)
[MJSONWP] at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:371:35)
[HTTP] <-- POST /wd/hub/session 500 7932 ms - 274
[HTTP]
[HTTP] --> DELETE /wd/hub/session
[HTTP] {}
[HTTP] No route found for /wd/hub/session
[HTTP] <-- DELETE /wd/hub/session 404 10 ms - 211
[HTTP]