Don't call Firebase functions before CheckDependencies has finished
See original GitHub issue09-07 10:59:28.508 12117-12176/? E/Unity: InvalidOperationException: Don’t call Firebase functions before CheckDependencies has finished at Firebase.FirebaseApp.ThrowIfCheckDependenciesRunning () [0x00000] in <filename unknown>:0 at Firebase.FirebaseApp.GetInstance (System.String name) [0x00000] in <filename unknown>:0 at Firebase.FirebaseApp.get_DefaultInstance () [0x00000] in <filename unknown>:0 at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in <filename unknown>:0 at Manager.FirebaseManager.FirebaseAuthPlayGames () [0x00000] in <filename unknown>:0 at Manager.FirebaseManager.<Initilization>m__1 (Boolean success) [0x00000] in <filename unknown>:0 at GooglePlayGames.PlayGamesPlatform+<Authenticate>c__AnonStorey1.<>m__0 (Boolean success, System.String msg) [0x00000] in <filename unknown>:0 at GooglePlayGames.Native.NativeClient+<InvokeCallbackOnGameThread>c__AnonStorey1`2[System.Boolean,System.String].<>m__0 () [0x00000] in <filename unknown>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
I have the same problem today and fixed with the next steps, my app uses Firebase Analitycs and Firebase Auth, from the quick start guide on each example the devs call this method
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {})
ok… this is correct if you have only one part of Firebase running in you project, but in my case, im using two parts, so from Auth, i delete the duplicated call to Firebase.FirebaseApp.CheckAndFixDependenciesAsync() and just calling it in the Analitycs script.
Then when firebase ends it’s configuration on the Analitycs script, i call my Auth script but just the function InitializeFirebaseAuth.
And that fix it for me, maybe it will help you.
thanks @kaozgaia! also solved my case 😃