Closed tdelahayeEnsicaen closed 2 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @tdelahayeEnsicaen,
I was able to observe this behavior in the sample project you provided, and I also noticed that it makes use of the AR Foundation and AR Core SDKs. Could you confirm if the behavior persists with only the Firebase SDK in the project? It would be great if you could provide a more minimal, reproducible example of your implementation as this can be used as a baseline for troubleshooting.
Hello, thank you for your reply
I have created a minimal example to reproduce the bug. I also removed AR Core and AR Foundation.
HI @tdelahayeEnsicaen,
I was able to encounter the issue with the minimal example you provided. The result of the read task isn't typically stored in a variable. I've modified the function so that the app will no longer freeze:
CollectionReference anchorsRef = db.Collection("anchors");
anchorsRef.GetSnapshotAsync().ContinueWithOnMainThread(task =>
{
QuerySnapshot snapshot = task.Result;
var history = new List<List<string>>();
foreach (var document in snapshot)
{
var entry = new List<string>();
entry.Add(document.Id);
entry.Add(document.GetValue<string>("id"));
entry.Add(document.GetValue<string>("time"));
history.Add(entry);
}
});
Let me know if this works for your use case.
Yes, that solves my problem, thank you very much!
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
When called, the "GetSnapshotAsync()" function does not terminate and no error is displayed
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? What's the issue repro rate? (eg 100%, 1/5 etc)
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.
Build and run the app on an android phone
Click on "Begin Resolving"
The app will freeze because "GetSnapshotAsync()" never return
Relevant Code:
https://ensicaenfr-my.sharepoint.com/:u:/g/personal/tom_delahaye_ecole_ensicaen_fr/EU0tk3d6xRVAsp-D7sY0igIBNofJw1l0K616ey8ZVzbEgg?e=DVwYkL