Search code examples
androidfirebasegoogle-cloud-platformfirebase-in-app-messaging

Firebase In-App Messaging - PERMISSION_DENIED (Requests blocked issue) in Android


Recently I setup Firebase In-App Messaging in my existing project, but when I'm running the application for testing I'm getting PERMISSION_DENIED issue. The project already using many other services of firebase like FCM, Dynamic Links, Crashlytics, etc and all are working fine. Please help it out.

Configurations I have done

Dependencies in app gradle

implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.firebase:firebase-inappmessaging-display:19.0.2'

The firebase logs are

    I/FIAM.Headless: Starting InAppMessaging runtime with Instance ID cNqdR69UnlM
    I/FIAM.Headless: Setting display event listener
    I/FIAM.Headless: went foreground
    I/FIAM.Headless: Forcing fetch from service rather than cache. Test Device: false | App Fresh Install: true
    I/FIAM.Headless: Recoverable exception while reading cache: /data/user/0/com.social.dapp.debug/files/fiam_impressions_store_file (No such file or directory)
    I/FIAM.Headless: Fetching campaigns from service.
    I/FIAM.Headless: Removing display event listener
    W/FIAM.Headless: Service fetch error: PERMISSION_DENIED: Requests from this Android client application com.social.dapp.debug are blocked.
    I/FIAM.Headless: Setting display event listener
    I/FIAM.Headless: Removing display event listener

Solution

  • It started to work in my release build. Yesterday I build the signed app and uploaded it to the play store and in that app In-App Messaging working utterly fine, I still don't know why it is not working in debug app while I have configured right SHA1 for debugging app also and all other services of firebase also working fine in debug.