Skip to content

Can not pass null to List typed Cloud function parameters #5590

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

Open
2 tasks done
reghta opened this issue Mar 21, 2025 · 4 comments
Open
2 tasks done

Can not pass null to List typed Cloud function parameters #5590

reghta opened this issue Mar 21, 2025 · 4 comments
Labels
Bug status: confirmed Issue has been reproduced and confirmed as a bug.

Comments

@reghta
Copy link

reghta commented Mar 21, 2025

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

Although the parameter is marked as Nullable, I get an error when I leave the input list fields empty.

Expected Behavior

Should allow leaving the field null and not throw an error.

Steps to Reproduce

  1. Create a cloud function (I believe the same happens for custom actions)
  2. Add a string list parameter that is nullable
  3. Use the cloud function in an action flow
  4. The UI shows an error saying: Cloud Function argument "xyz" is not set properly.

Reproducible from Blank

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

Bug Report Code (Required)

ITEeicqB35RIpbxJ17rQa+xapwMwJ0QlUIInj+0bWRMhfLLpOokUfMn4alpLYtecdwlAIlmkqzkDpK3xkobPOMAVGE+BfIhOzJRXQQHKQnOtMoiJC5CST3B7L+9WN0yy06aRuyVSH/pqSF473E6Pe/CNG3qCf9qOYwx5e6fDbOY=

Visual documentation

Image Image

Environment

- FlutterFlow version: FlutterFlow v5.2.9 released March 14, 2025
Flutter version is 3.27.3
- Platform: Web
- Browser name and version: Chrome 
- Operating system and version affected: MacOS

This is not version/platform/browser/os specific, it has been ongoing since I started FF 1 year ago.

Additional Information

No response

@reghta reghta added the status: needs triage A potential issue that has not been confirmed as a bug. label Mar 21, 2025
@Juansarmi Juansarmi self-assigned this Mar 21, 2025
Copy link
Collaborator

Hello!

I'm sorry to hear you're experiencing this issue.

I’ve reviewed your project and understand what you're referring to. It seems that this is a limitation with list-type parameters, likely to prevent errors.

A simple workaround you can implement is to send an empty list instead of null or an undefined value. You can set this up in the page state, the app state, or by sending a random list with a length of 0.

Let me know if this helps resolve the issue.

Best regards.

@Juansarmi Juansarmi added the status: not a bug This is not a bug. label Mar 21, 2025 — with Linear
@reghta
Copy link
Author

reghta commented Mar 22, 2025

Thank you for the reply.

Thinking of the workarounds, I had set up an emptyString constant in the project but it also threw an error saying constant shouldn't be empty. I understand the workarounds. Though note that these are needed for each list with a different data type e.g. list of songs, list of artists etc all require creating different placeholders. So whilst there is a workaround, when combined it causes nuisance and creates clutter in the apps.

Copy link
Collaborator

Hello again!
I understand that this solution is not the most intuitive or convenient. I recognize that this is a bug, and I will report it to the engineering team to find a solution. I will keep you updated on any developments regarding this case.
Best regards.

@Juansarmi Juansarmi removed the status: not a bug This is not a bug. label Mar 26, 2025
Copy link

github-actions bot commented Apr 3, 2025

This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue.

@rzambroni rzambroni removed status: needs triage A potential issue that has not been confirmed as a bug. status: stale labels Apr 8, 2025
@rzambroni rzambroni added status: confirmed Issue has been reproduced and confirmed as a bug. Bug labels Apr 8, 2025 — with Linear
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