I was working on a flutter app that was working for both Android and IOS perfectly, including Firebase AppCheck Feature.
when I tried to release it to google play, I figured our that my package ID wasn't meeting the standarization. So, I had to change the Android Package (App ID), and consequently I had to remove the Firebase Android App from my project on the Firebase console and create a new one with the correct new package name (app id).
when I did that, everything is working correctly except the AppCheck feature from firebase. App generates error message below once tries to connect to firestore. (as I enabled the enforcement)
Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}
the App check sees this attempts on the console statistics as "Unverified Invalid Requests" with the description
Requests with an invalid App Check token, which may be from an inauthentic client attempting to impersonate your app, or from emulated environments
EDIT I found that this problem is only on debug build, release build is working correctly. this is weired as I was working previously on debug build before creating the new app.
- the new app on Firebase console app check is shown as registred.
- I've revised that option play integrety is added and it has the SHA-256 Key (the same one I was using in the previous app before changing the package).
I expect it is something relateed to the SHA1 and SHA-256 but I can't understand what is the problem. the keys I am using are the ones I was using in the old app, and I got it in the past using this command
keytool -list -v \-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
I am not sure should I redo this command before recreating a new app on firebase project or I not. also on google play console I can see App Signing information, and it has different SHA1 and SHA-256 tham what I am using.
can anyone help me understand where the problem is?