Open lmt385 opened 1 month ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hey @lmt385, thanks for reaching out. I'm trying to test your scenario using our quickstart repo but it seems to work just fine. I'm testing with version Firebase Realtime Database 11.9.0
and Unity Editor 2022.3.24f1
. That said, could you answer the following:
persistent_connection.cc
". Are you saying after adding ValueChanged
callback, the error is already triggered?Thanks in advance!
Hello,
The error triggers upon the callback being registered, yes.
I'll see what I can do in terms of providing a MCVE.
Edit: While digging deeper, it doesn't seem to be triggering upon the listeners being registered, but at a later point related to the initial callbacks when calling GetValueAsync.
The general flow is:
OnValueChanged
callbacks assigned, followed by 7 more once those are finishedValueChanged
callbacks in turn call a method that uses GetValueAsync
for a child reference, if the value returned by the callback meets a condition
a. So, it goes: ValueChanged Callback associated with reference.Child("attribute")
-> Callback checks if condition is met -> Method that calls await reference.Child("setting").GetValueAsync()
GetValueAsync
is triggering the persistent_connection.cc
error if present in this flow. When commented out, the code executes without issue. GetValueAsync
does not cause an error if it is not associated with the callback.
Description
When setting up or triggering ValueChanged callbacks for a DatabaseReference, errors are being thrown by the SDK in Unity Editor. These errors only occur to our Mac machines, Windows machines and Android devices are unaffected.
The ValueChanged callbacks can be triggered, but they can then cause the same error that occurred when setting up the listener.
Originally observed this on Firebase version 10.7, upgraded to 11.9.0 and issue is still present.
Reproducing the issue
persistent_connection.cc
Firebase Unity SDK Version
11.9.0
Unity editor version
2022.3.23f1
Installation Method
.unitypackage
Problematic Firebase Component(s)
Database
Other Firebase Component(s) in use
Analytics, Authentication, Storage
Additional SDKs you are using
Azure Speech, AWS
Targeted Platform(s)
Android
Unity editor platform
Mac
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
If using CocoaPods for Apple platforms, the project's Podfile.lock
Expand
Podfile.lock
snippet```yml 👀 Replace this line with the contents of your Podfile.lock! ```