FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
124 stars 25 forks source link

"Current Environment" cannot be written to a firestore doc #4243

Open alta-atc opened 1 week ago

alta-atc commented 1 week ago

Can we access your project?

Current Behavior

Attempting to write Global Properties > Current Environment to a firestore variable.

Test mode will not run when this field is set to write to a firestore doc

Expected Behavior

Current Environment appears to be a string, so I am expecting a string value to write to my database.

Steps to Reproduce

  1. Create an action block with a firestore write action
  2. Attempt to write Global Properties > Current Environment to a firestore doc as a string
  3. Launch test mode, it will fail

Reproducible from Blank

Bug Report Code (Required)

IT4kl8n625dgrt9c7c/fbflv9Sk7Jn47TLJEoetxc0gbfe/4PYk+evf8VBJBZNSzaH1ADGejnjkz/63WhofDMO1dJU+Vc4h6zZZAbxPPYzu6VZSkEZbodHRBFptXf0yw5J+J3xInBPZfcmA87TiuB9ivQT6Cf9qOYwx5e6fDbOY=

Visual documentation

image

Environment

- FlutterFlow version: 5.0.5
- Platform: Windows
- Browser name and version: Chrome  Version 129.0.6668.101 (Official Build) (64-bit)
- Operating system and version affected: test mode in browser

Additional Information

Honestly, I'm not even sure what Current Environment is and I just want to see the output. I cannot see it in the Debug Panel as a value.

paulperez-dev commented 1 week ago

Hi @alta-atc,

Could you clarify what you're aiming to achieve with this? Since this value can change, it might not be ideal to store it in a database. Let us know more about your use case, and we can explore a better approach together!

alta-atc commented 1 week ago

Hi @paulperez-dev -- we were trying to log some information about the users device when they log in. This field seemed relevant so we tried to capture it without success.

We ended up implementing some other custom plugins to achieve our goal and capture more information, but thought we would report this bug anyway. As a text field we would expect "current environment" to behave like other text fields. Now it is more out of curiosity that we would like to understand what kind of data is contained within this field.

paulperez-dev commented 1 week ago

Wouldn't it be possible to use the app version to identify which environment the user is connected to?

alta-atc commented 1 week ago

Well, i guess so... I just dont know what data is stored in "current environment" ... is it a version number?

Regardless, if its not writable to firestore it shouldnt appear as an option for that operation.

paulperez-dev commented 1 week ago

I'm not entirely sure how the environment is stored, but it makes sense not to show it if it's not a valid option. Thanks for your suggestion!