Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[URGENT] Firestore Rules are beign replaced while sending Push Notifications #4940

Open
1 of 2 tasks
Xefrok opened this issue Nov 20, 2024 · 4 comments
Open
1 of 2 tasks
Assignees
Labels
Bug status: confirmed Issue has been reproduced and confirmed as a bug.

Comments

@Xefrok
Copy link

Xefrok commented Nov 20, 2024

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

Hello FlutterFlow Support Team,

I’ve encountered a critical issue with the Push Notifications feature in the FlutterFlow Settings. Each time I send a push notification using this option, it completely overwrites my existing Firestore rules with a different set of rules.

Here are my Firestore rules before clicking on "Send Push Notification":
image

And here are my Firestore rules after clicking "Send Push Notification":
image

This issue caused a significant outage in my production environment for over 6 hours until I identified that the overwritten rules were the root cause. This behavior is not only inconvenient but also poses a severe risk to live applications.

Could you please address this issue urgently? It’s crucial for the Push Notifications feature to work without altering Firestore rules, or at least notify users about any changes it will make.

Expected Behavior

My rules should not beign changed without my permission or by any other actions rather than the "Deploy Firestore Rules"

Steps to Reproduce

1.- Create a new blank project
2.- Connect it to firebase
3.- Create 2 or 3 collections and deploy rules
4.- Enable push notifications
5.- Send push notification

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

Not neccesary

Visual documentation

image

Environment

- FlutterFlow version: 5.0.10+
- Platform: Web
- Browser name and version: Chrome
- Operating system and version affected: Windows 11

Additional Information

FYI: I already re-deployed Push Notifications in case was that but in the Cloud Function code it doesn't seems to be the problem i think is triggered from the Send Push Notification button

@Xefrok Xefrok added the status: needs triage A potential issue that has not been confirmed as a bug. label Nov 20, 2024
@Alezanello Alezanello self-assigned this Nov 20, 2024
Copy link
Collaborator

Hello,

Thank you for bringing this issue to our attention, and I sincerely apologize for the inconvenience this has caused. I completely understand how impactful this must have been for you.

I’ll escalate this to our engineering team with high priority to ensure it’s addressed as soon as possible.

Thank you for your patience and understanding!

@Alezanello Alezanello removed the status: needs triage A potential issue that has not been confirmed as a bug. label Nov 20, 2024
@Alezanello Alezanello added status: confirmed Issue has been reproduced and confirmed as a bug. Bug labels Nov 20, 2024 — with Linear
@Alezanello Alezanello removed their assignment Nov 20, 2024
@aemelyanovff
Copy link
Collaborator

@Xefrok Does your Firebase project have more than one Firestore database in it?

@Xefrok
Copy link
Author

Xefrok commented Nov 21, 2024

@Xefrok Does your Firebase project have more than one Firestore database in it?

Yes, do you think that could generated the issue? but I didn't add the second database to the FlutterFlow project

image

@aemelyanovff
Copy link
Collaborator

@Xefrok Does your Firebase project have more than one Firestore database in it?

Yes, do you think that could generated the issue? but I didn't add the second database to the FlutterFlow project

image

Thanks for the confirmation.

This is what FlutterFlow does before it sends a push notification:

  1. Load existing security rules in your Firebase project.
  2. Generate a new rule needed to send the notification.
  3. Merge the new rule with existing rules.
  4. Deploy rules.

The problem happens on the first step - instead of loading rules for the default database, it loads rules for the non-default database. I believe that this is a bug in Firebase Tools (the utility FlutterFlow uses to interact with user projects). I filed a bug there. In the meantime, we'll try to find some woraround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug status: confirmed Issue has been reproduced and confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants