“FirebaseError: Previous value was empty.”
The value is a list and is not empty… why do i always get this error?
The Append block do not work like that?
“FirebaseError: Previous value was empty.”
The value is a list and is not empty… why do i always get this error?
The Append block do not work like that?
Tenho o mesmo problema e nao consigo resolver.
También tengo el mismo problema alguien que nos ayude por favor
I was facing the same problem and was able to verify that the error “Previous value was empty.” It jumps only on the first try, when you try to add the value to the list for the first time, if you try it a second time, it does the process smoothly.
My solution to handle the error, with the firebase error block, condition it by saying that if the message is = a Previous value was empty. that it perform the process of adding value again and in that second attempt the value will be added without problems.
Cheers
I hope I make myself understand well, and this solution will help you … sorry for the English, I use the google translate
Hi @storkgdev, This suggestion may work
Step - 1 Creating a Realtime Database
Go to firebase console create a new project and add a new Realtime Database
Remember to change the rules, given below
{ "rules": { ".read": true, ".write": true } }
Remember to Publish the changes.
This will help to get and write the Data
Step 2 - Connect your Firebase to your App
On the Firebase Database at the Data,
Copy the URL,
Go to Kodular and Paste it on Firebase URL
On the Firebase project left panel,
You have a Setting Icon,
Press on it and menu popups,
Press on Project Settings,
You would be redirected to a new page,
Copy your Web API,
Go to Kodular paste it in the firebase token.
Step - 3 Blocks
Set your Blocks as the following
These blocks means that
When the Screen starts the firebase gets the value of a specific tag and if the value is not there it will create an empty list.
After the Firebase gets the value it checks the tag, if its the correct tag then it will check its value, if the value is create empty list which means that there is not value it will store an empty list
Now when button is clicked it will append the value as already the value has been stored thus previous value empty error will not appear.
This will help you,