question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoBeanDefFoundException: No defenition found for ListenableWorker

See original GitHub issue

Describe the bug Very ofter my app crashes on boot with NoBeanDefFoundException: No defenition found for ListenableWorker

My Koin Settings

        startKoin {
            androidContext(this@SubApplication)
            androidLogger(Level.ERROR)
            androidFileProperties()
            workManagerFactory()
            modules(listOf(
                AppModules.appModule(),
                NetworkModule.okHttpModule(),
                NetworkModule.retrofitModule(),
                NetworkModule.scarletModule(),
                AppModules.repoModule(),
                WorkersModule.workersModule(),
                DatabaseModule.appDatabaseModule(),
                ViewModelsModule.viewModelModule(),
            ))
        }
object WorkersModule {

    fun workersModule() = module {
        worker { SendLocationsWorker(androidContext(), get(), get(), get(), get()) }
        worker { UpdateDeviceInfoWorker(androidContext(), get(), get()) }
    }

}

To Reproduce Steps to reproduce the behavior: I don’t know, this error appears intermittently. My workers use repositories from AppModules.repoModule()

Koin project used and used version (please complete the following information):

    def koin_version = "2.2.1"
    api("org.koin:koin-core:$koin_version")
    api("org.koin:koin-core-ext:$koin_version")
    testApi("org.koin:koin-test:$koin_version")
    api("org.koin:koin-androidx-scope:$koin_version")
    api("org.koin:koin-androidx-viewmodel:$koin_version")
    api("org.koin:koin-androidx-fragment:$koin_version")
    api("org.koin:koin-androidx-workmanager:$koin_version")
    api("org.koin:koin-androidx-ext:$koin_version")

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jaimegccommented, Jan 4, 2021

I have the same problem! The error appears intermittently as you said. Can you create a bug report?

2reactions
P1NG2WINcommented, Jan 3, 2021

still every second launch - crash

Read more comments on GitHub >

github_iconTop Results From Across the Web

WorkManager set up with KOIN - android - Stack Overflow
Caused by: org.koin.core.error.NoBeanDefFoundException: No definition found for class:'androidx.work.WorkerParameters'. Check your ...
Read more >
Org.Koin.Core.Error.Nobeandeffoundexception. How To Fix ...
The koin test results as follows: org.koin.core.error.NoBeanDefFoundException: No definition found for 'classname ' has been found.Check your module . The koin ...
Read more >
Android – Koin: NoBeanDefFoundException, Check your ...
The koin test results as follows: org.koin.core.error.NoBeanDefFoundException: No definition found for '<class_name>' has been found.
Read more >
Threading in ListenableWorker - Android Developers
A ListenableWorker only signals when the work should start and stop and leaves the threading entirely up to you.
Read more >
Koin: NoBeanDefFoundException, Check your module ...
[Solved]-Koin: NoBeanDefFoundException, Check your module definitions-kotlin. Search. score:16. Accepted answer. I found the issue and the mistake was the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found