Closed russtu closed 1 year ago
I haven't met the issue with latest espresso driver, even after removing ~/.gradle
file, but possibly android gradle plugin failed to download...?
https://stackoverflow.com/questions/65978260/failed-to-apply-plugin-com-android-internal-application
androidGradlePlugin
https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#toolsversions
./gradlew clean build
failure is ok since the espresso server only depends on app:assembleAndroidTest
. e.g. ./gradlew clean app:assembleAndroidTest
Errors in Logcat:
`
E Couldn't opendir /data/app/~~M_Z4WrvxAd6RiflNfQqAvQ==/io.appium.espressoserver.test-FsYNhbff2nLLvObyef979Q==: No such file or directory
2023-10-26 22:04:35.256 889-6201 installd installd E Failed to delete /data/app/~~M_Z4WrvxAd6RiflNfQqAvQ==/io.appium.espressoserver.test-FsYNhbff2nLLvObyef979Q==: No such file or directory
2023-10-26 22:04:35.257 1151-1229 PackageManager system_server W Failed to remove code path
com.android.server.pm.Installer$InstallerException: android.os.ServiceSpecificException: Failed to delete /data/app/~~M_Z4WrvxAd6RiflNfQqAvQ==/io.appium.espressoserver.test-FsYNhbff2nLLvObyef979Q== (code 2)
at com.android.server.pm.Installer.rmPackageDir(Installer.java:858)
at com.android.server.pm.RemovePackageHelper.removeCodePathLI(RemovePackageHelper.java:108)
at com.android.server.pm.FileInstallArgs.cleanUp(FileInstallArgs.java:225)
at com.android.server.pm.FileInstallArgs.cleanUpResourcesLI(FileInstallArgs.java:242)
at com.android.server.pm.FileInstallArgs.doPostDeleteLI(FileInstallArgs.java:265)
at com.android.server.pm.DeletePackageHelper.deletePackageX(DeletePackageHelper.java:322)
at com.android.server.pm.DeletePackageHelper.lambda$deletePackageVersionedInternal$5(DeletePackageHelper.java:907)
at com.android.server.pm.DeletePackageHelper.$r8$lambda$0dA5cLiztPBfED1DwM2PAFVgIjM(Unknown Source:0)
at com.android.server.pm.DeletePackageHelper$$ExternalSyntheticLambda5.run(Unknown Source:22)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
2023-10-26 22:04:35.258 1151-1229 AASA_Packa...RESTRICTED system_server D Uninstall : userId = 0, info.mRemovedAppId = 10358, info.uid = 10358, packageName = io.appium.espressoserver.test
2023-10-26 22:04:35.261 1151-1229 ActivityManager system_server I Force stopping io.appium.espressoserver.test appid=10358 user=0: pkg removed
`
My class : `
package com.example.test;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.net.MalformedURLException;
import java.net.URL;
import io.appium.java_client.AppiumDriver;
public class AppiumTests {
static AppiumDriver appiumDriver;
public static void main(String[] args) {
openApp();
}
public static void openApp() {
DesiredCapabilities cap=new DesiredCapabilities();
cap.setCapability("platformName", "Android");
cap.setCapability("appPackage", "com.sec.android.app.popupcalculator");
cap.setCapability("appActivity", "com.sec.android.app.popupcalculator.Calculator");
cap.setCapability("appium:automationName", "Espresso");
cap.setCapability("showGradleLog", true);
cap.setCapability("noReset", true);
cap.setCapability("forceEspressoRebuild", true);
cap.setCapability("espressoBuildConfig", "{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}");
try {
URL url = new URL("http://127.0.0.1:4723");
} catch (MalformedURLException e) {
e.printStackTrace();
}
appiumDriver = new AppiumDriver(cap);
System.out.println("Automated Application Started");
appiumDriver.quit();
}
}
`
Buil.gradle in project:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.0'
}
}
plugins {
id 'com.android.application' version '8.1.2' apply false
id 'com.android.library' version '8.1.2' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Buil.gradle:app :
plugins {
id 'com.android.application'
}
android {
namespace = "com.example.test"
compileSdk 34
packagingOptions {
pickFirst '**/libc++_shared.so'
pickFirst '**/libfbjni.so'
}
defaultConfig {
applicationId "com.example.test"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/io.netty.versions.properties'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17//VERSION_1_8
targetCompatibility JavaVersion.VERSION_17//VERSION_1_8
}
buildToolsVersion '34.0.0'
}
dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation 'io.appium:java-client:8.5.0'
testImplementation "androidx.lifecycle:lifecycle-common:2.2.0"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.6.0'
implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.9.1'
implementation group: 'org.slf4j', name: 'slf4j-jdk14', version: '2.0.9'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'commons-io:commons-io:2.11.0'
implementation 'commons-validator:commons-validator:1.7'
implementation group: 'androidx.activity', name: 'activity', version: '1.8.0'
implementation group: 'androidx.fragment', name: 'fragment', version: '1.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'io.appium:java-client:8.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test:rules:1.1.0'
androidTestImplementation 'junit:junit:4.12'
runtimeOnly group: 'androidx.annotation', name: 'annotation', version: '1.1.0'
}
Same Problem If i change to Uiautomator2 , works.
Please attach the full appium log to catch up with the context
Appium] Welcome to Appium v2.2.1
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at /home/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver espresso...
[Appium] Requiring driver at /home/.appium/node_modules/appium-espresso-driver
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] http://192.168.0.8:4723/
[Appium] http://172.31.0.1:4723/
[Appium] http://10.101.0.4:4723/
[Appium] http://172.19.0.1:4723/
[Appium] Available drivers:
[Appium] - uiautomator2@2.32.3 (automationName 'UiAutomator2')
[Appium] - espresso@2.26.10 (automationName 'Espresso')
[Appium] Available plugins:
[Appium] - device-farm@8.3.7
[Appium] - execute-driver@3.0.19
[Appium] No plugins activated. Use the --use-plugins flag with names of plugins to activate
[HTTP] --> GET /status
[HTTP] {}
[AppiumDriver@351e] Calling AppiumDriver.getStatus() with args: []
[AppiumDriver@351e] Responding to client with driver.getStatus() result: {"ready":true,"message":"The server is ready to accept new connections","build":{"version":"2.2.1"}}
[HTTP] <-- GET /status 200 4 ms - 110
[HTTP]
[HTTP] Request idempotency key: 430de682-207a-4b0a-ac94-4ad9d6831171
[HTTP] --> POST /session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:appActivity":"com.sec.android.app.popupcalculator.Calculator","appium:appPackage":"com.sec.android.app.popupcalculator","appium:automationName":"Espresso","appium:espressoBuildConfig":"{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}","appium:forceEspressoRebuild":true,"appium:noReset":true,"appium:showGradleLog":true,"platformName":"ANDROID"}}}
[AppiumDriver@351e] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:appActivity":"com.sec.android.app.popupcalculator.Calculator","appium:appPackage":"com.sec.android.app.popupcalculator","appium:automationName":"Espresso","appium:espressoBuildConfig":"{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}","appium:forceEspressoRebuild":true,"appium:noReset":true,"appium:showGradleLog":true,"platformName":"ANDROID"}}]
[AppiumDriver@351e] Event 'newSessionRequested' logged at 1698391217847 (09:20:17 GMT+0200 (hora de verano de Europa central))
[Appium] Attempting to find matching driver for automationName 'Espresso' and platformName 'ANDROID'
[Appium] The 'espresso' driver was installed and matched caps.
[Appium] Will require it at /home/.appium/node_modules/appium-espresso-driver
[Appium] Requiring driver at /home/.appium/node_modules/appium-espresso-driver
[AppiumDriver@351e] Appium v2.2.1 creating new EspressoDriver (v2.26.10) session
[AppiumDriver@351e] Checking BaseDriver versions for Appium and EspressoDriver
[AppiumDriver@351e] Appium's BaseDriver version is 9.4.1
[AppiumDriver@351e] EspressoDriver's BaseDriver version is 9.4.1
[EspressoDriver@023b] Creating session with W3C capabilities: {
[EspressoDriver@023b] "alwaysMatch": {
[EspressoDriver@023b] "platformName": "ANDROID",
[EspressoDriver@023b] "appium:appActivity": "com.sec.android.app.popupcalculator.Calculator",
[EspressoDriver@023b] "appium:appPackage": "com.sec.android.app.popupcalculator",
[EspressoDriver@023b] "appium:automationName": "Espresso",
[EspressoDriver@023b] "appium:espressoBuildConfig": "{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}",
[EspressoDriver@023b] "appium:forceEspressoRebuild": true,
[EspressoDriver@023b] "appium:noReset": true,
[EspressoDriver@023b] "appium:showGradleLog": true
[EspressoDriver@023b] },
[EspressoDriver@023b] "firstMatch": [
[EspressoDriver@023b] {}
[EspressoDriver@023b] ]
[EspressoDriver@023b] }
[EspressoDriver@023b (51a8f2ba)] Session created with session id: 51a8f2ba-6edb-426f-8029-893e9681d179
[ADB] Found 5 'build-tools' folders under '/home/Android/Sdk' (newest first):
[ADB] /home/Android/Sdk/build-tools/34.0.0
[ADB] /home/Android/Sdk/build-tools/33.0.2
[ADB] /home/Android/Sdk/build-tools/33.0.1
[ADB] /home/Android/Sdk/build-tools/33.0.0
[ADB] /home/Android/Sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/home/Android/Sdk/platform-tools/adb'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[ADB] Trying to find connected Android devices
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"R8YW80AZNLF","state":"device"}]
[AndroidDriver] Using device: R8YW80AZNLF
[ADB] Using 'adb' from '/home/Android/Sdk/platform-tools/adb'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 start-server'
[ADB] Setting device id to R8YW80AZNLF
[EspressoDriver@023b (51a8f2ba)] App file was not listed, instead we're going to run com.sec.android.app.popupcalculator directly on the device
[ADB] Getting install status for com.sec.android.app.popupcalculator
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell pm path com.sec.android.app.popupcalculator'
[ADB] 'com.sec.android.app.popupcalculator' is installed
[EspressoDriver@023b (51a8f2ba)] EspressoDriver version: 2.26.10
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 33
[ADB] Getting device platform version
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 13
[ADB] Device API level: 33
[EspressoDriver@023b (51a8f2ba)] Relaxing hidden api policy
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF 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
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF 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.1.2' >= '5.1.2')
[ADB] There is no need to install/upgrade '/home/.appium/node_modules/appium-espresso-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell 'pgrep --help; echo $?''
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF 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 '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell appops set io.appium.settings android:mock_location allow'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell "[ -e '/data/local/tmp/mock_apps.json' ] && echo __PASS__"'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell cat /data/local/tmp/mock_apps.json'
[Logcat] Starting logs capture with command: /home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF logcat -v threadtime
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell settings get global animator_duration_scale'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell settings get global transition_animation_scale'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell settings get global window_animation_scale'
[EspressoDriver@023b (51a8f2ba)] Window animation is already disabled
[EspressoDriver@023b (51a8f2ba)] Forwarding Espresso Server port 6791 to 8300
[ADB] Forwarding system: 8300 to device: 6791
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF forward tcp:8300 tcp:6791'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[EspressoDriver@023b (51a8f2ba)] No app capability. Assuming it is already on the device
[EspressoDriver@023b (51a8f2ba)] 'forceEspressoRebuild' capability is enabled
[EspressoDriver@023b (51a8f2ba)] Deleting the obsolete Espresso server package '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk'
[EspressoDriver@023b (51a8f2ba)] Loading the build configuration from 'espressoBuildConfig' capability
[EspressoDriver@023b (51a8f2ba)] Building espresso server in '/tmp/espresso-server-R8YW80AZNLF'
[EspressoDriver@023b (51a8f2ba)] The build folder root could be customized by changing the 'tmpDir' capability
[EspressoDriver@023b (51a8f2ba)] Copying espresso server template from ('/home/.appium/node_modules/appium-espresso-driver/espresso-server' to '/tmp/espresso-server-R8YW80AZNLF')
[Support] Traversed 401 directories and 1727 files in 624ms
[EspressoDriver@023b (51a8f2ba)] Bulding espresso server
[EspressoDriver@023b (51a8f2ba)] Adding the following additionalAndroidTestDependencies to build.gradle.kts: androidTestImplementation("androidx.lifecycle:lifecycle-extensions:2.2.0"),androidTestImplementation("androidx.activity:activity:1.3.1"),androidTestImplementation("androidx.fragment:fragment:1.2.0")
[EspressoDriver@023b (51a8f2ba)] Beginning build with command '/tmp/espresso-server-R8YW80AZNLF/gradlew -PappiumTargetPackage=com.sec.android.app.popupcalculator app:assembleAndroidTest' in directory '/tmp/espresso-server-R8YW80AZNLF'
[EspressoDriver@023b (51a8f2ba)] Output from Gradle will be logged. To change this, use 'showGradleLog' desired capability
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:preBuild UP-TO-DATE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:preDebugBuild UP-TO-DATE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:checkDebugAarMetadata
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:generateDebugResValues FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mapDebugSourceSetPaths
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:generateDebugResources UP-TO-DATE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugResources FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:packageDebugResources FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:parseDebugLocalResources FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:createDebugCompatibleScreenManifests
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:extractDeepLinksDebug FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugMainManifest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugManifest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugManifestForPackage FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugResources FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:compileDebugKotlin NO-SOURCE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:javaPreCompileDebug FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:compileDebugJavaWithJavac NO-SOURCE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:preDebugAndroidTestBuild SKIPPED
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:bundleDebugClassesToCompileJar
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:generateDebugAndroidTestResValues FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mapDebugAndroidTestSourceSetPaths
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:generateDebugAndroidTestResources UP-TO-DATE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestResources FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:checkDebugAndroidTestAarMetadata
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugAndroidTestManifest
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugAndroidTestResources FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:compileDebugAndroidTestKotlin FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:javaPreCompileDebugAndroidTest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:compileDebugAndroidTestJavaWithJavac FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestShaders FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:compileDebugAndroidTestShaders NO-SOURCE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:generateDebugAndroidTestAssets UP-TO-DATE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestAssets FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:compressDebugAndroidTestAssets FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:processDebugAndroidTestJavaRes NO-SOURCE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestJniLibFolders FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:desugarDebugAndroidTestFileDependencies FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:dexBuilderDebugAndroidTest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:validateSigningDebugAndroidTest
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:writeDebugAndroidTestSigningConfigVersions
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:checkDebugAndroidTestDuplicateClasses
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeExtDexDebugAndroidTest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeLibDexDebugAndroidTest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeProjectDexDebugAndroidTest FROM-CACHE
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestJavaResource
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:packageDebugAndroidTest
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:createDebugAndroidTestApkListingFileRedirect
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:assembleDebugAndroidTest
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] > Task :app:assembleAndroidTest
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT]
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] BUILD SUCCESSFUL in 2s
[EspressoDriver@023b (51a8f2ba)] [Gradle] [STDOUT] 38 actionable tasks: 13 executed, 25 from cache
[EspressoDriver@023b (51a8f2ba)] Copying built apk from '/tmp/espresso-server-R8YW80AZNLF/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk' to '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk'
[ADB] Checking app cert for /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk
[ADB] Using 'apksigner.jar' from '/home/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar'
[ADB] Starting apksigner: /usr/lib/jvm/default-java/bin/java -Xmx1024M -Xss1m -jar /home/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar verify --print-certs /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk
[ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
[ADB] Signer #1 certificate SHA-256 digest: 2d86c52a419498313c92a2178d85100f22b3ebeda22ae5419f43f0e6266a0db7
[ADB] Signer #1 certificate SHA-1 digest: 68cd6714458c4d9a3200c40425a35ed18106967f
[ADB] Signer #1 certificate MD5 digest: 1959dfdfbc07f3ac81fce578ec0f3d79
[ADB]
[ADB] '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' is signed with a non-default certificate
[ADB] Using 'zipalign' from '/home/Android/Sdk/build-tools/34.0.0/zipalign'
[ADB] /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' is already zip-aligned. Doing nothing
[ADB] Signing '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' with default cert
[ADB] Starting apksigner: /usr/lib/jvm/default-java/bin/java -Xmx1024M -Xss1m -jar /home/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar sign --key /home/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.pk8 --cert /home/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.x509.pem /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk
[ADB] Uninstalling io.appium.espressoserver.test
[ADB] Getting install status for io.appium.espressoserver.test
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell pm path io.appium.espressoserver.test'
[ADB] 'io.appium.espressoserver.test' is installed
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell am force-stop io.appium.espressoserver.test'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF uninstall io.appium.espressoserver.test'
[ADB] 'adb uninstall io.appium.espressoserver.test' command output: Success
[ADB] io.appium.espressoserver.test was successfully uninstalled
[EspressoDriver@023b (51a8f2ba)] Uninstalled the obsolete Espresso server package from the device under test
[ADB] Getting package info for 'io.appium.espressoserver.test'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys package io.appium.espressoserver.test'
[ADB] App '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' is not installed
[EspressoDriver@023b (51a8f2ba)] Installing Espresso Test Server apk from the target device (path: '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk')
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF help'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF features'
[ADB] The application at '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF install /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk'
[ADB] The installation of 'io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' took 1018ms
[ADB] Install command stdout: Serving...
[ADB] Performing Incremental Install
[ADB] Success
[ADB] Install command complete in 996 ms
[EspressoDriver@023b (51a8f2ba)] Installed Espresso Test Server apk '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[EspressoDriver@023b (51a8f2ba)] Performing cleanup of automation leftovers
[EspressoDriver@023b (51a8f2ba)] No obsolete sessions have been detected (socket hang up)
[EspressoDriver@023b (51a8f2ba)] Starting Espresso Server v2.26.10 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[ADB] Creating ADB subprocess with args: ["-P","5037","-s","R8YW80AZNLF","shell","am","instrument","-w","-e","debug","false","-e","disableAnalytics","true","io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@023b (51a8f2ba)] Waiting up to 45000ms for Espresso server to be online
[EspressoDriver@023b (51a8f2ba)] Matched '/status' to command name 'getStatus'
[EspressoDriver@023b (51a8f2ba)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@023b (51a8f2ba)] socket hang up
[EspressoDriver@023b (51a8f2ba)] Matched '/status' to command name 'getStatus'
[EspressoDriver@023b (51a8f2ba)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@023b (51a8f2ba)] socket hang up
[EspressoDriver@023b (51a8f2ba)] Matched '/status' to command name 'getStatus'
[EspressoDriver@023b (51a8f2ba)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@023b (51a8f2ba)] socket hang up
[EspressoDriver@023b (51a8f2ba)] [Instrumentation] INSTRUMENTATION_STATUS: Error=Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=17901, uid=2000 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.sec.android.app.popupcalculator
[EspressoDriver@023b (51a8f2ba)] INSTRUMENTATION_STATUS: id=ActivityManagerService
[EspressoDriver@023b (51a8f2ba)] INSTRUMENTATION_STATUS_CODE: -1
[EspressoDriver@023b (51a8f2ba)] [Instrumentation] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=17901, uid=2000 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.sec.android.app.popupcalculator
[EspressoDriver@023b (51a8f2ba)] at android.os.Parcel.createExceptionOrNull(Parcel.java:3023)
[EspressoDriver@023b (51a8f2ba)] at android.os.Parcel.createException(Parcel.java:3007)
[EspressoDriver@023b (51a8f2ba)] at android.os.Parcel.readException(Parcel.java:2990)
[EspressoDriver@023b (51a8f2ba)] at android.os.Parcel.readException(Parcel.java:2932)
[EspressoDriver@023b (51a8f2ba)] at android.app.IActivityManager$Stub$Proxy.startInstrumentation(IActivityManager.java:6432)
[EspressoDriver@023b (51a8f2ba)] at com.android.commands.am.Instrument.run(Instrument.java:532)
[EspressoDriver@023b (51a8f2ba)] at com.android.commands.am.Am.runInstrument(Am.java:208)
[EspressoDriver@023b (51a8f2ba)] at com.android.commands.am.Am.onRun(Am.java:85)
[EspressoDriver@023b (51a8f2ba)] at com.android.internal.os.BaseCommand.run(BaseCommand.java:62)
[EspressoDriver@023b (51a8f2ba)] at com.android.commands.am.Am.main(Am.java:54)
[EspressoDriver@023b (51a8f2ba)] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[EspressoDriver@023b (51a8f2ba)] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:411)
[EspressoDriver@023b (51a8f2ba)] Caused by: android.os.RemoteException: Remote stack trace:
[EspressoDriver@023b (51a8f2ba)] at com.android.server.am.ActivityManagerService.startInstrumentation(ActivityManagerService.java:17355)
[EspressoDriver@023b (51a8f2ba)] at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3053)
[EspressoDriver@023b (51a8f2ba)] at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3148)
[EspressoDriver@023b (51a8f2ba)] at android.os.Binder.execTransactInternal(Binder.java:1316)
[EspressoDriver@023b (51a8f2ba)] at android.os.Binder.execTransact(Binder.java:1280)
[EspressoDriver@023b (51a8f2ba)] Instrumentation process exited with code 1 from signal null
[EspressoDriver@023b (51a8f2ba)] Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details
[EspressoDriver@023b (51a8f2ba)] Deleting espresso session
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell am force-stop com.sec.android.app.popupcalculator'
[Logcat] Stopping logcat capture
[EspressoDriver@023b (51a8f2ba)] Restoring hidden api policy to the device default configuration
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[ADB] Removing forwarded port socket connection: 8300
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF forward --remove tcp:8300'
[AppiumDriver@351e] Event 'newSessionStarted' logged at 1698391227554 (09:20:27 GMT+0200 (hora de verano de Europa central))
[AppiumDriver@351e] Encountered internal error running command: A new session could not be created. Details: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[AppiumDriver@351e] Error: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[AppiumDriver@351e] at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[AppiumDriver@351e] at condFn (/home/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:313:20)
[AppiumDriver@351e] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:221:26)
[AppiumDriver@351e] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:20)
[AppiumDriver@351e] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:14)
[AppiumDriver@351e] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:14)
[AppiumDriver@351e] at waitForCondition (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:238:10)
[AppiumDriver@351e] at EspressoRunner.startSession (/home/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:307:7)
[AppiumDriver@351e] at EspressoDriver.startEspressoSession (/home/.appium/node_modules/appium-espresso-driver/lib/driver.js:439:5)
[AppiumDriver@351e] at EspressoDriver.createSession (/home/.appium/node_modules/appium-espresso-driver/lib/driver.js:245:7)
[AppiumDriver@351e] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:374:35)
[HTTP] <-- POST /session 500 9709 ms - 1897
[HTTP]
It looks like logcat, not Appium server log.
[Appium] Welcome to Appium v2.2.1
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at /home/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver espresso...
[Appium] Requiring driver at /home/.appium/node_modules/appium-espresso-driver
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
[Appium] http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] http://192.168.0.8:4723/
[Appium] http://172.31.0.1:4723/
[Appium] http://10.101.0.4:4723/
[Appium] http://172.19.0.1:4723/
[Appium] Available drivers:
[Appium] - uiautomator2@2.32.3 (automationName 'UiAutomator2')
[Appium] - espresso@2.26.10 (automationName 'Espresso')
[Appium] Available plugins:
[Appium] - device-farm@8.3.7
[Appium] - execute-driver@3.0.19
[Appium] No plugins activated. Use the --use-plugins flag with names of plugins to activate
[HTTP] --> GET /status
[HTTP] {}
[AppiumDriver@9ab0] Calling AppiumDriver.getStatus() with args: []
[AppiumDriver@9ab0] Responding to client with driver.getStatus() result: {"ready":true,"message":"The server is ready to accept new connections","build":{"version":"2.2.1"}}
[HTTP] <-- GET /status 200 4 ms - 110
[HTTP]
[HTTP] Request idempotency key: 759fafa5-e16d-4f8e-803f-d39f0b49a185
[HTTP] --> POST /session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:appActivity":"com.sec.android.app.popupcalculator.Calculator","appium:appPackage":"com.sec.android.app.popupcalculator","appium:automationName":"Espresso","appium:espressoBuildConfig":"{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}","appium:forceEspressoRebuild":true,"appium:noReset":true,"appium:showGradleLog":true,"platformName":"ANDROID"}}}
[AppiumDriver@9ab0] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:appActivity":"com.sec.android.app.popupcalculator.Calculator","appium:appPackage":"com.sec.android.app.popupcalculator","appium:automationName":"Espresso","appium:espressoBuildConfig":"{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}","appium:forceEspressoRebuild":true,"appium:noReset":true,"appium:showGradleLog":true,"platformName":"ANDROID"}}]
[AppiumDriver@9ab0] Event 'newSessionRequested' logged at 1698389917241 (08:58:37 GMT+0200 (hora de verano de Europa central))
[Appium] Attempting to find matching driver for automationName 'Espresso' and platformName 'ANDROID'
[Appium] The 'espresso' driver was installed and matched caps.
[Appium] Will require it at /home/.appium/node_modules/appium-espresso-driver
[Appium] Requiring driver at /home/.appium/node_modules/appium-espresso-driver
[AppiumDriver@9ab0] Appium v2.2.1 creating new EspressoDriver (v2.26.10) session
[AppiumDriver@9ab0] Checking BaseDriver versions for Appium and EspressoDriver
[AppiumDriver@9ab0] Appium's BaseDriver version is 9.4.1
[AppiumDriver@9ab0] EspressoDriver's BaseDriver version is 9.4.1
[EspressoDriver@2784] Creating session with W3C capabilities: {
[EspressoDriver@2784] "alwaysMatch": {
[EspressoDriver@2784] "platformName": "ANDROID",
[EspressoDriver@2784] "appium:appActivity": "com.sec.android.app.popupcalculator.Calculator",
[EspressoDriver@2784] "appium:appPackage": "com.sec.android.app.popupcalculator",
[EspressoDriver@2784] "appium:automationName": "Espresso",
[EspressoDriver@2784] "appium:espressoBuildConfig": "{\"androidGradlePlugin\": \"8.0\",\"gradle\": \"8.0\",\"compileSdk\": \"33\", \"additionalAndroidTestDependencies\": [\"androidx.lifecycle:lifecycle-extensions:2.2.0\", \"androidx.activity:activity:1.3.1\", \"androidx.fragment:fragment:1.2.0\"]}",
[EspressoDriver@2784] "appium:forceEspressoRebuild": true,
[EspressoDriver@2784] "appium:noReset": true,
[EspressoDriver@2784] "appium:showGradleLog": true
[EspressoDriver@2784] },
[EspressoDriver@2784] "firstMatch": [
[EspressoDriver@2784] {}
[EspressoDriver@2784] ]
[EspressoDriver@2784] }
[EspressoDriver@2784 (ba27f3f5)] Session created with session id: ba27f3f5-3a9d-4a25-8602-4eff08a93ab5
[ADB] Found 5 'build-tools' folders under '/home/Android/Sdk' (newest first):
[ADB] /home/Android/Sdk/build-tools/34.0.0
[ADB] /home/Android/Sdk/build-tools/33.0.2
[ADB] /home/Android/Sdk/build-tools/33.0.1
[ADB] /home/Android/Sdk/build-tools/33.0.0
[ADB] /home/Android/Sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/home/Android/Sdk/platform-tools/adb'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[ADB] Trying to find connected Android devices
[ADB] Getting connected devices
[ADB] Connected devices: [{"udid":"R8YW80AZNLF","state":"device"}]
[AndroidDriver] Using device: R8YW80AZNLF
[ADB] Using 'adb' from '/home/Android/Sdk/platform-tools/adb'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 start-server'
[ADB] Setting device id to R8YW80AZNLF
[EspressoDriver@2784 (ba27f3f5)] App file was not listed, instead we're going to run com.sec.android.app.popupcalculator directly on the device
[ADB] Getting install status for com.sec.android.app.popupcalculator
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell pm path com.sec.android.app.popupcalculator'
[ADB] 'com.sec.android.app.popupcalculator' is installed
[EspressoDriver@2784 (ba27f3f5)] EspressoDriver version: 2.26.10
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell getprop ro.build.version.sdk'
[ADB] Current device property 'ro.build.version.sdk': 33
[ADB] Getting device platform version
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell getprop ro.build.version.release'
[ADB] Current device property 'ro.build.version.release': 13
[ADB] Device API level: 33
[EspressoDriver@2784 (ba27f3f5)] Relaxing hidden api policy
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF 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
[AndroidDriver] Pushing settings apk to device...
[ADB] Getting package info for 'io.appium.settings'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF 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.1.2' >= '5.1.2')
[ADB] There is no need to install/upgrade '/home/.appium/node_modules/appium-espresso-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[ADB] Getting IDs of all 'io.appium.settings' processes
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell 'pgrep --help; echo $?''
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF 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 '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell appops set io.appium.settings android:mock_location allow'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell "[ -e '/data/local/tmp/mock_apps.json' ] && echo __PASS__"'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell cat /data/local/tmp/mock_apps.json'
[Logcat] Starting logs capture with command: /home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF logcat -v threadtime
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell settings get global animator_duration_scale'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell settings get global transition_animation_scale'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell settings get global window_animation_scale'
[EspressoDriver@2784 (ba27f3f5)] Window animation is already disabled
[EspressoDriver@2784 (ba27f3f5)] Forwarding Espresso Server port 6791 to 8300
[ADB] Forwarding system: 8300 to device: 6791
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF forward tcp:8300 tcp:6791'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[EspressoDriver@2784 (ba27f3f5)] No app capability. Assuming it is already on the device
[EspressoDriver@2784 (ba27f3f5)] 'forceEspressoRebuild' capability is enabled
[EspressoDriver@2784 (ba27f3f5)] Deleting the obsolete Espresso server package '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk'
[EspressoDriver@2784 (ba27f3f5)] Loading the build configuration from 'espressoBuildConfig' capability
[EspressoDriver@2784 (ba27f3f5)] Building espresso server in '/tmp/espresso-server-R8YW80AZNLF'
[EspressoDriver@2784 (ba27f3f5)] The build folder root could be customized by changing the 'tmpDir' capability
[EspressoDriver@2784 (ba27f3f5)] Copying espresso server template from ('/home/.appium/node_modules/appium-espresso-driver/espresso-server' to '/tmp/espresso-server-R8YW80AZNLF')
[Support] Traversed 401 directories and 1727 files in 360ms
[EspressoDriver@2784 (ba27f3f5)] Bulding espresso server
[EspressoDriver@2784 (ba27f3f5)] Adding the following additionalAndroidTestDependencies to build.gradle.kts: androidTestImplementation("androidx.lifecycle:lifecycle-extensions:2.2.0"),androidTestImplementation("androidx.activity:activity:1.3.1"),androidTestImplementation("androidx.fragment:fragment:1.2.0")
[EspressoDriver@2784 (ba27f3f5)] Beginning build with command '/tmp/espresso-server-R8YW80AZNLF/gradlew -PappiumTargetPackage=com.sec.android.app.popupcalculator app:assembleAndroidTest' in directory '/tmp/espresso-server-R8YW80AZNLF'
[EspressoDriver@2784 (ba27f3f5)] Output from Gradle will be logged. To change this, use 'showGradleLog' desired capability
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:preBuild UP-TO-DATE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:preDebugBuild UP-TO-DATE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:checkDebugAarMetadata
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:generateDebugResValues FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mapDebugSourceSetPaths
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:generateDebugResources UP-TO-DATE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugResources FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:packageDebugResources FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:parseDebugLocalResources FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:createDebugCompatibleScreenManifests
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:extractDeepLinksDebug FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugMainManifest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugManifest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugManifestForPackage FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugResources FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:compileDebugKotlin NO-SOURCE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:javaPreCompileDebug FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:compileDebugJavaWithJavac NO-SOURCE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:preDebugAndroidTestBuild SKIPPED
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:bundleDebugClassesToCompileJar
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:generateDebugAndroidTestResValues FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mapDebugAndroidTestSourceSetPaths
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:generateDebugAndroidTestResources UP-TO-DATE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:checkDebugAndroidTestAarMetadata
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestResources FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugAndroidTestManifest
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugAndroidTestResources FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:compileDebugAndroidTestKotlin FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:javaPreCompileDebugAndroidTest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:compileDebugAndroidTestJavaWithJavac FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestShaders FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:compileDebugAndroidTestShaders NO-SOURCE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:generateDebugAndroidTestAssets UP-TO-DATE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestAssets FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:compressDebugAndroidTestAssets FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:processDebugAndroidTestJavaRes NO-SOURCE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestJniLibFolders FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:desugarDebugAndroidTestFileDependencies FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:checkDebugAndroidTestDuplicateClasses
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:dexBuilderDebugAndroidTest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeExtDexDebugAndroidTest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeLibDexDebugAndroidTest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeProjectDexDebugAndroidTest FROM-CACHE
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:validateSigningDebugAndroidTest
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:writeDebugAndroidTestSigningConfigVersions
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:mergeDebugAndroidTestJavaResource
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:packageDebugAndroidTest
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:createDebugAndroidTestApkListingFileRedirect
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:assembleDebugAndroidTest
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] > Task :app:assembleAndroidTest
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT]
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] BUILD SUCCESSFUL in 2s
[EspressoDriver@2784 (ba27f3f5)] [Gradle] [STDOUT] 38 actionable tasks: 13 executed, 25 from cache
[EspressoDriver@2784 (ba27f3f5)] Copying built apk from '/tmp/espresso-server-R8YW80AZNLF/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk' to '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk'
[ADB] Checking app cert for /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk
[ADB] Using 'apksigner.jar' from '/home/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar'
[ADB] Starting apksigner: /usr/lib/jvm/default-java/bin/java -Xmx1024M -Xss1m -jar /home/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar verify --print-certs /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk
[ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
[ADB] Signer #1 certificate SHA-256 digest: 2d86c52a419498313c92a2178d85100f22b3ebeda22ae5419f43f0e6266a0db7
[ADB] Signer #1 certificate SHA-1 digest: 68cd6714458c4d9a3200c40425a35ed18106967f
[ADB] Signer #1 certificate MD5 digest: 1959dfdfbc07f3ac81fce578ec0f3d79
[ADB]
[ADB] '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' is signed with a non-default certificate
[ADB] Using 'zipalign' from '/home/Android/Sdk/build-tools/34.0.0/zipalign'
[ADB] /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' is already zip-aligned. Doing nothing
[ADB] Signing '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' with default cert
[ADB] Starting apksigner: /usr/lib/jvm/default-java/bin/java -Xmx1024M -Xss1m -jar /home/Android/Sdk/build-tools/34.0.0/lib/apksigner.jar sign --key /home/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.pk8 --cert /home/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.x509.pem /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk
[ADB] Uninstalling io.appium.espressoserver.test
[ADB] Getting install status for io.appium.espressoserver.test
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell pm path io.appium.espressoserver.test'
[ADB] 'io.appium.espressoserver.test' is installed
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell am force-stop io.appium.espressoserver.test'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF uninstall io.appium.espressoserver.test'
[ADB] 'adb uninstall io.appium.espressoserver.test' command output: Success
[ADB] io.appium.espressoserver.test was successfully uninstalled
[EspressoDriver@2784 (ba27f3f5)] Uninstalled the obsolete Espresso server package from the device under test
[ADB] Getting package info for 'io.appium.espressoserver.test'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys package io.appium.espressoserver.test'
[ADB] App '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' is not installed
[EspressoDriver@2784 (ba27f3f5)] Installing Espresso Test Server apk from the target device (path: '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk')
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF help'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF features'
[ADB] The application at '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF install /tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk'
[ADB] The installation of 'io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' took 2486ms
[ADB] Install command stdout: Serving...
[ADB] Performing Incremental Install
[ADB] Success
[ADB] Install command complete in 2434 ms
[EspressoDriver@2784 (ba27f3f5)] Installed Espresso Test Server apk '/tmp/io.appium.espressoserver.test_2.26.10_com.sec.android.app.popupcalculator_R8YW80AZNLF.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[EspressoDriver@2784 (ba27f3f5)] Performing cleanup of automation leftovers
[EspressoDriver@2784 (ba27f3f5)] No obsolete sessions have been detected (socket hang up)
[EspressoDriver@2784 (ba27f3f5)] Starting Espresso Server v2.26.10 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[ADB] Creating ADB subprocess with args: ["-P","5037","-s","R8YW80AZNLF","shell","am","instrument","-w","-e","debug","false","-e","disableAnalytics","true","io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@2784 (ba27f3f5)] Waiting up to 45000ms for Espresso server to be online
[EspressoDriver@2784 (ba27f3f5)] Matched '/status' to command name 'getStatus'
[EspressoDriver@2784 (ba27f3f5)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@2784 (ba27f3f5)] socket hang up
[EspressoDriver@2784 (ba27f3f5)] Matched '/status' to command name 'getStatus'
[EspressoDriver@2784 (ba27f3f5)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@2784 (ba27f3f5)] socket hang up
[EspressoDriver@2784 (ba27f3f5)] Matched '/status' to command name 'getStatus'
[EspressoDriver@2784 (ba27f3f5)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@2784 (ba27f3f5)] socket hang up
[EspressoDriver@2784 (ba27f3f5)] Matched '/status' to command name 'getStatus'
[EspressoDriver@2784 (ba27f3f5)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@2784 (ba27f3f5)] socket hang up
[EspressoDriver@2784 (ba27f3f5)] Matched '/status' to command name 'getStatus'
[EspressoDriver@2784 (ba27f3f5)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@2784 (ba27f3f5)] socket hang up
[EspressoDriver@2784 (ba27f3f5)] [Instrumentation] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=9781, uid=2000 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.sec.android.app.popupcalculator
[EspressoDriver@2784 (ba27f3f5)] [Instrumentation] at android.os.Parcel.createExceptionOrNull(Parcel.java:3023)
[EspressoDriver@2784 (ba27f3f5)] at android.os.Parcel.createException(Parcel.java:3007)
[EspressoDriver@2784 (ba27f3f5)] at android.os.Parcel.readException(Parcel.java:2990)
[EspressoDriver@2784 (ba27f3f5)] at android.os.Parcel.readException(Parcel.java:2932)
[EspressoDriver@2784 (ba27f3f5)] at android.app.IActivityManager$Stub$Proxy.startInstrumentation(IActivityManager.java:6432)
[EspressoDriver@2784 (ba27f3f5)] at com.android.commands.am.Instrument.run(Instrument.java:532)
[EspressoDriver@2784 (ba27f3f5)] at com.android.commands.am.Am.runInstrument(Am.java:208)
[EspressoDriver@2784 (ba27f3f5)] at com.android.commands.am.Am.onRun(Am.java:85)
[EspressoDriver@2784 (ba27f3f5)] at com.android.internal.os.BaseCommand.run(BaseCommand.java:62)
[EspressoDriver@2784 (ba27f3f5)] at com.android.commands.am.Am.main(Am.java:54)
[EspressoDriver@2784 (ba27f3f5)] [Instrumentation] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
[EspressoDriver@2784 (ba27f3f5)] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:411)
[EspressoDriver@2784 (ba27f3f5)] Caused by: android.os.RemoteException: Remote stack trace:
[EspressoDriver@2784 (ba27f3f5)] at com.android.server.am.ActivityManagerService.startInstrumentation(ActivityManagerService.java:17355)
[EspressoDriver@2784 (ba27f3f5)] at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3053)
[EspressoDriver@2784 (ba27f3f5)] at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3148)
[EspressoDriver@2784 (ba27f3f5)] at android.os.Binder.execTransactInternal(Binder.java:1316)
[EspressoDriver@2784 (ba27f3f5)] at android.os.Binder.execTransact(Binder.java:1280)
[EspressoDriver@2784 (ba27f3f5)] [Instrumentation] INSTRUMENTATION_STATUS: Error=Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=9781, uid=2000 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.sec.android.app.popupcalculator
[EspressoDriver@2784 (ba27f3f5)] INSTRUMENTATION_STATUS: id=ActivityManagerService
[EspressoDriver@2784 (ba27f3f5)] INSTRUMENTATION_STATUS_CODE: -1
[EspressoDriver@2784 (ba27f3f5)] Instrumentation process exited with code 1 from signal null
[EspressoDriver@2784 (ba27f3f5)] Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details
[EspressoDriver@2784 (ba27f3f5)] Deleting espresso session
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell am force-stop com.sec.android.app.popupcalculator'
[Logcat] Stopping logcat capture
[EspressoDriver@2784 (ba27f3f5)] Restoring hidden api policy to the device default configuration
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[ADB] Removing forwarded port socket connection: 8300
[ADB] Running '/home/Android/Sdk/platform-tools/adb -P 5037 -s R8YW80AZNLF forward --remove tcp:8300'
[AppiumDriver@9ab0] Event 'newSessionStarted' logged at 1698389930756 (08:58:50 GMT+0200 (hora de verano de Europa central))
[AppiumDriver@9ab0] Encountered internal error running command: A new session could not be created. Details: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[AppiumDriver@9ab0] Error: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[AppiumDriver@9ab0] at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/@appium/support/lib/logging.js:115:34)
[AppiumDriver@9ab0] at condFn (/home/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:313:20)
[AppiumDriver@9ab0] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:221:26)
[AppiumDriver@9ab0] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:20)
[AppiumDriver@9ab0] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:14)
[AppiumDriver@9ab0] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:14)
[AppiumDriver@9ab0] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:14)
[AppiumDriver@9ab0] at spin (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:231:14)
[AppiumDriver@9ab0] at waitForCondition (/home/.appium/node_modules/appium-espresso-driver/node_modules/asyncbox/lib/asyncbox.js:238:10)
[AppiumDriver@9ab0] at EspressoRunner.startSession (/home/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:307:7)
[AppiumDriver@9ab0] at EspressoDriver.startEspressoSession (/home/.appium/node_modules/appium-espresso-driver/lib/driver.js:439:5)
[AppiumDriver@9ab0] at EspressoDriver.createSession (/home/.appium/node_modules/appium-espresso-driver/lib/driver.js:245:7)
[AppiumDriver@9ab0] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:374:35)
[HTTP] <-- POST /session 500 13518 ms - 2129
[HTTP]
[EspressoDriver@2784 (ba27f3f5)] [Instrumentation] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=9781, uid=2000 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.sec.android.app.popupcalculator [EspressoDriver@2784 (ba27f3f5)] [Instrumentation] at android.os.Parcel.createExceptionOrNull(Parcel.java:3023)
You should use the same signature to sign the espresso server that the com.sec.android.app.popupcalculator
has. ( https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#app-signing )
This is Android Espresso framework's requirement, this appium espresso server also needs it.
https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#requirements
Both the server package and the application under test must be signed with the same digital signature.
[EspressoDriver@2784 (ba27f3f5)] [Instrumentation] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=9781, uid=2000 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.sec.android.app.popupcalculator [EspressoDriver@2784 (ba27f3f5)] [Instrumentation] at android.os.Parcel.createExceptionOrNull(Parcel.java:3023)
You should use the same signature to sign the espresso server that the
com.sec.android.app.popupcalculator
has. ( https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#app-signing ) This is Android Espresso framework's requirement, this appium espresso server also needs it.https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#requirements
Both the server package and the application under test must be signed with the same digital signature.
According to this, if I want to ignore the signature, I should put cap.setCapability("appium:noSign", true);
?? Sorry if I misunderstand the documentation, I'm trying to learn. My project does not contain an android app but only wants to test one installed on a tablet, as I understood it should put
cap.setCapability("appium:noSign", true);
cap.setCapability("noReset", false);
Sorry, I'm still misunderstanding the signature thing. Setting noSign to true or false I don't notice a difference
My project does not contain an android app but only wants to test one installed on a tablet, as I understood it should put
I assume such strategy won't work. You need to inject Espresso binary into the actual .apk first and only deploy it afterwards.
My project does not contain an android app but only wants to test one installed on a tablet, as I understood it should put
I assume such strategy won't work. You need to inject Espresso binary into the actual .apk first and only deploy it afterwards.
At the risk of sounding more ignorant, what would be the steps to do it, to inject the binary into my application project?
Usually the driver does it automatically with default settings. E.g. you provide the path to your .apk as app
capability, then it gets signed and merged into a single test package. After this package is installed to the device under test and is starting properly (the merge operation demands there are no conflicts between your app dependencies and the injected Espresso server) one may provide noReset=true
in order for it to be reused.
Thank you very much, now I understand how it works a little better, I have built the apk of my app and I have put the path in desired cap "app" and when launching the class the io.appium.settings app is installed first and then my apk is installed but when you try to open it and the first screen appears for a second, the application crashes with this error:
Proxying [POST /session] to [POST http://127.0.0.1:8300/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"ANDROID","app":"/home/Documentos/asd-next/app/build/outputs/apk/dev/debug/com.test.asd.next-0.4.13-11-bab185e-develop-dev-debug.apk","appActivity":"com.test.asd.next.MainActivity","appPackage":"com.test.asd.next.debug","appWaitDuration":40,"appWaitForLaunch":true,"automationName":"Espresso","deviceName":"Galaxy Tab A8","platformVersion":"13","showGradleLog":true,"udid":"R8YW80AZNLF"},"platformName":"ANDROID","app":"/home/Documentos/asd-next/app/build/outputs/apk/dev/debug/com.test.asd.next-0.4.13-11-bab185e-develop-dev-debug.apk","appActivity":"com.test.asd.next.MainActivity","appPackage":"com.test.asd.next.debug","appWaitDuration":40,"appWaitForLaunch":true,"automationName":"E...
[EspressoDriver@e698 (6cfb1949)] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[EspressoDriver@e698 (6cfb1949)] java.lang.NoSuchMethodError: No virtual method addOnConfigurationChangedListener(Landroidx/core/util/Consumer;)V in class Landroidx/fragment/app/FragmentActivity; or its super classes (declaration of 'androidx.fragment.app.FragmentActivity' appears in /data/app/~~RL_MKzBWA_7qMUk87DJovw==/com.test.asd.next.debug-GVPJ0qahOMKL9ouH6ejmPw==/base.apk!classes33.dex)
[EspressoDriver@e698 (6cfb1949)] at androidx.fragment.app.FragmentActivity.init(FragmentActivity.java:135)
[EspressoDriver@e698 (6cfb1949)] at androidx.fragment.app.FragmentActivity.<init>(FragmentActivity.java:108)
[EspressoDriver@e698 (6cfb1949)] at androidx.appcompat.app.AppCompatActivity.<init>(AppCompatActivity.java:96)
[EspressoDriver@e698 (6cfb1949)] at com.test.skeleton.display.presentation.MainDisplayActivity.<init>(MainDisplayActivity.java:46)
[EspressoDriver@e698 (6cfb1949)] at com.test.asd.next.Hilt_MainActivity.<init>(Hilt_MainActivity.java:25)
[EspressoDriver@e698 (6cfb1949)] at com.test.asd.next.MainActivity.<init>(MainActivity.kt:85)
[EspressoDriver@e698 (6cfb1949)] at java.lang.Class.newInstance(Native Method)
[EspressoDriver@e698 (6cfb1949)] at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
[EspressoDriver@e698 (6cfb1949)] at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
[EspressoDriver@e698 (6cfb1949)] at android.app.Instrumentation.newActivity(Instrumentation.java:1339)
[EspressoDriver@e698 (6cfb1949)] at androidx.test.runner.MonitoringInstrumentation.newActivity(MonitoringInstrumentation.java:866)
[EspressoDriver@e698 (6cfb1949)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4053)
[EspressoDriver@e698 (6cfb1949)] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4340)
[EspressoDriver@e698 (6cfb1949)] at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
[EspressoDriver@e698 (6cfb1949)] at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[EspressoDriver@e698 (6cfb1949)] at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[EspressoDriver@e698 (6cfb1949)] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2584)
[EspressoDriver@e698 (6cfb1949)] at android.os.Handler.dispatchMessage(Handler.java:106)
[EspressoDriver@e698 (6cfb1949)] at android.os.Looper.loopOnce(Looper.java:226)
[EspressoDriver@e698 (6cfb1949)] at android.os.Looper.loop(Looper.java:313)
[EspressoDriver@e698 (6cfb1949)] at android.app.ActivityThread.main(ActivityThread.java:8810)
[EspressoDriver@e698 (6cfb1949)] at java.lang.reflect.Method.invoke(Native Method)
[EspressoDriver@e698 (6cfb1949)] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
[EspressoDriver@e698 (6cfb1949)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
[EspressoDriver@e698 (6cfb1949)] socket hang up
java.lang.NoSuchMethodError: No virtual method addOnConfigurationChangedListener(Landroidx/core/util/Consumer;)V in class Landroidx/fragment/app/FragmentActivity; or its super classes (declaration of 'androidx.fragment.app.FragmentActivity' appears in /data/app/~~RL_MKzBWA_7qMUk87DJovw==/com.test.asd.next.debug-GVPJ0qahOMKL9ouH6ejmPw==/base.apk!classes33.dex)
From this point, you need to coordinate dependencies with https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#full-json-example
For example androidx.fragment:fragment
with proper version your test app uses.
Sorry for the no feedback, I'm struggling with the dependencies and the mentioned json, so far I haven't managed to get it to work. If I continue with errors, I will open another issue if you consider that it does not apply in this one.
Yes, another one is preferred. You may also find similar dependency errors in this repository or https://discuss.appium.io/ . These dependencies issue is combination of the target application and espresso server
Continuation of the error in issue #938 , I have tried to clean dependencies, update gradle, and I have updated to the plugin that you have recommended, 2.26.10, and I have tried to do the gradle wrapper command as suggested by my colleague, and I got this error:
gradle wrapper :
./gradlew clean build :
And the error to try launch appium: