androidfirebasefirebase-app-check

I am unable to test my app in closed testing because of App Check from Firebase


As in the title, I am unable to test my application that was published to closed testing in Google Play because of Firebase App Check.

Firstly, I published my app to internal testing channel, but the issue was the same. I thought it's because in internal testing app is not verified by Google, therefore I published it to closed testing and the issue still persists.

val factory = if (BuildConfig.DEBUG) {
            DebugAppCheckProviderFactory.getInstance()
        } else {
            PlayIntegrityAppCheckProviderFactory.getInstance()
        }
        FirebaseAppCheck.getInstance().installAppCheckProviderFactory(factory)

Basically what happens is that the token is empty and my server returns with 403, so I can't test my app.

I've verified that SHA256 match in my signing certificate and in App Check console.

I can disable validating tokens in my backend, but I want to test if App Check works correctly.


Solution

  • The issue was that when publishing to Play Store, Google signs aab with their own certificate, therefore my certificate SHA-256 was invalid in project settings/App Check in Firebase.

    After adding SHA-256 from integrity tab in Play Console to Firebase project and App Check I can test my app in closed testing.

    I don't know if signing AAB by Google is default, but for me it was enabled.

    Remeber, if you've changed something in Firebase, you have to update your google-services.json as certificate hash changed for me for example.