:android-wave: Anyone an idea how to debug `Compos...
# compose-android
j
👋 Anyone an idea how to debug
ComposeContentTestRule.*awaitIdle()*
issues? We have multiple UI tests where it works as expected but some where it is flaky. I always get to a LaunchedEffect which should trigger a side effect but only rarely get into the Coroutine block of the LaunchedEffect. (Test ends without waiting of completion.)
Copy code
🔴 (always reached) LaunchedEffect(uiState.registrationProgress) {
🔴 (when both breakpoints: it mostly reaches this debug point in debug mode) ...
🔴 (when only this breakpoints: it rarely reaches) ...
z
Which version of compose?
j
Tested with
androidxComposeBom = "2023.09.02"
and
"2023.08.00"
z
can you file a bug please? I think might be a regression
And are you running tests on a device or via robolectric?
i tried a really simple repro case and it behaves the way i’d expect with
waitForIdle
, but there’s some additional machinery with
awaitIdle
that might be involved. If you can provide a reproducer when you file the bug, that would be helpful
j
@Zach Klippenstein (he/him) [MOD] sry for the late response. We are testing on a real device. Finally found the time to make a reproducer: https://issuetracker.google.com/issues/305049806
gratitude thank you 1