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

Jetpack Compose launch issues #1040

Open
unickq opened this issue Jan 13, 2025 · 0 comments
Open

Jetpack Compose launch issues #1040

unickq opened this issue Jan 13, 2025 · 0 comments

Comments

@unickq
Copy link

unickq commented Jan 13, 2025

Hi there,

I'm trying to set up Appium with Espresso for my project and am never able to connect. UiAutomator2 has no issues.

I found an identical one, with an qual problem that I have with mine - https://github.com/alejandrorosas/android-app-template - with JetPack compose 1.7.6.

I'm able to build and the app with appium driver, however I always receive socket hang up exception with different classnames in logs. I tried to fix those by adding espressoBuildConfig as tutorial suggests, but no luck.

{
  "appium:platformVersion": "15.0",
  "appium:automationName": "Espresso",
  "platformName": "Android",
  "appium:forceEspressoRebuild": true,
  "appium:noSign": false,
  "appium:showGradleLog": true,
  "appium:app": "/Users/unickq/Downloads/android-app-template/app/build/outputs/apk/debug/app-debug.apk",
  "appium:espressoBuildConfig": "{\"additionalAndroidTestDependencies\": [\"androidx.fragment:fragment:1.8.5\",\"androidx.compose.runtime:runtime:1.7.6\",\"androidx.compose.ui:ui-android:1.7.6\"]}"
}

Error log I have:

[3060c4d3][EspressoDriver@a439] Espresso server is online. The initialization process took 2095ms
[3060c4d3][EspressoDriver@a439] Starting the session
[3060c4d3][EspressoDriver@a439] Matched '/session' to command name 'createSession'
[3060c4d3][EspressoDriver@a439] 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","platformVersion":"15.0","automationName":"Espresso","forceEspressoRebuild":true,"noSign":false,"showGradleLog":true,"app":"/Users/unickq/Downloads/android-app-template/app/build/outputs/apk/debug/app-debug.apk","espressoBuildConfig":"{\"additionalAndroidTestDependencies\": [\"androidx.fragment:fragment:1.8.5\",\"androidx.compose.runtime:runtime:1.7.6\",\"androidx.compose.ui:ui-android:1.7.6\"]}","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"platformName":"Android","platformVersion":"15.0","automationName":"Espresso","forceEspressoRebuild":true,"noSign":false,"showGradleLog":true,"app":"/Users/unickq/Downloads/android-app-template/app/build/outputs/apk/debug/app-debug.apk","espres...
[3060c4d3][EspressoDriver@a439] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
java.lang.AbstractMethodError: abstract method "boolean androidx.compose.ui.Modifier$Element.all(kotlin.jvm.functions.Function1)"
        at androidx.compose.ui.CombinedModifier.all(Modifier.kt:403)
        at androidx.compose.ui.CombinedModifier.all(Modifier.kt:403)

I played with different versions/names as #812 suggests of androidx.compose.ui lib but still receive the same error.
image.

Gradle.build has androidTestImplementation libs.androidx.test.espresso installed, and the built-in UI test works fine.

Any suggestion is appreciated; just have no idea what else to try. Thanks

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

1 participant