Himanshu Rawat
Himanshu Rawat

Reputation: 151

How to solve Internal error in flutter to use firebase_auth

I am using stable version of flutter and firebase_auth latest version but it give me error again and again 

flutter: PlatformException(ERROR_INTERNAL_ERROR, An internal error has occurred, print and inspect the error details for more information., null)

please help me to solve me this problem . Thanks in advance…..

Upvotes: 15

Views: 14991

Answers (10)

Victorhez
Victorhez

Reputation: 19

I am facing the same issue, but solved it when i noticed that the user has been logged in on the same device again

Upvotes: -1

maometto
maometto

Reputation: 11

I have the same error, in my case with Firebase Phone Auth, and the code didn't sent to some Carrier in my country and shown the same error. You need to add another Auth method for users or try sending OTP by third party service.

Upvotes: 1

marina.nomadd
marina.nomadd

Reputation: 1

Try this:

go to https://console.firebase.google.com/

choose your project; click authentication -> get started; choose email and password -> enable;

this worked for me

Upvotes: 0

Asad Mehmood
Asad Mehmood

Reputation: 359

Actually in my case, Flutter Fire was not configuring project correctly through cli. There was a difference in Api keys written in firebase_options.dart file and the Api keys written in google-service.json and GoogleService-Info.plist files for iOS and Android Apps.

Upvotes: 1

Kirill Karmazin
Kirill Karmazin

Reputation: 6736

If enabling Sign-in methods in Firebase console/Authentication didn't help you make sure your key is not restricted in Google Cloud Platform:

  1. Go to Google Cloud Console.

  2. Open APIs & Services -> Credentials tab.

    enter image description here

  3. Open your keys Android/iOS/Flutter.

  4. Select "Don't restrict key" or carefully check APIs you want to enable.

    enter image description here

Upvotes: 12

Bojacob
Bojacob

Reputation: 440

In my case, I had Blocking Functions that verify users before account creation using beforeCreate(). I actually forgot I had it there and it was blocking all signups.

Wish the error message would be a bit more specific instead of internal error.

Upvotes: 0

J.Dragon
J.Dragon

Reputation: 717

Don't forget add DynamicLink the url which added in Sign-in Domain in Authentication

Upvotes: 0

HJo
HJo

Reputation: 2205

My issue was that my simulator had cached a user from a different project (I have dev/prod firebase projects)

I had to log out and register again.

Hopefully, this saves someone as much head-scratching as I've just been through.

Upvotes: 4

Touré Holder
Touré Holder

Reputation: 3506

Do also double-check the values in your GoogleService-Info.plist. I got this same error after using an incorrect API_KEY.

Upvotes: 1

Brett Young
Brett Young

Reputation: 306

make sure your desired method is enabled in the firebase console eg. anonymous sign-in, email/pass sign-in.

Upvotes: 10

Related Questions