Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No virtual method performAttach()V in class Landroidx/savedstate/SavedStateRegistryController #843

Open
zastress opened this issue Jan 6, 2023 · 4 comments

Comments

@zastress
Copy link

zastress commented Jan 6, 2023

I am trying to launch an automatic test with Appium and Espresso but get stuck with the error in the title at application start. I checked that I am using a debug apk and all other Espresso dependencies. I am running Appium with Robot Framework and AppiumLibrary to start the app.

Below, the Appium logs

[Appium] Welcome to Appium v2.0.0-beta.48 (REV 6a7eac25e167a1eb2d49e13c8cc530a3188af995)
[Appium] Non-default server args:
[Appium] {
[Appium]   basePath: '/wd/hub'
[Appium] }
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] {
[Appium]   'appium:automationName': 'Espresso',
[Appium]   'appium:newCommandTimeout': 0,
[Appium]   'appium:deviceName': 'emulator-5554',
[Appium]   'appium:autoGrantPermissions': true
[Appium] }
[Appium] Attempting to load driver uiautomator2...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver xcuitest...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-xcuitest-driver
[Appium] Attempting to load driver espresso...
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
(node:22533) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[Appium] Available drivers:
[Appium]   - uiautomator2@2.12.1 (automationName 'UiAutomator2')
[Appium]   - xcuitest@4.16.3 (automationName 'XCUITest')
[Appium]   - espresso@2.13.9 (automationName 'Espresso')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[debug] [HTTP] Request idempotency key: 7b853c7e-f626-4307-bfe7-a3b18754139d
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:devicename":"emulator-5554","appium:appPackage":"net.myapp.dev","appium:appActivity":"net.myapp.app.MainActivity","appium:automationName":"Espresso","appium:noReset":"false"}}}
[debug] [AppiumDriver@87ee] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android","appium:devicename":"emulator-5554","appium:appPackage":"net.myapp.dev","appium:appActivity":"net.myapp.app.MainActivity","appium:automationName":"Espresso","appium:noReset":"false"}}]
[debug] [AppiumDriver@87ee] Event 'newSessionRequested' logged at 1672994839624 (10:47:19 GMT+0200 (Eastern European Standard Time))
[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 /Users/liviuavram/.appium/node_modules/appium-espresso-driver
[debug] [Appium] Requiring driver at /Users/liviuavram/.appium/node_modules/appium-espresso-driver
[AppiumDriver@87ee] Appium v2.0.0-beta.48 creating new EspressoDriver (v2.13.9) session
[AppiumDriver@87ee] Checking BaseDriver versions for Appium and EspressoDriver
[AppiumDriver@87ee] Appium's BaseDriver version is 9.1.0
[AppiumDriver@87ee] EspressoDriver's BaseDriver version is 9.1.0
[debug] [EspressoDriver@9a25] Creating session with W3C capabilities: {
[debug] [EspressoDriver@9a25]   "alwaysMatch": {
[debug] [EspressoDriver@9a25]     "platformName": "Android",
[debug] [EspressoDriver@9a25]     "appium:devicename": "emulator-5554",
[debug] [EspressoDriver@9a25]     "appium:appPackage": "net.myapp.dev",
[debug] [EspressoDriver@9a25]     "appium:appActivity": "net.myapp.app.MainActivity",
[debug] [EspressoDriver@9a25]     "appium:automationName": "Espresso",
[debug] [EspressoDriver@9a25]     "appium:noReset": "false",
[debug] [EspressoDriver@9a25]     "appium:newCommandTimeout": 0,
[debug] [EspressoDriver@9a25]     "appium:deviceName": "emulator-5554",
[debug] [EspressoDriver@9a25]     "appium:autoGrantPermissions": true
[debug] [EspressoDriver@9a25]   },
[debug] [EspressoDriver@9a25]   "firstMatch": [
[debug] [EspressoDriver@9a25]     {}
[debug] [EspressoDriver@9a25]   ]
[debug] [EspressoDriver@9a25] }
[EspressoDriver@9a25] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[EspressoDriver@9a25] The following capabilities were provided, but are not recognized by Appium:
[EspressoDriver@9a25]   devicename
[EspressoDriver@9a25 (c5d1140b)] Session created with session id: c5d1140b-a77a-43a2-9820-03f48d574e5f
[ADB] Found 3 'build-tools' folders under '/Users/liviuavram/Library/Android/sdk' (newest first):
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/33.0.0
[ADB]     /Users/liviuavram/Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users/liviuavram/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/liviuavram/Library/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 '/Users/liviuavram/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[EspressoDriver@9a25 (c5d1140b)] App file was not listed, instead we're going to run net.myapp.dev directly on the device
[debug] [ADB] Getting install status for net.myapp.dev
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] 'net.myapp.dev' is installed
[EspressoDriver@9a25 (c5d1140b)] EspressoDriver version: 2.13.9
[debug] [ADB] Running '/Users/liviuavram/Library/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': 31
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/liviuavram/Library/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': 12
[debug] [ADB] Device API level: 31
[EspressoDriver@9a25 (c5d1140b)] Relaxing hidden api policy
[debug] [ADB] Running '/Users/liviuavram/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
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users/liviuavram/Library/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 '/Users/liviuavram/Library/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 '/Users/liviuavram/Library/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 ('5.0.0' >= '5.0.0')
[debug] [ADB] There is no need to install/upgrade '/Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [Logcat] Starting logs capture with command: /Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global animator_duration_scale'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global transition_animation_scale'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell settings get global window_animation_scale'
[debug] [EspressoDriver@9a25 (c5d1140b)] Forwarding Espresso Server port 6791 to 8300
[debug] [ADB] Forwarding system: 8300 to device: 6791
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8300 tcp:6791'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [EspressoDriver@9a25 (c5d1140b)] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for net.myapp.dev
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] 'net.myapp.dev' is installed
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop net.myapp.dev'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear net.myapp.dev'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package net.myapp.dev'
[debug] [ADB] Retrieving requested permissions
[debug] [ADB] Retrieved 20 permissions from requested group
[debug] [ADB] Retrieving granted permissions
[debug] [ADB] Retrieved 10 permissions from install,runtime groups
[debug] [ADB] Granting permissions ["android.permission.READ_EXTERNAL_STORAGE","android.permission.WRITE_EXTERNAL_STORAGE","android.permission.ACCESS_FINE_LOCATION","android.permission.CAMERA","android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE","android.launcher.permission.CHANGE_BADGE","android.launcher.permission.READ_SETTINGS","android.launcher.permission.WRITE_SETTINGS","android.permission.READ_APP_BADGE","android.permission.ACCESS_COARSE_LOCATION"] to 'net.myapp.dev'
[debug] [ADB] Got the following command chunks to execute: [["pm","grant","net.myapp.dev","android.permission.READ_EXTERNAL_STORAGE",";","pm","grant","net.myapp.dev","android.permission.WRITE_EXTERNAL_STORAGE",";","pm","grant","net.myapp.dev","android.permission.ACCESS_FINE_LOCATION",";","pm","grant","net.myapp.dev","android.permission.CAMERA",";","pm","grant","net.myapp.dev","android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE",";","pm","grant","net.myapp.dev","android.launcher.permission.CHANGE_BADGE",";","pm","grant","net.myapp.dev","android.launcher.permission.READ_SETTINGS",";","pm","grant","net.myapp.dev","android.launcher.permission.WRITE_SETTINGS",";","pm","grant","net.myapp.dev","android.permission.READ_APP_BADGE",";","pm","grant","net.myapp.dev","android.permission.ACCESS_COARSE_LOCATION",";"]]
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm grant net.myapp.dev android.permission.READ_EXTERNAL_STORAGE ; pm grant net.myapp.dev android.permission.WRITE_EXTERNAL_STORAGE ; pm grant net.myapp.dev android.permission.ACCESS_FINE_LOCATION ; pm grant net.myapp.dev android.permission.CAMERA ; pm grant net.myapp.dev android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE ; pm grant net.myapp.dev android.launcher.permission.CHANGE_BADGE ; pm grant net.myapp.dev android.launcher.permission.READ_SETTINGS ; pm grant net.myapp.dev android.launcher.permission.WRITE_SETTINGS ; pm grant net.myapp.dev android.permission.READ_APP_BADGE ; pm grant net.myapp.dev android.permission.ACCESS_COARSE_LOCATION ;'
[debug] [AndroidDriver] Performed fast reset on the installed 'net.myapp.dev' application (stop and clear)
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell "[ -e '/data/local/tmp/espresso.apppackage' ] && echo __PASS__"'
[debug] [EspressoDriver@9a25 (c5d1140b)] The previous target application package is unknown
[EspressoDriver@9a25 (c5d1140b)] Forcing Espresso server rebuild because of changed application package
[debug] [EspressoDriver@9a25 (c5d1140b)] Deleting the obsolete Espresso server package '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[EspressoDriver@9a25 (c5d1140b)] Building espresso server in '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554'
[debug] [EspressoDriver@9a25 (c5d1140b)] The build folder root could be customized by changing the 'tmpDir' capability
[debug] [EspressoDriver@9a25 (c5d1140b)] Copying espresso server template from ('/Users/liviuavram/.appium/node_modules/appium-espresso-driver/espresso-server' to '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554')
[debug] [Support] Traversed 52 directories and 281 files in 104ms
[debug] [EspressoDriver@9a25 (c5d1140b)] Bulding espresso server
[debug] [EspressoDriver@9a25 (c5d1140b)] Beginning build with command '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554/gradlew -PappiumTargetPackage=net.myapp.dev app:assembleAndroidTest' in directory '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554'
[debug] [EspressoDriver@9a25 (c5d1140b)] Output from Gradle will not be logged. To change this, use 'showGradleLog' desired capability
[debug] [EspressoDriver@9a25 (c5d1140b)] Copying built apk from '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/espresso-server-emulator-5554/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk' to '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[debug] [ADB] Checking app cert for /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[ADB] Using 'apksigner.jar' from '/Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar verify --print-certs /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
[debug] [ADB] Signer #1 certificate SHA-256 digest: fe82fd29c451bf64a764faaa86634a05981f71ffcd92b882ed6545d2acdffe82
[debug] [ADB] Signer #1 certificate SHA-1 digest: adfec47da6d9a2ebeb0eebd2a483e44496b8fdc2
[debug] [ADB] Signer #1 certificate MD5 digest: 056c1cb0adccefb201a142db5d3fd9ec
[debug] [ADB] 
[ADB] '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is signed with a non-default certificate
[ADB] Using 'zipalign' from '/Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/zipalign'
[debug] [ADB] /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is already zip-aligned. Doing nothing
[debug] [ADB] Signing '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' with default cert
[debug] [ADB] Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/liviuavram/Library/Android/sdk/build-tools/33.0.1/lib/apksigner.jar sign --key /Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.pk8 --cert /Users/liviuavram/.appium/node_modules/appium-espresso-driver/node_modules/appium-adb/keys/testkey.x509.pem /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk
[debug] [ADB] Uninstalling io.appium.espressoserver.test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is installed
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.espressoserver.test'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 uninstall io.appium.espressoserver.test'
[debug] [ADB] 'adb uninstall io.appium.espressoserver.test' command output: Success
[ADB] io.appium.espressoserver.test was successfully uninstalled
[EspressoDriver@9a25 (c5d1140b)] Uninstalled the obsolete Espresso server package from the device under test
[debug] [ADB] Getting install status for io.appium.espressoserver.test
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.espressoserver.test'
[debug] [ADB] 'io.appium.espressoserver.test' is not installed
[debug] [ADB] App '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' is not installed
[EspressoDriver@9a25 (c5d1140b)] Installing Espresso Test Server apk from the target device (path: '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk')
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 help'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 features'
[ADB] The application at '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install /var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk'
[ADB] The installation of 'io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' took 164ms
[debug] [ADB] Install command stdout: Serving...
[debug] [ADB] Performing Incremental Install
[debug] [ADB] Success
[debug] [ADB] Install command complete in 146 ms
[EspressoDriver@9a25 (c5d1140b)] Installed Espresso Test Server apk '/var/folders/9n/zzh9y5js6kxdt2ft5l8zd9vw0000gn/T/io.appium.espressoserver.test_2.13.9_net.myapp.dev_emulator-5554.apk' (pkg: 'io.appium.espressoserver.test')
[ADB] Adding packages ["io.appium.settings","io.appium.espressoserver.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.espressoserver.test",";"]]
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.espressoserver.test ;'
[debug] [EspressoDriver@9a25 (c5d1140b)] Performing cleanup of automation leftovers
[debug] [EspressoDriver@9a25 (c5d1140b)] No obsolete sessions have been detected (socket hang up)
[EspressoDriver@9a25 (c5d1140b)] Starting Espresso Server v2.13.9 with cmd: adb shell am instrument -w -e debug false -e disableAnalytics true io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","debug",false,"-e","disableAnalytics",true,"io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@9a25 (c5d1140b)] Waiting up to 45000ms for Espresso server to be online
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] io.appium.espressoserver.EspressoServerRunnerTest:
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@9a25 (c5d1140b)] Proxying [GET /status] to [GET http://127.0.0.1:8300/status] with no body
[debug] [EspressoDriver@9a25 (c5d1140b)] Got response with status 200: {"id":"ea635626-6eda-40c6-b5a4-ea3cf80a86c9","sessionId":null,"value":null}
[EspressoDriver@9a25 (c5d1140b)] Espresso server is online. The initialization process took 1531ms
[EspressoDriver@9a25 (c5d1140b)] Starting the session
[debug] [EspressoDriver@9a25 (c5d1140b)] Matched '/session' to command name 'createSession'
[debug] [EspressoDriver@9a25 (c5d1140b)] 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","devicename":"emulator-5554","appPackage":"net.myapp.dev","appActivity":"net.myapp.app.MainActivity","automationName":"Espresso","noReset":false,"newCommandTimeout":0,"deviceName":"emulator-5554","autoGrantPermissions":true},"platformName":"Android","devicename":"emulator-5554","appPackage":"net.myapp.dev","appActivity":"net.myapp.app.MainActivity","automationName":"Espresso","noReset":false,"newCommandTimeout":0,"deviceName":"emulator-5554","autoGrantPermissions":true,"deviceUDID":"emulator-5554","appWaitPackage":"net.myapp.dev","appWaitActivity":"net.myapp.app.MainActivity"}],"alwaysMatch":{}}}
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[debug] [EspressoDriver@9a25 (c5d1140b)] java.lang.NoSuchMethodError: No virtual method performAttach()V in class Landroidx/savedstate/SavedStateRegistryController; or its super classes (declaration of 'androidx.savedstate.SavedStateRegistryController' appears in /data/app/~~-_XPaemZoOsaDyP5dvs3Vg==/io.appium.espressoserver.test-QsWDOBl2RUq8qZlMBH_E5w==/base.apk)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.activity.ComponentActivity.<init>(ComponentActivity.java:304)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.fragment.app.FragmentActivity.<init>(FragmentActivity.java:108)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at io.flutter.embedding.android.FlutterFragmentActivity.<init>(FlutterFragmentActivity.java:65)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at net.myapp.app.MainActivity.<init>(MainActivity.kt:5)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at java.lang.Class.newInstance(Native Method)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.Instrumentation.newActivity(Instrumentation.java:1273)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at androidx.test.runner.MonitoringInstrumentation.newActivity(MonitoringInstrumentation.java:817)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3532)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Handler.dispatchMessage(Handler.java:106)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Looper.loopOnce(Looper.java:201)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.os.Looper.loop(Looper.java:288)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at android.app.ActivityThread.main(ActivityThread.java:7839)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at java.lang.reflect.Method.invoke(Native Method)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
[debug] [EspressoDriver@9a25 (c5d1140b)]    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
[EspressoDriver@9a25 (c5d1140b)] socket hang up
[debug] [EspressoDriver@9a25 (c5d1140b)] Deleting espresso session
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings/.recorder.RecorderService'
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop net.myapp.dev'
[debug] [EspressoDriver@9a25 (c5d1140b)] [Instrumentation] INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [EspressoDriver@9a25 (c5d1140b)] INSTRUMENTATION_CODE: 0
[EspressoDriver@9a25 (c5d1140b)] Instrumentation process exited with code 0 from signal null
[debug] [Logcat] Stopping logcat capture
[EspressoDriver@9a25 (c5d1140b)] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/liviuavram/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''
[debug] [ADB] Removing forwarded port socket connection: 8300 
[debug] [ADB] Running '/Users/liviuavram/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8300'
[debug] [AppiumDriver@87ee] Event 'newSessionStarted' logged at 1672994847053 (10:47:27 GMT+0200 (Eastern European Standard Time))
[debug] [AppiumDriver@87ee] Encountered internal error running command: A new session could not be created. Details: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@87ee] UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting.
[debug] [AppiumDriver@87ee]     at EspressoProxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:342:13)
[debug] [AppiumDriver@87ee]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AppiumDriver@87ee]     at EspressoRunner.startSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:312:5)
[debug] [AppiumDriver@87ee]     at EspressoDriver.startEspressoSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/driver.js:444:5)
[debug] [AppiumDriver@87ee]     at EspressoDriver.createSession (/Users/liviuavram/.appium/node_modules/appium-espresso-driver/lib/driver.js:224:7)
[debug] [AppiumDriver@87ee]     at AppiumDriver.createSession (/opt/homebrew/lib/node_modules/appium/lib/appium.js:336:35)
[HTTP] <-- POST /wd/hub/session 500 7432 ms - 1382
[HTTP]

My build.gradle config but tried with other old values:

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test:monitor:1.6.1'
@realtimeprojects
Copy link

@zastress : Any updates on this issue? We are facing the same issue when trying to launch our app using the espresso driver.

@zastress
Copy link
Author

Sadly no solution yet. I am using uiautomator2 for the time being

@Sendel93
Copy link

Hi! I am facing the same issue here. I have tried bumping and downgrading the espresso version both in appium capabilities and the app's code with the same result (tested every version from 3.2 stable to 3.6-alpha) Any news on the subject?

@russtu
Copy link

russtu commented Nov 2, 2023

I get out of that mistake by putting all my app's dependencies into the json of "espressoBuildConfig" capability. The only thing is me coming up with another mistake in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants