Flutter Firebase Auth very slow

Viewed 247

I'm creating a Flutter app with Firebase Authentication. It worked fine first, but now the authentication is super slow the first time. When the user authenticates (either with email or anonymous) the first time, it works fine the next time - sign-out works, re-signing works fine. It's the first time that is slow - it takes several minutes.

I have tried creating a new project in Firebase Console. I have tried upgrading to Blaze plan (from Spark). I have tried re-creating the project. Nothing seems to help.

Any ideas?

3 Answers

I found it out the following:

  • It worked better when I tried from another Google account for Firebase. For some reason my first account is lagging. Perhaps some quotas are reached, or I'm blacklisted as a robot :). This helped for a while, but I got eventually into the same problem.
  • Then I found out that it works much better on a physical device. I was using the emulator first. It seems that the Android emulator is having some bugs for Firebase access.
  • I contacted Firebase support and got a suggestion to use Android emulator with API Level 29. It worked on one PC, did not work on another.

So far the best workaround I found is to use a physical device for testing, not an emulator.

It doesn't solve the problem at all, running the app on my phone blocks me to connect with my back-end application, waiting for a solution..

It's the issue with the recent versions of Android Emulator on Windows platform. I was using the android emulator version 31.3.10 and had that problem.

Try downgrading the android emulator version to 31.2.9

Link to downgrade - https://developer.android.com/studio/emulator_archive

Related