FCM Token Generation

Database & APIs

Hello!
I was following the FF documentation and this video: https://www.youtube.com/watch?v=NfPiaJxayak&t=83s to set up push notifications. However, after setting it up and installing the app on my phone using the apk, when I manually pushed notifications from FF app, it got pushed to 0 devices.

After a little bit of debugging, here are a few findings

  1. No fcm_token subcollection was getting added to my user document after new login or account creation

  2. The addFcmToken cloud function was not receiving any requests.

  3. I was suggested in multiple blogs (and even in the video above) to delete and redeploy the functions. So I did that, but whenever i deleted and tried to redeploy:

    1. on the first try it would give me an error "Not Deployed (Error)" even though the functions are created again. Interestingly, the new sendPushNotificationsTrigger function would show the same number of requests in Firebase Functions dashboard as the one i just deleted even though previous function was deleted successfully and i did not trigger notifications again.

    2. on my second try (now without deleting the functions that appear after first redeployment try that shows error), it would not give an error and give a successful deployment.

Based on 1 and 2, I would think that FF can not generate FCM tokens due to some access issue. But I did not come across any extra access privileges in the documentation that would be required for push notifications.

And 3 complicates the issue even further for me.

I am new to app development so I am out of ideas after this much debugging. Would appreciate any help I can get.

What have you tried so far?

Deleted and redeployed firebase functions a few times
Redeployed firebase rules and indexes
Added Cloud Functions Admin and Service Account user to [email protected]'s roles in IAM

Did you check FlutterFlow's Documentation for this topic?
Yes
2
4 replies