Flutter: Why does my stream end unexpectedly when logging in with Firebase Authentication?

Issue

I’m using Firebase Authentication for login in my Flutter app. It shows CircularProgressIndicator (it shows it when loading) for a long time. It then shows the following error in the debug console:

[firebase_auth/unknown] com.google.firebase.FirebaseException: An internal error has occurred. [ unexpected end of stream on com.android.okhttp.Address@3015bdb7 ]

I googled this error and read this question. This answer says to check if I have the authentication type I want enabled. I checked and it is already enabled. This answer says to check the project_id in my google-services.json file (I think the location of the file is android/app/google-services.json, I’m not sure because the asker is not using Flutter). I checked and the project ID is correct. Also, I deleted the file and downloaded it again.

I didn’t include the code because I don’t think the problem is caused by the code.

Feel free to comment if you need more information!

How to fix this error? I would appreciate any help. Thank you in advance!

Solution

Solved! That’s a network problem. I have tried and checked the network connection.

Answered By – My Car

Answer Checked By – Willingham (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *