FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
105 stars 18 forks source link

Cannot add to an unmodifiable list #3111

Closed Javicg10 closed 2 weeks ago

Javicg10 commented 3 weeks ago

Can we access your project?

Current Behavior

We have encountered an issue with our application where we are unable to add items to nested lists. Our app involves a structure where an entity contains a list of sub-entities, and each sub-entity contains another list of items. We can add entities to the main list without any issues, but adding sub-entities or items results in an error.

Observations:

  1. When a sub-entity is added (with Create Data Type) with an empty list of items, we cannot add new items to this list later.
  2. If we use the "Clear value" action on the list, it becomes modifiable, allowing us to add new items.
  3. If we manually add the items on the "add to list" action, on the Create Data Type menu, the list is modifiable. The issue only happens if we leave that list field empty when creating the data type.
  4. This issue started occurring today after the new debug panel update in FlutterFlow. Yesterday, everything was functioning correctly.
  5. The bug occurs both in the web test window on FlutterFlow and on a device when the code is downloaded and tested.

This issue occurs in both simple and complex data structures. I created a new app for testing it, and the issue also happens whenever we try to add items to a list that is a field of an item inside another list.

We need help urgently, as we have to deliver the app to a client on Monday and this bug makes it useless. Please help 😭

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Unsupported operation: Cannot add to an unmodifiable list

#0      UnmodifiableListMixin.add (dart:_internal/list.dart:114:5)
#1      _CronoAIWidgetState.build.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:effi_crono_a_p_p/effi_crono_a_p_p/crono_a_i/crono_a_i_widget.dart:1376:68)
#2      SuboperacionStruct.updateMedicionTomada (package:effi_crono_a_p_p/backend/schema/structs/suboperacion_struct.dart:86:13)
#3      _CronoAIWidgetState.build.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:effi_crono_a_p_p/effi_crono_a_p_p/crono_a_i/crono_a_i_widget.dart:1375:59)
#4      CronometrajeStruct.updateSuboperaciones (package:effi_crono_a_p_p/backend/schema/structs/cronometraje_struct.dart:98:13)
#5      _CronoAIWidgetState.build.<anonymous closure>.<anonymous closure> (package:effi_crono_a_p_p/effi_crono_a_p_p/crono_a_i/crono_a_i_widget.dart:1369:55)
#6      FFAppState.updateCurrentCronometrajeStruct (package:effi_crono_a_p_p/app_state.dart:201:13)
#7      _CronoAIWidgetState.build.<anonymous closure> (package:effi_crono_a_p_p/effi_crono_a_p_p/crono_a_i/crono_a_i_widget.dart:1367:54)
#8      _FFButtonWidgetState.build.<anonymous closure> (package:effi_crono_a_p_p/flutter_flow/flutter_flow_widgets.dart:120:38)
#9      _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1183:21)
#10     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:315:24)
#11     TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:652:11)
#12     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:309:5)
#13     BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:279:7)
#14     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:167:27)
#15     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:499:20)
#16     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:475:22)
#17     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:430:11)
#18     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:420:7)
#19     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:383:5)
#20     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:330:7)
#21     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:299:9)
#22     _invoke1 (dart:ui/hooks.dart:328:13)
#23     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:429:7)
#24     _dispatchPointerDataPacket (dart:ui/hooks.dart:262:31)

Expected Behavior

We should be able to "add to list" on items that are inside of an item that is contained in a list on the app state. The application should handle the addition of items to nested lists seamlessly, whether the lists are initially empty or not. Unmodifiable list should not occur on flutterflow.

Steps to Reproduce

**1. Create a New FlutterFlow App

  1. Create three data types. Set one field on dataType1 to be a list of dataType2 items. And one field on dataType2 to be a list of dataType3 items.
  2. Create an app state persisted variable that is a list of dataType1 items.
  3. Create a simple UI that allows you to add dataType1 to that app state list.
  4. Create a simple UI that allows you to add dataType2 items to the field that is an empty list of dataType2 items on that dataType1 you added.
  5. Observe the error.
  6. See that if you implement a "clear value" action to that dataType2 empty list, it will let you add them.**

Reproducible from Blank

Bug Report Code (Required)

IT4OiMjc35N1m8tK+KrubO9VhiMsJj8la6xMkep+VUgbGIPNGu4MPsneVFRuZrzgdEFUO2KZgmYfxvfqjoXiUfknEAqeRpxGz5FyFA7zQnmmaJSsDZa7fW1QTNxnI0iG15iZrBBBNtRfcUYb3V7zJumsfAPYJITHDWsFQ/2bKdeK2SrDX1iXc2URm05KZDPz

Visual documentation

app.flutterflow.io-1718239623311.log

image

Environment

- FlutterFlow version: v4.1.59+
- Platform: Web, iOS
- Browser name and version: Chrome 125.0.6422.142
- Operating system and version affected: macOS, iOS (last versions)

Additional Information

We need help urgently, as we have to deliver the app to a client on Monday and this bug makes it useless. Please help 😭

arniigreat1 commented 3 weeks ago

I have this exact issue. This used to work with no problem till today

Please fix soon as I will be launching soon as well

juandiegor16 commented 3 weeks ago

Since yesterday we have the same problem using "Add to list" in lists of custom data types

jamesInspeqt commented 3 weeks ago

Having the same issue. This is crucial for the app to work. Need a fix ASAP! Otherwise please provide a way to download the previous version of Flutterflow Mac app.

msusviela commented 3 weeks ago

Hi @Javicg10. I wasn't able to reproduce the issue with the steps you provided. Could you provide us more information on how to replicate steps 4 and 5? It'll be very useful for us to pointout the issue

If any of you have more information on how to replicate this issue, please, let me know so we can start fixing this asap

Javicg10 commented 3 weeks ago

Hi @msusviela, thanks for your attention.

I am going to reproduce those steps using a practical example:

I created a simple recipe with ingredients app and recorded a video so you can easly see the bug we are all suffering:

https://github.com/FlutterFlow/flutterflow-issues/assets/123978797/bc95eca1-ca73-4a9f-8591-c13f1a959006

joaoEscribo commented 3 weeks ago

image

the recent update went from referencing the actual property, to referencing the getter, and you can't modify a getter.

ready4sea commented 3 weeks ago

Encountered the same issue. Had a chat with support which asked me to create a bug report. I see it's been created, great. This is a very problematic issue. In the meantime, we have published our app to the stores and our users are encountering issues : "Unhandled Exception: Unsupported operation: Cannot add to an unmodifiable list".

As stated above, I tracked it down to the fact that the getter has been referenced instead of the property. That missing underscore is wreaking havoc. An urgent fix on code generation is needed.

@leighajarett

msusviela commented 3 weeks ago

Thank you all for the responses. I've verified this and sent to the ENG team so they can work on a fix for this

jamesInspeqt commented 2 weeks ago

Do you know when the fix will be released? The same issue persists in the .60 release ..

ready4sea commented 2 weeks ago

Starting to get some negative reviews in the stores because the app does not work. Any update on the ETA ?

jamesInspeqt commented 2 weeks ago

Starting to get some negative reviews in the stores because the app does not work. Any update on the ETA ?

This is getting ridiculous. They advertise with "develop 10x faster", but with stupid bugs like these, the development stops and even hurts your business. Please fix this ASAP!!

ready4sea commented 2 weeks ago
image

What I find difficult to admit is that I chatted with support, signalling the bug on the evening of Wed, June 12th. That's but a few hours after the release of the latest version, and it stated "URGENT" in the title. It took 2 days for this bug report to be actually assigned to engineering. And it's been another 3 days since, with code generation still broken. This issue requires a hotfix.

I wish FF had a process where is a user reports an URGENT breaking change, it wouldn't take days to be taken into account and the engineering team would be focused on restoring functionality ASAP.

ready4sea commented 2 weeks ago

6th day starting... @leighajarett we need an update here !

aliumutergin commented 2 weeks ago

this is a serious bug. Please fix it

Coopertron1 commented 2 weeks ago

I am having the same issue as you guys. Luckily I haven't deployed to app stores yet...though I have deployed to web which is causing problems for web users.

Javicg10 commented 2 weeks ago

I already commented it on the initial post, but I'll say it again in case it could be useful to someone.

As a provisional solution for our app what we have done is to add an Update App State action of "clear value" on the created list to which we can't add items, right after creating it. This way the list becomes modifiable. It's a bit of a mess but with the time they're taking to fix it, it might be useful for you.

ready4sea commented 2 weeks ago

Thanks for the comment @Javicg10 .

That works if you're just creating the list and adding items to it right there.

But if you're taking up a list that already exists with items in it, and you want to append something, there's the catch. You'd have to recreate a brand new list, add the existing items, add the item you want, and then replace the whole variable. Same goes if you're removing an item to an existing list.

By my (approximate) count, I have more than 800 such calls in my app. I can't go modifying all of them in the UI builder just because of a missing underscore !

leighajarett commented 2 weeks ago

We have a fix out for this in review and hope to have it out in production very soon, thank you so much for your patience!

jamesInspeqt commented 2 weeks ago

Thanks @leighajarett for the update. But what is soon? Today? Tomorrow? In 2 weeks? Our apps depend on this feature and it’s costing us customers every day ..

leighajarett commented 2 weeks ago

Next Tuesday's release - one week from today. It's being pushed into beta today to make sure everything looks okay. I know that's really frustrating, we are putting it into beta because we want to make sure the fix doesn't unintentionally break anything as this was a difficult fix. I'm sorry that it's slowing you down 🙁

ready4sea commented 2 weeks ago

ARE YOU KIDDING ???

leighajarett commented 2 weeks ago

We are trying to see if we can get it out sooner, so sorry 🙁

jamesInspeqt commented 2 weeks ago

Okay can you at least provide us with an install of an older version so that we can generate the code with the older version?? (Macos in my case) @leighajarett

MartinLockheart commented 2 weeks ago

@leighajarett I'm coming here from another bug report I submitted (which has a lot of overlap with this one). I want to say, I appreciate you all getting a fix for this in the pipeline. It's much needed.

That said, I also want to make it clear that my work (like so many others) has been significantly affected by this issue - as well as by other issues that are somewhere in the pipeline (I see tickets open for them, and I hope to see fixes for those soon).

Flutterflow has to be a reliable platform to build on. To me, that is the most critical part of the experience. And while I know you already know this, I just want to voice this clearly.

When Flutterflow is unreliable, many of us lose time - which is difficult enough. But quite a few of us can also lose business as a result. I represent a two person team doing app development, and we can't afford to lose any business (and we certainly can't afford a reputation for being constantly delayed or for building apps that don't work).

When I first started using Flutterflow about a year ago, I was incredibly impressed. I'm still impressed by the overall quality and power of the tools, and the results I've generally gotten with them.

But over the last couple of months, it's been very unreliable. I've spent countless hours creating workarounds to bugs that, to be honest, should never have made it to production. And now, I've spent over a month dealing with issues like this one, which have stalled development on multiple projects (and complicated it significantly in others).

I need Flutterflow to be reliable. Everyone here does.

A few small bugs now and then are fine. Even critical bugs that get fixed quickly are fine and perfectly understandable. It happens! We know how development goes.

But if I have to worry about every new update breaking functionality, or deleting things that my development partner did, or stalling development - why should I use Flutterflow?

I don't know what the solution is from your side of things, and I won't pretend to. I'm sure you have a lot on your plate as well.

But I just wanted to take a moment convey clearly what I think a lot of us are feeling right now.

GamxXamg commented 2 weeks ago

Hello, this is a serious issue, can't update my app now because of this bug, please FF team, resolve it ASAP ! I just noticied it and this has damage for all my users, as i updated without seeing that breaking change !!! It this takes a week to resolve it will be really hard for my business. Can we have an older working version of FF ? We need a hotfix FF team !

Coopertron1 commented 2 weeks ago

@leighajarett can you confirm if the fix you talk about is in the latest update v4.1.61+ (released today)?? I assume it isn't because the bug still seems to exist for me.

stivenrs90 commented 2 weeks ago

I have the exact same issue. Since the recent update, my app, which was previously working perfectly now is completely useless.

I need to get that bug fix as soon as possible to get my app function as it did before the update. I've spent a lot of time working around but it should not work that way.

Coopertron1 commented 2 weeks ago

@AnushaFF I really hope you haven't closed this issue. Our App is still not able to add items to App State (Data Type) nested lists.

aliumutergin commented 2 weeks ago

It still exists. Why it is closed?

MartinLockheart commented 2 weeks ago

@Coopertron1 @aliumutergin I believe I remember reading that they often close issues once the issue is resolved on their side of things (not when it gets pushed live) - which means we should see it next Tuesday.

GamxXamg commented 2 weeks ago

What is the final ETA ?

jamesInspeqt commented 2 weeks ago

Still the same issue ...... @leighajarett @AnushaFF

Why don't you have 2 versions of Flutterflow: One stable that doesn't have the latest bells and whistles and another "beta" one. You can't just give us one option that is also actually a beta version with a bunch of bugs. Just create a public beta version where the community can test out their app's on it first to see if it's stable before actually deploying their apps.

This is really unprofessional and we, the actually paying customers that depend on a stable version are being duped by your policies of just releasing one version!

GamxXamg commented 2 weeks ago

Still the same issue ...... @leighajarett @AnushaFF

Why don't you have 2 versions of Flutterflow: One stable that doesn't have the latest bells and whistles and another "beta" one. You can't just give us one option that is also actually a beta version with a bunch of bugs. Just create a public beta version where the community can test out their app's on it first to see if it's stable before actually deploying their apps.

This is really unprofessional and we, the actually paying customers that depend on a stable version are being duped by your policies of just releasing one version!

Being able to rollback to older version of FF desktop is much needed, everyone would save time and would be less stressed.

jamesInspeqt commented 2 weeks ago

Still the same issue ...... @leighajarett @AnushaFF Why don't you have 2 versions of Flutterflow: One stable that doesn't have the latest bells and whistles and another "beta" one. You can't just give us one option that is also actually a beta version with a bunch of bugs. Just create a public beta version where the community can test out their app's on it first to see if it's stable before actually deploying their apps. This is really unprofessional and we, the actually paying customers that depend on a stable version are being duped by your policies of just releasing one version!

Being able to rollback to older version of FF desktop is much needed, everyone would save time and would be less stressed.

Well I guess lesson learned. Not going to update anymore unless im 100% sure there are no relevant or breaking bugs.

ready4sea commented 2 weeks ago

Well I guess lesson learned. Not going to update anymore unless im 100% sure there are no relevant or breaking bugs.

Except you don't have a choice. You can't continue using FF if you don't update to the latest version, whether web or desktop.

While we wait, I have been thinking about how FF could solve this issue and I reached the same conclusion as you and others. FlutterFlow needs to have two live versions in parallel. Perhaps I wouldn't call it a public beta, but rather the latest production update and the stable older release. The latter should be available at least for 2 weeks after each new release. Developers need to be able to pick which version they are building their app against.

As a constructive example, my own situation perhaps illustrates this necessity : I had released a version of my app that had a somewhat important bug (my bad). I had finally resolved it and was about to publish the app when, boom! here comes the mandatory update. So here we go, and I suddenly have errors popping up on the feature I was correcting. I spent about 6 additional hours pinpointing the issue and implementing a workaround. Then, at 2am my time, I finally managed to build a version that solved my own bug. So there I launch the deployment to the stores. Little did I realize that, in doing so, all other areas of my app impacted by the FF regression would break, whereas they had worked flawlessly before.

To drive my point home : in this situation, I definitely need to build on the FF version I had been using up to that point (now the older, stable version). And then, and only then, should I be able to choose to use the more recent version when starting a new cycle of my own. Do you think this could be prioritized in your roadmap, @leighajarett ?

stivenrs90 commented 2 weeks ago

The issue still in the same. When is this going to be fixed?, or definitely they closed the case and I have to work around to make it work.

leighajarett commented 2 weeks ago

Hi there - we are working as hard as we can to get this in as soon as possible. I understand where you're all coming from and am very soon for the frustration this has caused. We are trying to get the fix out ASAP

leighajarett commented 2 weeks ago

As for being able to use different versions, I totally hear you and this is a top priority for us, but we will definitely consider this feedback and see if there is an opportunity to deliver this earlier

ND0X commented 2 weeks ago

When will they solve this? :(

ready4sea commented 1 week ago

Third week underway. Let's hope if will also be the final week. Waiting, waiting, waiting...

leighajarett commented 1 week ago

This should be fixed in tomorrow mornings release

ready4sea commented 1 week ago

Fingers crossed. Eagerly waiting after having had to cancel a communications campaign due to the disaster.

jamesInspeqt commented 1 week ago

So is it fixed in the last update?