Firebase Error: "Previous value was empty"

I wanted to ask for your help with this problem that has been presenting me several times while generating the apk in the inventor app 2

many times it works without problem but there are days or weeks where the same code generates the error "Previous value was empty" when try use firebase

then it can be solved without me doing anything it just works again,
I summarize my error in a synthetic model where it also occurs, in addition to throwing the error, the app closes me

I already checked that the FirebaseToken and FirebaseURL were fine and they are but even so it throws the problem to me very frequently

I want to know what can I do?

sorry for my english...errorfirebasebd1

My guess would be that the error arises when there is no element to remove, therefore FirebaseDB1.RemoveFirst cannot do anything. If possible check if there are any elements in listacontactos before trying to RemoveFirst.

Kind regards, if indeed there are items in the list if there are elements, also when it is for an empty list the error is different when the list is empty it shows: The list was empty. but the error I have is another "Previuos value was empty". In addition to that. that same code works for me on some occasions and then on other compilations No. It is very strange I do not move anything and it works and then I want to compile again and it throws me that error

I had the same problem.
After days of debugging, I discovered that the error was only trigered if the item in the first element of the list (wich I tried to append to), had an " " (space) on it.
I also observed that if you try to retrieve from database a sentence or string that contains spaces, only the first word was retrieved, and the rest after the first space was missing.
I don't know if there is a smarter solution than forcing to edit the text before writing to database, to replace the spaces by something else.
I hope this helps you.

You might have a clue that something is wrong if (when on the FireBase console) the content of the tag is long and appears to go far to the right, outside the screen. May be you have no way to delete the tag, because it doesn`t display the "x" to delete on the rignt.
In that case, the same thing happens with " " (spaces) and "-" (dashes).