FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

FlutterFlow don't detect Firebase status when not on main branch #4943

Open AdrKacz opened 15 hours ago

AdrKacz commented 15 hours ago

Can we access your project?

Current Behavior

When working on a feature branch (i.e. not the main) my Firebase resources all appears as "Not deployed". However they are deployed, which I can confirm either by switching back to main or going directly to Firebase.

I noticed Firebase configs and resources are in read-only when not in main. I understand this could be by design as you might not want to affect configurations for all the branches depending on this environment, however I think this should be indicated in the UI as for now it's confusing whereas it is by design or just a bug.

This bug was raised several weeks ago but got closed before resolution: https://github.com/FlutterFlow/flutterflow-issues/issues/3877

Expected Behavior

I expect FlutterFlow to get the correct Firebase status when changing branch to any that is not main.

I imagine the problem is pretty straightforward: FlutterFlow just don't refetch data from Firebase when you change branch and keep an internal state saved by branch and not by project.

I don't have access to the codebase so I can't verify this assumption, you'll tell me.

Steps to Reproduce

  1. Create a project
  2. Configure Firebase, add some resources (Storage, Push Notifications, some collections) just so you can see the issues
  3. Click on Deploy everywhere you have and verify the resources are ready to use in Firebase and green in FlutterFlow
  4. Create a new branch from main, name it whatever you prefer
  5. At this point, you should already see the little bug icon on the top right that is complaining about Firebase (it will depends on what resources you deployed, for example if you deployed Push Notifications it will complains the Cloud Functions are not deployed)
  6. Go verify in the Settings for Firebase, here you'll see (1) all resources with a Deploy error requesting you to re-deploy and (2) the UI being locked down so you can't click anywhere (for example to update the Firebase project id)

Reproducible from Blank

Bug Report Code (Required)

Work from any project, not tied to any widget

Visual documentation

Step 1. Firebase configured with resources deployed in main Screenshot 2024-11-21 at 10 15 49

Step 2. FlutterFlow raise errors and warning with branch created from main Screenshot 2024-11-21 at 10 16 28

You can see that when in the feature branch, FlutterFlow still mark the connection to Firebase active, it just didn't have the deployment status of resources up to date, thus showing everything as not deployed

Environment

- FlutterFlow version: Latest (5.0.13)
- Platform: MacOS, Desktop
- Browser name and version: Not relevant
- Operating system and version affected: Not relevant

Additional Information

No response

Alezanello commented 12 hours ago

Hello!

Before creating a new branch, please ensure you’ve committed the latest changes after deploying on the main branch.

image.png image.png

Regarding the message indicating "Not deployed" (e.g., for Firebase Storage), this is expected behavior as long as no error is displayed in the top-right corner. In this case, your project is good to proceed with development.

However, please note that branches should not be treated as environments. For managing specific environments, we recommend using the Project Environment feature designed for this purpose.

AdrKacz commented 12 hours ago

Thank you for reviewing the issue! I’d like to clarify a few points, as I believe this may indeed be a bug:

  1. The latest commits have been merged, and this behavior still occurs. Could you confirm if the issue has been reproduced?

  2. It seems there might be some confusion about how Firebase and FlutterFlow interact. Firebase is an external BaaS that FlutterFlow can access to read and write resources. FlutterFlow then only imports configuration files, so the deployment status (Deploy or Not deploy) is independent of what’s committed. If I misunderstood your explanation, could you clarify how commits would affect Firebase deployment in this context?

  3. Regarding your comment about the environment: I’m familiar with this feature and its functionality. However, this particular issue appears unrelated to that, as detailed in the description above.

"This is expected behavior as long as no error is displayed in the top-right corner."

From my understanding, this does not align with the expected behavior described in the documentation or the issue report. Could you review this part again?

Thank you for your help! Let me know if I can provide any additional information to assist with debugging. 👍

@Alezanello