Skip to content

Coroutine issues with Dispatchers.Main #6

Closed
@AlbRoehm

Description

@AlbRoehm

After upgrading to compose-kmp 1.6.0 i'm seeing following issues even when the mentioned packages are present.

Exception in thread "OkHttp Dispatcher" java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
	at kotlinx.coroutines.internal.MainDispatchersKt.throwMissingMainDispatcherException(MainDispatchers.kt:77)
	at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher.missing(MainDispatchers.kt:108)

I hoped that #5 fixed this issues but its still there. Replacing Dispatchers.Main with Dispatchers.Default in FirebaseAuth.kt, AsyncTask.kt and Handler.ktseems to fix the issue for me. I'm not super deep into coroutines and dispatcher, please ignore if this does not make sense to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions