androidfirebasesecuritygoogle-cloud-platformfirebase-app-check

App attestation failed with Firebase App check in release on Android


Integrating Firebase into my Android app and have configured it with the SHA-256 certificate fingerprint from my Google key. However, the setup isn't working, and all requests to Firebase are blocked.

Error output:

Error getting App Check token; using placeholder token instead. Error: n8.j: Error returned from API. code: 403 body: App attestation failed.

I've followed the docs:

  1. Enabled APIs

  2. Add the code in my app


Code :

    Firebase.initialize(context = this)
    if (BuildConfig.DEBUG) {
        Firebase.appCheck.installAppCheckProviderFactory(
            DebugAppCheckProviderFactory.getInstance(),
        )
    } else {
        Firebase.appCheck.installAppCheckProviderFactory(
            PlayIntegrityAppCheckProviderFactory.getInstance(),
        )
    }

Added the SHA256 of the signature key provided in the Play console -> key management section

It works on debug but not on release.

Is there a specific setting that I might be missing, or could this be an issue with the fingerprint itself?


Solution

  • I finally created a new app (with a new package name) on the Google Play console and everything works now 🥸.

    I don't know if with my multiple attempts, I've been "blacklisted" by Appcheck but anyway, if someone faces the same issue, just create a new app.