We are having an issue since we updated from the v...
# koin
e
We are having an issue since we updated from the version 2.X to 3.1.3 in our Android App: Crashlytics is reporting that about 5% users are having the following crash:
Copy code
Caused by java.util.NoSuchElementException
ArrayDeque is empty.
org.koin.core.scope.Scope.resolveInstance (Scope.kt:213)
org.koin.core.scope.Scope.get (Scope.kt:193)
org.koin.androidx.viewmodel.factory.DefaultViewModelFactory.create (DefaultViewModelFactory.kt:11)
androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.java:187)
androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.java:150)
org.koin.androidx.viewmodel.ViewModelResolverKt.get (ViewModelResolver.kt:23)
org.koin.androidx.viewmodel.ViewModelResolverKt.resolveInstance (ViewModelResolver.kt:12)
org.koin.androidx.viewmodel.scope.ScopeExtKt.getViewModel (ScopeExt.kt:86)
org.koin.androidx.viewmodel.scope.ScopeExtKt.getViewModel (ScopeExt.kt:72)
org.koin.androidx.viewmodel.ext.android.ViewModelStoreOwnerExtKt.getViewModel (ViewModelStoreOwnerExt.kt:68)
But we are unable to reproduce the issue and haven't seen it in over 2 weeks of testing. I've seen that there is an open issue that seems related to this: https://github.com/InsertKoinIO/koin/issues/1149 But we are no using the
getOrNull
method that the tickets seems to imply is the cause of the issue. Is there anything (besides downgrading or waiting for a fix) that we can do? Does anyone know a way we could try and reproduce the issue in a consistent manner or why is it so hard to reproduce the issue?
a
Ok, let’s investigate
🙌 1
e
thank you! 👍