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

Build fails when creating/updating document with enums #5490

Open
1 of 2 tasks
MartinLockheart opened this issue Feb 27, 2025 · 4 comments
Open
1 of 2 tasks

Build fails when creating/updating document with enums #5490

MartinLockheart opened this issue Feb 27, 2025 · 4 comments
Assignees
Labels
Bug status: confirmed Issue has been reproduced and confirmed as a bug.

Comments

@MartinLockheart
Copy link

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

Today, I adjusted a "Create Document" action to set the value of a field ("roles") which contains a list of enums (userType). The value is set from a list of userType enums in an app state variable.

After adjusting the action to set the value of that field, the build fails and I receive the error message in the screenshot. When I remove that field from my create document action, the build completes.

Adding/removing that field from the action is the only thing changed between a successful build and a failing one.

As a side note, I was getting this same error the other day when I tried to pass an enum as a notification parameter. I thought I was just doing something that notifications couldn't handle, but this suggests a larger issue (and I need to be able to update this field), so I'm reporting it here.

Expected Behavior

I should be able to set the value of a list of enums without running into errors.

Steps to Reproduce

  1. Create a new enum
  2. Add field with list of enums to a Firebase collection
  3. Add app state variable with list of enums
  4. Create a new page
  5. Add a button to the page
  6. Add a "creation document" action to the button and set the field with the list of enums from the app state variable with the list of enums

Reproducible from Blank

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

Bug Report Code (Required)

ITEekcjf35VOj7wE7qnQdcJvuwMxQUB+bZ0vlO1FGBYcCIzvB6QUf8nUaXdvT7CiSnNcOlK0hlMJwaGJjtjLMPk3BzKqRrV607hIZg/MTka6aZCyPKrtXEElQMBUfmWB5pmjmCYmOsVaR1Jk3WGPcq3qNleeY8aSfxBlZ7vfcPo=

Visual documentation

Image
Image
Image

Environment

- FlutterFlow version: 5.2.3
- Platform: Desktop
- Browser name and version: N/A
- Operating system and version affected: Windows 11 24H2

Additional Information

I'm trying to push out an app update today, but after the Flutterflow update, it looks like that will be delayed.

@MartinLockheart MartinLockheart added the status: needs triage A potential issue that has not been confirmed as a bug. label Feb 27, 2025
@Alezanello Alezanello self-assigned this Feb 28, 2025
@Alezanello Alezanello removed the status: needs triage A potential issue that has not been confirmed as a bug. label Feb 28, 2025
@Alezanello Alezanello added status: confirmed Issue has been reproduced and confirmed as a bug. Bug labels Feb 28, 2025 — with Linear
Copy link
Collaborator

Hello!

Thank you for bringing this to our attention. I’ve confirmed the issue and will pass it along to our engineering team for further review. We appreciate your patience!

@Alezanello Alezanello removed their assignment Feb 28, 2025
@MartinLockheart
Copy link
Author

Just incase it helps, I got this error while attempting to load a page with a Firebase query that uses enums.

I have a critical bugfix that needs to be pushed out for this app, but I can't push it with more broken features. Do you have an ETA on this?

Image

@MartinLockheart MartinLockheart changed the title Build fails when updating document with enums Build fails when creating/updating document with enums Mar 1, 2025
@MartinLockheart
Copy link
Author

If a fix isn't going to be available soon, is there a way I can revert back to a previous version of Flutterflow, or a workaround I can use?

@stasik0808
Copy link

@Alezanello
I will add to the problem, as I consider it quite serious. A large number of project functions have been broken after the last update. Errors are related to enumerations. Not only writing, but also reading/filtering causes similar errors.

Example of an error when filtering from firebase by Enum was added:

Image

 - 'OrderState' is from 'package:flexifind_9vsxj3/backend/schema/enums/enums.dart' ('dependencies/flexifind_9vsxj3/lib/backend/schema/enums/enums.dart').
Try using an explicit extension application of the wanted extension or hiding unwanted extensions from scope.
      stream: queryVendorOrdersRecord(parent: FFAppState().vendor.vendor,queryBuilder: (vendorOrdersRecord) => vendorOrdersRecord.where('orderGlobalStatus', isEqualTo: _model.filterBarModel.isSelectedOrderGlobalStatus?.serialize(), isNull: (_model.filterBarModel.isSelectedOrderGlobalStatus?.serialize()) == null,).where('orderState', isEqualTo: _model.filterBarModel.isSelectedOrderState?.serialize(), isNull: (_model.filterBarModel.isSelectedOrderState?.serialize()) == null,).orderBy('createTime', descending: true),),
                                                                                          ^^^^^^^^^
lib/backend/schema/enums/enums.dart:34:12: Context: This is one of the extension members.
    String serialize() => name;
           ^^^^^^^^^
dependencies/flexifind_9vsxj3/lib/backend/schema/enums/enums.dart:61:12: Context: This is one of the extension members.
    String serialize() => name;
           ^^^^^^^^^

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

4 participants