Issue
I am using firestore and storage for my flutter android and ios app. On debug mode everything is fine, reading and writing to firestore and storage works. But when turning to release mode on android firestore reading and writing dont work. What could be the case? I could not finish my project for a long time. Your help is really appreciated.
When running project by typing following command, no error occurs.
flutter run --release
Build apk with following command :
flutter build apk --release
Solution
On your Android Apps Configuration in Firebase Console, under General Tab, you have to add SHA fingerprint for your app's release version.
You can find your SHA fingerprint certificate for your released app under Setup, App Integrity from your left menu in your Play Console.
It will works with either your SHA-1 or SHA-256 fingerprint certificate.
EDIT Above will works if you publish your release app through Google Play signing.
If you distribute your release app by yourself, you can check the SHA-1 fingerprint certificate from your project's gradle signing report. In there, you can find it for the Variant : Release
Answered By - adadion
Answer Checked By - Willingham (JavaFixing Volunteer)