I'm using Firebase's realtime database in my Unity project and I ran into a very odd behavior. I'm reading data like this:
_database.GetReference("test").GetValueAsync().ContinueWith(task => {
if (task.IsFaulted) {
Debug.Log("Fetch error");
} else if (task.IsCompleted) {
Debug.Log("Reading data");
DataSnapshot snapshot = task.Result;
if (snapshot.HasChildren) {
foreach (var user in snapshot.Children) {
Debug.Log(user.Key);
}
}
}
});
I have my browser open in the Firebase console looking at the data. At first I noticed if I deleted a few fields it was still returning them in my query. So I went ahead and delete all entries to have an empty database, and it's STILL reading the deleted data. What gives? My internet connection is solid, and it's pointing to the right database.