I followed exactly this instruction to integrate Firebase AppCheck to my app but got an issue.
Instruction: https://firebase.google.com/docs/app-check/android/play-integrity-provider
UID: [10617] PID: [30051] IntegrityService : requestIntegrityToken(IntegrityTokenRequest{nonce=AUSOiobniNOG1DYJ1foewxoNstS5AhHFBh7ATDVorL7UM9xtzsSx9Wb2hnziFoQF_uXWDV1i_JDgQm3gI9sJYtsJE1vZQf2AL_ceMhdxT12h-MYvXqm0eiAqPzBRNjq_l8pEp_SN_jbaHsfVKxUrG6OxnDKV3bgNCedzVluGZd16k8U=, cloudProjectNumber=321072962445})
UID: [10617] PID: [30051] IntegrityService : Initiate binding to the service.
UID: [10617] PID: [30051] IntegrityService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.integrityservice.IntegrityService})
UID: [10617] PID: [30051] IntegrityService : linkToDeath
[197694] rde.a(11): requestIntegrityToken() failed for com.xx.xxx.
com.google.android.finsky.integrityservice.IntegrityException
at rcz.b(PG:145)
at svn.m(PG:421)
at iap.j(PG:9)
at ivo.j(PG:22)
at iak.run(PG:246)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8163)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Caused by: DisplayErrorMessage[Error while retrieving information from server. DF-DFERH-01]
at ivo.aip(PG:40)
at ian.a(PG:916)
at ian.run(PG:6)
Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: -17: Integrity API error (-17): There is a transient error on the calling device.
Retry with an exponential backoff.
- I already enable Google Play Integrity API from firebase console.
- I already linked application from Google Play's App integrity.
- I tried to use
DebugAppCheckProviderFactory
and it works fine. - This's happening on all devices, not only my device.
- I built app from Android Studio with debug mode ON
I tried to intercept API call and see it have success response.
POST /v1/projects/xxx-xxxx/apps/1:321072962445:android:950b77037de0cfeba8bbc4:generatePlayIntegrityChallenge?key=AIzaSyAliXQM93-Jp6OlwPMwuuiWk9OdecZrG6U HTTP/1.1
Content-Type: application/json
X-Firebase-Client: H4sIAAAAAAAAAKtWykhNLCpJSk0sKVayio7VUSpLLSrOzM9TslIyUqoFAFyivEQfAAAA
X-Android-Package: xxx.xxxx.xxxx
X-Android-Cert: E63EBDC89A2C8170D354074B4001DB69925C2FC4
Content-Length: 2
User-Agent: Dalvik/2.1.0 (Linux; U; Android 11; 2201117TG Build/RKQ1.211001.001)
Host: firebaseappcheck.googleapis.com
Connection: Keep-Alive
Accept-Encoding: gzip
Response
{
"challenge": "AUSOiobniNOG1DYJ1foewxoNstS5AhHFBh7ATDVorL7UM9xtzsSx9Wb2hnziFoQF_uXWDV1i_JDgQm3gI9sJYtsJE1vZQf2AL_ceMhdxT12h-MYvXqm0eiAqPzBRNjq_l8pEp_SN_jbaHsfVKxUrG6OxnDKV3bgNCedzVluGZd16k8U=",
"ttl": "300s"
}
Please help me!