firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
234 stars 38 forks source link

[Bug] Value is unexpectedly null when fetching children using Realtime Database #830

Closed unnanego closed 1 year ago

unnanego commented 1 year ago

I have a simple entry in the database with 3 children - root, "Coupons", "test" with value "vvvv". When I call GetValueAsync() on the root reference, I get the correct responce, but calling any child e.g. _db.Child("Coupons") or lower always returns null. Nothing else is going on except I disable Persistence, otherwise most of the time it returns the data that I removed from the database.

        var task = _db.Child("Сoupons").Child("ttt").Child("test").GetValueAsync();
        // var task = _db.GetValueAsync();

        await UniTask.WaitUntil(() => task.IsCompleted);

        if (task.IsFaulted)
        {
            return "Faulted";
        }

        if (task.IsCanceled)
        {
            return "Cancelled";
        }

        return task.Result.ToString();

If I do ToString on the result, it sees the keys, but value is always null.

AlmostMatt commented 1 year ago

Can you share a bit more of the relevant code or the context for what you are doing?

google-oss-bot commented 1 year ago

Hey @unnanego. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 1 year ago

Since there haven't been any recent updates here, I am going to close this issue.

@unnanego if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

unnanego commented 1 year ago

Weirdly, the only notification that I got in the mail is that the issue is closed( I wrote my own API for that, so I'm not able to test it anymore, if I ever have to use Firebase again (I hope not) and the issue persists, I will come back to it, thank you for the answer.