appium-espresso-driver: Can't make Appium work with Compose 1.2.0 - java.lang.AbstractMethodError: abstract method "kotlin.coroutines.CoroutineContext$Key androidx.compose.ui.platform.InfiniteAnimationPolicy.getKey()"
I’m using latest beta versions of appium (Appium v2.0.0-beta.42) and espresso driver, but I can’t make it work with compose app. I’ve tried even on empty compose Hello world project generated by Android studio (using compose version 1.2.0), but the appium still throws this error:
[debug] [EspressoDriver@d452 (d7e46f24)] [Instrumentation] io.appium.espressoserver.EspressoServerRunnerTest: [debug] [EspressoDriver@d452 (d7e46f24)] [Instrumentation] Error in startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest): [debug] [EspressoDriver@d452 (d7e46f24)] java.lang.AbstractMethodError: abstract method "kotlin.coroutines.CoroutineContext$Key androidx.compose.ui.platform.InfiniteAnimationPolicy.getKey()" [debug] [EspressoDriver@d452 (d7e46f24)] at kotlin.coroutines.CoroutineContext$plus$1.invoke(CoroutineContext.kt:33) [debug] [EspressoDriver@d452 (d7e46f24)] at kotlin.coroutines.CoroutineContext$plus$1.invoke(CoroutineContext.kt:32) [debug] [EspressoDriver@d452 (d7e46f24)] at kotlin.coroutines.CoroutineContext$Element$DefaultImpls.fold(CoroutineContext.kt:70) [debug] [EspressoDriver@d452 (d7e46f24)] at androidx.compose.ui.platform.InfiniteAnimationPolicy$DefaultImpls.fold(InfiniteAnimationPolicy.kt:36) [debug] [EspressoDriver@d452 (d7e46f24)] at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$infiniteAnimationPolicy$1.fold(ComposeUiTest.android.kt:239) [debug] [EspressoDriver@d452 (d7e46f24)] at kotlin.coroutines.CoroutineContext$DefaultImpls.plus(CoroutineContext.kt:32) [debug] [EspressoDriver@d452 (d7e46f24)] at kotlin.coroutines.CombinedContext.plus(CoroutineContextImpl.kt:111) [debug] [EspressoDriver@d452 (d7e46f24)] at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.<init>(ComposeUiTest.android.kt:248) [debug] [EspressoDriver@d452 (d7e46f24)] at androidx.compose.ui.test.junit4.AndroidComposeTestRule$special$$inlined$AndroidComposeUiTestEnvironment$1.<init>(ComposeUiTest.android.kt:203) [debug] [EspressoDriver@d452 (d7e46f24)] at androidx.compose.ui.test.junit4.AndroidComposeTestRule.<init>(AndroidComposeTestRule.android.kt:212) [debug] [EspressoDriver@d452 (d7e46f24)] at io.appium.espressoserver.EspressoServerRunnerTest.<init>(EspressoServerRunnerTest.kt:45)
Did anyone make appium espresso work with Compose?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 10
- Comments: 20 (8 by maintainers)
The build itself seems ok, the above behavior is expected
I fixed this by forcing androidx.compose.ui to 1.2.1, looks like there was a dependency conflict between testing and runtime deps
Tried a bit last night. Still getting a weird error, so need to take a look further though. It seems like the compose also has complicated dependencies… (based on https://github.com/toantk238/Test-Appium-Espresso-Driver)
@rock-tran unfortunately we still didn’t manage to fix this issue. We are just trying different versions of appium driver (beta, rc) and some it works on some simple apps, but so far it never worked on the app we want to test.
Thanks for posting sample project, it would be really nice if @KazuCocoa came up with something
Let me take a look by finding a chance