Firebase Realtime Database Query Not Completing

57 Views Asked by At

I'm back to a project after not working on it for four months. Everything used to work fine before. The project uses Firebase Authentication, and that part seems okay. But now, there's a problem when trying to get data from the Firebase Realtime Database.

Here's the code causing trouble:

Query databaseQuery = Database.RootReference.Child(AppSettings.Version).Child("versions").OrderByChild("version").StartAt(currentVersion);
databaseQuery.GetValueAsync().ContinueWithOnMainThread(task =>
{
    if (task.IsFaulted)
    {
        Debug.LogError("Error: " + task.Exception);
    }
    else if (task.IsCompleted)
    {
        Debug.Log("Query completed successfully");
        // More code to handle the result
    }
});

I've tried to figure out the issue but can't. The function isn't doing anything – no errors, no completion, no messages. I've double-checked Firebase logging and it's set to debug. The project uses Firebase SDK 10.6 and Unity3D version 2022.1.18f.

I also looked at the Firebase database security roles, and they seem fine. I haven't changed anything. I even tried a different query with another path, but it's still not working.

Is there something new with Google Firebase that might be causing this? Any help would be appreciated.

0

There are 0 best solutions below