Description
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.3.1f1
- Firebase Unity SDK version: 8.9.0
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: Auth
- Other Firebase Components in use: none
- Additional SDKs you are using: none
- Platform you are using the Unity editor on: Mac / MacBookAir (2017, Intel Core i5)
- Platform you are targeting: desktop
- Scripting Runtime: Mono
[REQUIRED] Please describe the issue here:
After importing the FireBaseAuth package into a new Unity project and initializing it with
auth = FirebaseAuth.DefaultInstance
My issue is that when entering play mode I get an error as follows:
DllNotFoundException: FirebaseCppApp-8_9_0 assembly: type: member:(null)
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:117)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:137)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/AppUtil.cs:64)
Firebase.LogUtil..ctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/LogUtil.cs:81)
Firebase.LogUtil..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/LogUtil.cs:37)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/FirebaseApp.cs:67)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
AuthManager.Awake () (at Assets/Scripts/AuthManager.cs:34)
Around line 34 which the exception points to I'm executing following code (line 34 in detail is "FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task =>"):
private void Awake() { FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { dependencyStatus = task.Result; if (dependencyStatus == DependencyStatus.Available) { //If availabel initialize FireBase InitializeFirebase(); } else { Debug.LogError("Couldn't resolve all Firebase dependencies: " + dependencyStatus); } }); }
At first it may look like it's the same issue as firebase/firebase-unity-sdk#278 , but as far as I've read the issue there was specifically for Apple Silicon (M1) and Intel seemed to work just fine (according to most of the descriptions in that thread)
Additionally I don't get a popup about an untrusted developer for FirebaseCppApp-8_9_0.bundle as it normally should be the case, unless I try to open it manually with the Terminal or Console through Finder.
Steps to reproduce:
I've also tried it out for the quickstart-unity/auth/testapp project and also when entering play-mode I get following error-message in the console:
DllNotFoundException: FirebaseCppApp-8_9_0 assembly: type: member:(null)
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:117)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:137)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/AppUtil.cs:64)
Firebase.LogUtil..ctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/LogUtil.cs:81)
Firebase.LogUtil..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/LogUtil.cs:37)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at Z:/tmp/tmp.GOobKx5vLv/firebase/app/client/unity/proxy/FirebaseApp.cs:67)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
Firebase.Sample.Auth.UIHandler.Start () (at Assets/Firebase/Sample/Auth/UIHandler.cs:80)
Additionally the message on the game-screen puts out:
One or more firebase dependencies are not present.
Current dependency status: UnavailableOther
I've also tried out a different FirebaseAuth version (8.8.0) but still getting the same error.