SCEE
SCEE copied to clipboard
Crash on startup: InstanceCreationException caused by NoDefinitionFoundException
How to Reproduce
- Download a larger area
- Use the app normally
- When done, close the app with the Back button
- At a later time, re-open the app
Expected Behavior App starts normally (it does on second attempt, except of course for the crash information popup).
Does it happen in normal StreetComplete? Don’t want to test that …
Versions affected SCEE 60.0 on Android 10
Notes I think this might have to do with the fact that apps aren’t properly exited if I close them with my phone’s back button. The only thing that really exits an app on my phone seems to be the “force stop” option in app settings.
Stack trace and log
Thread: WM.task-3App version: 60.0
Device: samsung beyond0q, Android 10
Locale: de_DE
Stack trace:
java.lang.Error: org.koin.core.error.InstanceCreationException: Could not create instance for '[Factory: 'de.westnordost.streetcomplete.data.CleanerWorker',qualifier:de.westnordost.streetcomplete.data.CleanerWorker,binds:androidx.work.ListenableWorker]'
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1173)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: org.koin.core.error.InstanceCreationException: Could not create instance for '[Factory: 'de.westnordost.streetcomplete.data.CleanerWorker',qualifier:de.westnordost.streetcomplete.data.CleanerWorker,binds:androidx.work.ListenableWorker]'
at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:58)
at org.koin.core.instance.FactoryInstanceFactory.get(FactoryInstanceFactory.kt:38)
at org.koin.core.registry.InstanceRegistry.resolveInstance$koin_core(InstanceRegistry.kt:110)
at org.koin.core.scope.Scope.resolveFromRegistry(Scope.kt:321)
at org.koin.core.scope.Scope.resolveFromContext(Scope.kt:311)
at org.koin.core.scope.Scope.stackParametersCall(Scope.kt:281)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:259)
at org.koin.core.scope.Scope.resolveWithOptionalLogging(Scope.kt:232)
at org.koin.core.scope.Scope.get(Scope.kt:215)
at org.koin.core.scope.Scope.getOrNull(Scope.kt:178)
at org.koin.androidx.workmanager.factory.KoinWorkerFactory.createWorker(KoinWorkerFactory.kt:161)
at androidx.work.DelegatingWorkerFactory.createWorker(DelegatingWorkerFactory.java:71)
at androidx.work.WorkerFactory.createWorkerWithDefaultFallback(WorkerFactory.java:82)
at androidx.work.impl.WorkerWrapper.runWorker(WorkerWrapper.java:243)
at androidx.work.impl.WorkerWrapper.run(WorkerWrapper.java:144)
at androidx.work.impl.utils.SerialExecutorImpl$Task.run(SerialExecutorImpl.java:96)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
... 2 more
Caused by: org.koin.core.error.NoDefinitionFoundException: No definition found for type 'androidx.work.WorkerParameters'. Check your Modules configuration and add missing type and/or qualifier!
at org.koin.core.scope.Scope.resolveFromContext(Scope.kt:374)
at org.koin.core.scope.Scope.stackParametersCall(Scope.kt:273)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:259)
at org.koin.core.scope.Scope.resolveWithOptionalLogging(Scope.kt:232)
at org.koin.core.scope.Scope.get(Scope.kt:215)
at de.westnordost.streetcomplete.data.OsmApiModuleKt.osmApiModule$lambda$16$lambda$15(OsmApiModule.kt:137)
at de.westnordost.streetcomplete.data.OsmApiModuleKt.$r8$lambda$zKo1aqBGrO2VvZQBeNzbf_zJNqE(OsmApiModule.kt:0)
at de.westnordost.streetcomplete.data.OsmApiModuleKt$$ExternalSyntheticLambda7.invoke(R8$$SyntheticClass:0)
at org.koin.core.instance.InstanceFactory.create(InstanceFactory.kt:51)
... 18 more
Log:
2025-03-05T10:13:26.675: I [MainActivity] onCreate
2025-03-05T10:13:26.836: I [MainActivity] onStart (add listeners)
2025-03-05T10:13:26.840: I [MainActivity] onResume
2025-03-05T10:13:26.867: I [QuestAutoSyncer] Checking whether to automatically download new quests at 49.8645693,8.6553438
2025-03-05T10:13:26.878: I [QuestAutoSyncer] Downloading tiny area around user
what's the point of reporting bugs in an outdated version?
what's the point of reporting bugs in an outdated version?
How to know when a new version comes out? I have downloaded the app from F-Droid just a week ago – is F-Droid outdated? Or did the newer version come out during that one week?
How to know when a new version comes out?
https://github.com/Helium314/SCEE/releases
is F-Droid outdated?
Yes.
Also see #740.
Or did the newer version come out during that one week?
60.2 came out during this week. 60.1 nearly two month ago. 60.0 is the version you reported.
Does the app no longer work for you at all, or only when “retrieving” from the background?
4. At a later time, re-open the app
How long should one wait approx.?
Does the app no longer work for you at all, or only when “retrieving” from the background?
Only in the latter case, the app seems to crash.
- At a later time, re-open the app
How long should one wait approx.?
A few hours maybe, until Samsung Device Maintenance forces the app into “standby” (to save battery). Apparently, this doesn’t kill all processes related to the app …
what's the point of reporting bugs in an outdated version?
How to know when a new version comes out? I have downloaded the app from F-Droid just a week ago – is F-Droid outdated? Or did the newer version come out during that one week?
Install Obtainium: https://github.com/ImranR98/Obtainium/releases and configure installation and update for SCEE there
Or did the newer version come out during that one week?
It did. In fact, 60.2 was released just hours before you've filed bug report, that is just luck, no worries 😸
Install Obtainium: https://github.com/ImranR98/Obtainium/releases and configure installation and update for SCEE there
Or just wait a few days for F-droid to verify reproducible build and publish it...
The only thing that really exits an app on my phone seems to be the “force stop” option in app settings.
Does clearing app from cache (swiping up on "recent apps list" ) help too, or only "force stop" helps?
- Does it happen in normal StreetComplete? Don’t want to test that …
We won't force you if you really don't want to, but that information would be very useful (because, if the bug is not in SCEE modifications, it would need to fixed upstream where the bug is. Also, if it happens only in SCEE and not SC, that would make it much easier to find the bug as only SCEE changes needs to be reviewed).
java.lang.Error: org.koin.core.error.InstanceCreationException: Could not create instance for '[Factory: 'de.westnordost.streetcomplete.data.CleanerWorker',qualifier:de.westnordost.streetcomplete.data.CleanerWorker,binds:androidx.work.ListenableWorker]' ... Caused by: org.koin.core.error.NoDefinitionFoundException: No definition found for type 'androidx.work.WorkerParameters'. Check your Modules configuration and add missing type and/or qualifier!
Points towards an issue with the dependency injection (koin). The WorkerParameters actually do not have a definition in the koin modules in SC(EE) as far as I see. But if that alone was an issue, everyone would face it. I assuem core Android classes use some koin-internal modules.
Don’t want to test that …
This is unfortunate, as the involved class (CleanerWorker) is unchanged compared to SC, and I have no real understanding of koin I could use to find the cause of the problem.
Looks similar to StreetComplete/StreetComplete#3858. Exceptions and stack traces are not exactly the same, but that may be caused by a newer koin version being used in the meantime.