I am currently creating a firebase realtime database transaction in unity c# and keep getting this error:
[Error log]
[conn_7] Error control message: ClientId[6528662]:ErrorId[8]: Error on incoming message
UnityEngine.Debug:LogError (object)
Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseLogger.cs:95)
Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:69)
Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:77)
Firebase.AppUtil:PollCallbacks () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:4604)
Firebase.Platform.FirebaseAppUtils:PollCallbacks () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/FirebaseAppUtils.cs:33)
Firebase.Platform.FirebaseHandler:Update () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseHandler.cs:208)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/platform/Unity/FirebaseMonoBehaviour.cs:45)
Source Code:
public void SendjointPoints()
{
if (!TransactionComplete)
{
Debug.Log("not finished Transaction. skip a frame.");
return;
}
TransactionComplete = false;
DatabaseReference reference = FirebaseDatabase.DefaultInstance.GetReference("jointPoints");
Debug.Log("Running Transaction...");
reference.RunTransaction(SendTransaction)
.ContinueWithOnMainThread(task => {
if (task.Exception != null)
{
TransactionComplete = true;
Debug.Log(task.Exception.ToString());
}
else if (task.IsCompleted)
{
TransactionComplete = true;
Debug.Log("Transaction complete.");
}
});
}
This error freezes Unity. any more transaction is not working until Unity Stop. My code wants 1~2 transaction per a second.
Any idea why this is happening?
My code is trying to navigate through the various levels of mutabledata I got from my database reference.
- Unity version 2021.3.5f1
- Building for Android and Window
- IDE: Microsoft Visual Studio
- firebase_unity_sdk_9.4.0 (dotnet4 : FirebaseDatabase.unitypackage)