`````` Guys I hope all of you are doing great I am...
# compose
e
Copy code
```
Guys I hope all of you are doing great I am getting following exception below in my jetpack compose project
java.util.NoSuchElementException: List contains no element matching the predicate. at androidx.navigation.compose.NavHostKt$NavHost$4.invoke(NavHost.kt:181) at androidx.navigation.compose.NavHostKt$NavHost$4.invoke(NavHost.kt:141) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34) at androidx.compose.animation.CrossfadeKt$Crossfade$5$1.invoke(Crossfade.kt:133) at androidx.compose.animation.CrossfadeKt$Crossfade$5$1.invoke(Crossfade.kt:128) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107) at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34) at androidx.compose.animation.CrossfadeKt.Crossfade(Crossfade.kt:142) at androidx.compose.animation.CrossfadeKt.Crossfade(Crossfade.kt:73) at androidx.navigation.compose.NavHostKt.NavHost(NavHost.kt:141) at androidx.navigation.compose.NavHostKt$NavHost$5.invoke(Unknown Source:13) at androidx.navigation.compose.NavHostKt$NavHost$5.invoke(Unknown Source:10) at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:162) at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2486) at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2754) at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3385) at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:3363) at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:341) at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source:1) at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3363) at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:3328) at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:772) at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1047) at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:124) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:541) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:510) at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34) at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1299) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309) at android.view.Choreographer.doCallbacks(Choreographer.java:923) at android.view.Choreographer.doFrame(Choreographer.java:847) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283) 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.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@5850230, androidx.compose.ui.platform.MotionDurationScaleImpl@16cbea9, StandaloneCoroutine{Cancelling}@d1adc2e, AndroidUiDispatcher@d19f3cf]```
đź§µ 14
c
Put stacktrace in thread please
e
I am gonna do it now please wait
f
And use code block, please 🙏
Copy code
like this
e
@Filip Wiesner done
thank you for your suggestion
f
1. you still didn't move the exception to this thread (it is still in the channel) 2. you probably need to tell us more about when did you encounter this and what are you trying to do
e
@Filip Wiesner I am trying it is my first time using slack I update post please check sorry for trouble
@Filip Wiesner My problem when click card it is has to open detailview I think my problem withviewmodel if you check last log it is related to kotlin coroutines and compose animation I have digged to stackoverflow I did not find a solution if you need tell me I will add my homeviewmodel class
f
The thread is where we are talking right now. The channel is where you first posted your message. The point of this request is to minimize the space taken by one post and put the long stuff where people see it only when opening the thread detail. Can you show us how are you navigating to the detail. Ideally post contained code snippet of your navigation logic
And you don't have to @ me every single message. I get notified of new messages in threads I am part of.
e
Following my my navigation logic
Copy code
fun ReadingRightNowArea(listOfbooks: List<MBook>, navController: NavController) {
    val readingNowList = listOfbooks.filter { mBook ->
        mBook.startedReading != null && mBook.finishedReading == null
    }

    HorizontalScrollableComponent(readingNowList){
        Log.d("TAG", "BoolListArea: $it")
        navController.navigate(ReaderScreens.UpdateScreen.name + "/$it")
    }

}
Copy code
@Composable
fun BookListArea(listOfBooks: List<MBook>, navController: NavController) {
    val addedBooks = listOfBooks.filter { mBook ->
        mBook.startedReading == null && mBook.finishedReading == null
    }

    HorizontalScrollableComponent(listOfBooks) {
        // Todo: on card clicked go to details
        navController.navigate(ReaderScreens.UpdateScreen.name +"/$it")
    }

}
s
Could you please move the big stack trace into the thread? You keep replying here but you aren’t doing the courtesy of following this channel’s guidelines.
If you need help understanding what we mean by this, take a look at this comment here. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1685015939778499 They kept the original message which shows to everyone in the channel short, and moved all of the details of the question into the thread, so as not to take up the entire screen (plus more) for every one of the 8000+ people in this channel. You can edit your original message to copy and then delete the stack trace from there, and then come in the thread and paste it here.
e
thank I fixed issue it was library version compatibility issue
c
đź§µ this emoji means that people want you to remove your stacktrace from the original post, and post it in your thread instead. The reason for this is because it clutters the top level chat feed.