Skip to content

[Bug] Persistent connection error thrown when using Unity 2022 on Mac #1023

Open
@lmt385

Description

@lmt385

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

  1. DatabaseReference is obtained for a particular node in the Firebase Realtime Database
  2. A ValueChanged callback is added to the DatabaseReference object
  3. Error is triggered referencing persistent_connection.cc
  4. If a corresponding value is changed in the Firebase Realtime Database, the callback is triggered and so is the error. The callback is executed successfully.

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

/Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/firebase-cpp-sdk/database/src/desktop/connection/persistent_connection.cc(367): listens_.find(query_spec) == listens_.end()
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:4869)
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)

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions