Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Auth - successful signInWithEmailAndPassword hangs, only errors returned #706

Open
meavydev opened this issue Feb 24, 2025 · 2 comments

Comments

@meavydev
Copy link

I have actually raised this as an issue in the Java SDK, as I am using Kobweb with the API running under a JVM, so it actually calls through to the Java SDK.

I am raising this issue for reference to help others who might have the same problem.

Internally in the Java SDK it is doing an enqueueRefreshTokenCall which on success tries to set the user via:

                            [email protected] = user
                            source.setResult(user)

However the setting of the FirebaseAuth.user line is just hanging under Kobweb.

@meavydev
Copy link
Author

Actually I just realised there is code behind the assignment and the problem is that it uses:

                GlobalScope.launch(Dispatchers.Main) {

Which is obviously a bad thing to do, as GlobalScope is one of the things that they say never to use...

@meavydev
Copy link
Author

Actually as a quick hack I have taken a local copy of firebase-java-sdk and removed all the Dispatchers.Main in FirebaseAuth.kt and this has got me further.
So it is being caused by the Java SDK using Dispatchers.Main which is not cross platform friendly with limited JVM support.
Well apart from GlobalScope.launch not being a good practice of course ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant