App crashing when appending items to list stored in variable

There are a number of potential issues:

  1. There is a known bug that the open event occurs twice. Check out my post on a workaround. If two processes (the two open events) try to modify a variable, that can cause a crash
  2. Switching screens and app/stored variables, especially in Live Test, can behave in unexpected ways. I see your app declares workingstocklist with an empty list. That SHOULD ensure it is a list value, but if you testing session or users experience doesn’t start with the List Viewer Screen, that variable may not be set. Add a check for a null value before you try to perform list operations
  3. Finally, I strongly recommend having the app update a label so you can see where in the logic it is landing. Thunkable is a perpetual beta application, so fundamental operations (like list handling) can and do change in startling ways. Building robust debugging is essential.

Having said all of that, here is how I would try to test your app working around all of these issues:

Notice that the actual changs to APP workling list are contained in false blocks. Once you verify with the label that the proper logic is in fact occuring, change the false values to true and remove the label changes.

Happy Thunking!

1 Like