Firebase/Flutter google-services.json conflicts
If your project is NOT
listed on Google Play Store AND
the package is still NOT
that important in your work flow create a new project with other package name and reset your package name across the files in your flutter project as you would normally do
Thorvald
Updated on December 26, 2022Comments
-
Thorvald over 1 year
After I lost my access credentials to my old firebase account (rookie mistake I know but things happen!) that already has Google Auth enabled and linked with the SHA1 fingerprint I set up a new account and enabled the Google Auth using SHA256 fingerprint this time because it wouldn't let me use the same SHA1 and the same package name twice then I switched the files
google-services.json
andGoogleService-Info.plist
.When I tried to test adding a document to a collection in firestore, I get no errors or warnings in the console but the firestore console doesn't show the added documents as well, it does not seem that there is something wrong with the code.
My question is how to know if there are any conflicts what-so-ever? is there some kind of way to know which account is currently linked to the app ?
-
Tharaka Dayanjana over 3 yearsDo you run flutter clean after the new account connected..?
-
Thorvald over 3 years@TharakaDayanjana no I didn't actually
-
Thorvald over 3 years@TharakaDayanjana so I ran
flutter clean
but now I can't sign in at all and this is what I get instead is the login result returns NULL -
Tharaka Dayanjana over 3 yearsI think that might be a problem with your .json file. do you add SHA 1 key correctly..?
-
Thorvald over 3 yearsas I mentioned above I used SHA256 instead because I couldn't add SHA1 twice
-
Thorvald over 3 yearsoh, I just realized that SHA-256 doesn't work with OAuth2
-
Thorvald over 3 years@TharakaDayanjana do you have any other alternatives to this? I can't log in my old account that has the SHA1 enabled
-
Tharaka Dayanjana over 3 yearsthe only way I know is deleting the project. but your case can't do it. sorry
-
Tharaka Dayanjana over 3 yearsAnother option is to delete the debug.keystore and generate a new one with: keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000 Remember you have to uninstall the app otherwise you get the [INSTALL_FAILED_UPDATE_INCOMPATIBLE] error. follow this link :- stackoverflow.com/questions/24160011/…
-
Thorvald over 3 years@TharakaDayanjana the app is not on Play Store yet to do that
-
Emmanuel over 3 yearsAlthough it might be possible to follow the path that you're following, it might be better to start a recovery process for your account, with firebase support, so you can get back everything back and from my point of view it will require less effort than what you're trying to do
-