Reputation: 91
Flutter Firebase not working when used in release mode while the app is working perfectly fine when in debug mode. I have added SHA-1 fingerprints but it didn't help.
ps. I have also connected back4app database in the app.
Upvotes: 2
Views: 3125
Reputation: 25
You may have added your debug keys but depending on your keystore file that you're using for the signing, your release keys may be different.
Navigate to /android and run .\gradlew.bat signingReport
(windows) or gradlew signingReport
(Linux). Copy both release and debug keys (SHA1 and SHA256) and add them to your firebase app. Download the updated google-services.json
file and replace it.
Upvotes: 0
Reputation: 177
In my case it was because I had forgotten to add the SHA-1 and SHA-256 fingerprints from Google Play Store -> App Signing into my Firebase configuration.
After doing so, I was able to authenticate in release.
Upvotes: 0
Reputation: 91
I solved the error by adding these two lines in the android/app/build.gradle
:
buildTypes {
release {
shrinkResources false
minifyEnabled false
signingConfig signingConfigs.debug
}
}
Upvotes: 5
Reputation: 366
SHA-1 is different between release and debug
update
Generate SHA-1 for Flutter/React-Native/Android-Native app
Upvotes: 0