Skip to content

FirebaseAuth Java SDK - Hanging in GlobalScope.launch(Dispatchers.Main) #661

Closed Answered by bitspittle
meavydev asked this question in Q&A
Discussion options

You must be logged in to vote

The fix might be simple. Add a dependency on org.jetbrains.kotlinx:kotlinx-coroutines-swing and tell me if that solves it for you.

Even if you're not using Swing yourself -- it is a UI framework after all -- JVMs all include it as part of the package, and they provide useful scheduling functionality that coroutines take advantage of here.

For me, this looks like:

gradle/libs.versions.toml

kotlinx-coroutines = "1.10.1"

[libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }

[bundles]
kot…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@bitspittle
Comment options

@meavydev
Comment options

@bitspittle
Comment options

Comment options

You must be logged in to vote
2 replies
@meavydev
Comment options

@bitspittle
Comment options

Answer selected by meavydev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #660 on February 24, 2025 15:11.