Help with "lists"

Im getting this error: Bad arguments to add items to list
The operations add items to list cannot accept the arguments: , [empty-string], [test]

I wanted to do a followers list. When you click follow button, username added to list and stored in firebase, then displayed in list view with retrieved info from firebase.

my blocks:

blocks (8)
blocks (7)

According to error, you must set

Initialise global followerList to create empty list

But unfortunately you’ve added

Initialise global followerList to empty text box

no, i initialized followerList as a empty list.

when exactly do you get the error?
as you can see from the error message yourself, the list is not a list but an empty string


1 Like

when i clicked button. that “main_follow” button.

Kindly click Do it on there two blocks in companion mode and test it. You will find the solution then,

1 Like

what is the first string? is it list or something another?


Most probably you set global followerList to an empty string and not an empty list

1 Like

blocks (6)

Maybe in another place in your code you set it to an empty string or set it to get something that is is an empty string

1 Like

i dont think so. i didnt do any mistake in blocks. i cant find bug.

If you share us your full block then it could be easy for us to point out

these blocks that i only used lists. but if you want:

I hope this part only may be giving you problem… If the tinyDb found no value for the tag username then empty string only will be try to added to the list. instead of empty string try to use create empty list if possible and try or use if statement

that username tag is will never be empty. it stores username from first screen (login)

Yeah i know it, but now you are checking in companion so pls make sure whether it is having value or not, just to confirm your error. Because you have no where did mistake it seems.

i exported apk too. same problem. i dont know where is problem

If you have no problem can you share a demo aia, i mean only the problematic screen here or in pm as a aia

okay, im sharing.

i cant message to you
can you message me?