При запуске АТ на squish 7.1.1 Выдает ошибку
Detail selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘/tmp/202371-3752-1j3fv1.xdb8/appium-uiautomator2-server-v4.27.0.apk’. Original error: The ‘java’ binary could not be found neither in PATH nor under JAVA_HOME (The JAVA_HOME location ‘/usr/lib/jvm/java-11-openjdk-amd64’ must exist)
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of ‘/tmp/202371-3752-1j3fv1.xdb8/appium-uiautomator2-server-v4.27.0.apk’. Original error: The ‘java’ binary could not be found neither in PATH nor under JAVA_HOME (The JAVA_HOME location ‘/usr/lib/jvm/java-11-openjdk-amd64’ must exist)
at getResponseForW3CError (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/usr/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37) (Screenshot taken from the desktop is invalid) /home/mishq/.local/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py:229
В логах Appium вижу следующее
mishq@mishq-Lenovo-Legion-Y530-15ICH-1060:~JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 ANDROID_SDK_ROOT=~/Android/Sdk appium --allow-insecure chromedriver_autodownload
[Appium] Welcome to Appium v1.22.2
[Appium] Non-default server args:
[Appium] allowInsecure: {
[Appium] 0: chromedriver_autodownload
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 24ae042f-3d2f-49c6-9f18-e77d6f4b6797
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:automationName":"uiautomator2","appium:appPackage":"ru.systtech.mobile","appium:appActivity":"STMobile","appium:noReset":true,"appium:newCommandTimeout":99999}}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:automationName":"uiautomator2","appium:appPackage":"ru.systtech.mobile","appium:appActivity":"STMobile","appium:noReset":true,"appium:newCommandTimeout":99999}}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1690919861061 (21:57:41 GMT+0200 (Восточная Европа, стандартное время))
[Appium] Appium v1.22.2 creating new AndroidUiautomator2Driver (v1.70.1) session
[Appium] Explicitly enabling use of insecure features:
[Appium] chromedriver_autodownload
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "platformName": "Android",
[debug] [BaseDriver] "appium:automationName": "uiautomator2",
[debug] [BaseDriver] "appium:appPackage": "ru.systtech.mobile",
[debug] [BaseDriver] "appium:appActivity": "STMobile",
[debug] [BaseDriver] "appium:noReset": true,
[debug] [BaseDriver] "appium:newCommandTimeout": 99999
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 3bfc5d5a-3083-456d-ad74-8e2036e84c7e
[UiAutomator2] Starting 'ru.systtech.mobile' directly on the device
[ADB] Found 2 'build-tools' folders under '/home/mishq/Android/Sdk' (newest first):
[ADB] /home/mishq/Android/Sdk/build-tools/34.0.0
[ADB] /home/mishq/Android/Sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/home/mishq/Android/Sdk/platform-tools/adb'
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -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":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/home/mishq/Android/Sdk/platform-tools/adb'
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 30
[ADB] Getting device platform version
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 11
[debug] [ADB] Device API level: 30
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running '/home/mishq/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
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 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 '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 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.4.0' >= '3.4.0')
[debug] [ADB] There is no need to install/upgrade '/usr/lib/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 '/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo?‘’
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)’
[debug] [ADB] Getting IDs of all ‘io.appium.settings’ processes
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)’
[debug] [ADB] Starting Appium Settings app
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER’
[debug] [ADB] Getting IDs of all ‘io.appium.settings’ processes
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)’
[debug] [ADB] Getting IDs of all ‘io.appium.settings’ processes
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)io.appium.settings([[:blank:]]|$)’
[debug] [Logcat] Starting logs capture with command: /home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790’
[UiAutomator2] Server package at ‘/usr/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk’ is not writeable. Will copy it into the temporary location at ‘/tmp/202371-3752-1j3fv1.xdb8’ as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[UiAutomator2] Server package at ‘/usr/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk’ is not writeable. Will copy it into the temporary location at ‘/tmp/202371-3752-1j3fv1.xdb8’ as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server’
[debug] [ADB] ‘io.appium.uiautomator2.server’ is not installed
[debug] [ADB] App ‘/tmp/202371-3752-1j3fv1.xdb8/appium-uiautomator2-server-v4.27.0.apk’ is not installed
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: notInstalled
[debug] [ADB] Checking app cert for /tmp/202371-3752-1j3fv1.xdb8/appium-uiautomator2-server-v4.27.0.apk
[ADB] Using ‘apksigner.jar’ from ‘/home/mishq/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar’
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop ru.systtech.mobile’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running ‘/home/mishq/Android/Sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200’
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running ‘/home/mishq/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’’
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1690919862225 (21:57:42 GMT+0200 (Восточная Европа, стандартное время))
[debug] [W3C] Encountered internal error running command: Error: Cannot verify the signature of ‘/tmp/202371-3752-1j3fv1.xdb8/appium-uiautomator2-server-v4.27.0.apk’. Original error: The ‘java’ binary could not be found neither in PATH nor under JAVA_HOME (The JAVA_HOME location ‘/usr/lib/jvm/java-11-openjdk-amd64’ must exist)
[debug] [W3C] at ADB.checkApkCert (/usr/lib/node_modules/appium/node_modules/appium-adb/lib/tools/apk-signing.js:306:11)
[debug] [W3C] at UiAutomator2Server.installServerApk (/usr/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/uiautomator2.js:117:13)
[debug] [W3C] at AndroidUiautomator2Driver.initUiAutomator2Server (/usr/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:494:7)
[debug] [W3C] at AndroidUiautomator2Driver.startUiAutomator2Session (/usr/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:390:5)
[debug] [W3C] at AndroidUiautomator2Driver.createSession (/usr/lib/node_modules/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:229:7)
[debug] [W3C] at AppiumDriver.createSession (/usr/lib/node_modules/appium/lib/appium.js:387:35)
[HTTP] <-- POST /wd/hub/session 500 1226 ms - 1011