firebase / firebase-unity-sdk

The Firebase SDK for Unity
http://firebase.google.com
Apache License 2.0
234 stars 38 forks source link

DllNotFoundException: FirebaseCppApp-11_2_0 assembly:<unknown assembly> type:<unknown type> member:(null) #793

Open yuji-10473 opened 1 year ago

yuji-10473 commented 1 year ago

[READ] For Firebase Unity SDK issues, please report to Firebase Unity open-source

Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

I get this error when I call any firebase functions in a project.

DllNotFoundException: FirebaseCppApp-11_2_0 assembly: type: member:(null) Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:4087) Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. Firebase.AppUtilPINVOKE..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:4107) Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception. Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:4817) Firebase.LogUtil..ctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:81) Firebase.LogUtil..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:37) Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception. Firebase.FirebaseApp..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/android_unity/armeabi-v7a/app/swig/Firebase.App_fixed.cs:2014) 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)

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? What's the issue repro rate? (eg 100%, 1/5 etc) 100%

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.

Relevant Code:

// TODO(you): code here to reproduce the problem

https://github.com/firebase/quickstart-unity/issues/1130 It seems that the compatibility of the Unity-SDK package cannot be maintained. In a Windows environment, it works fine.

juzdepeche commented 1 year ago

I have the same error on Mac Big Sur

paulinon commented 1 year ago

Hi folks,

Thanks for bringing this to our attention. I have a few questions about your implementation:

yuji-10473 commented 1 year ago

Hi folks,

Thanks for bringing this to our attention. I have a few questions about your implementation:

Thank you for reply.

  • Does the error message appear in both the editor and the app build?

We have confirmed that the same error occurs in the Unity Editor and Linux executable apps.

  • Does the issue persist when using the quickstart project?

quickstart I'm trying to clone this.

  • Could you verify if a FirebaseCppApp-x_x_x.bundle file exists in your Firebase/Plugins/x86_64 folder?

It cannot be imported because it is not checked when importing the package.

  • Could you try if reimporting the SDK made any difference?

I've tried re-importing several times, but nothing changes.

I think that this problem is caused by trying to apply a compatibility check that is not necessary for the execution environment, but is it correct?

paulinon commented 1 year ago

Hi @yuji-10473,

Are you importing the SDK as a .unitypackage file? If so, could you try clicking All when importing the SDK and see if it makes a difference? This ensures all files in the SDK are included in the import.

fardeen-khan17 commented 1 year ago

Hi @paulinon, Yes, all the files were properly imported but still facing the same issue on Mac.

fardeen-khan17 commented 1 year ago

I resolved this Issue on Mac by simply Going to the Folder

  1. Assets>Firebase>Plugins>x86_64
  2. Right-click on the FirebaseCppApp-11_2_0.bundle and select open with vs-code
  3. Select Open anyway on the prompt message. Once the file is opened in vs-code you can simply run the unity editor and it will work.
yuji-10473 commented 1 year ago

Screenshot from 2023-07-16 06-31-11 Screenshot from 2023-07-16 06-30-24

It looks like the attached image. The file exists, but I get the same error when running it.

paulinon commented 1 year ago

Thanks for the additional information, @yuji-10473. I haven't reproduced the behavior you're facing so far, but I'd like to get to the bottom of this. That said, could you try if @fardeen-khan17's solution made any difference in your implementation? Additionally, could you specify the macOS version you're using? It's possible that an OS update could resolve the issue.

chkuang-g commented 1 year ago

If what @fardeen-khan17 recommended resolves your issue, this seems to be due to macOS blocking untrusted libraries. This issue seems to be reoccurring whenever there is a new macOS release, which is quite annoying.

Alternatively, check your Privacy & Security system settings and see if there is any notification there about blocking libraries. If so, allow those Firebase libraries.

Please let us know if that is the case. If so, we should probably change this into a task like macOS blocking untrusted Firebase libraries.

SabeeenoGH commented 1 year ago

Hi, i have the same issue on Android Studio. DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_2_0'. Tried the load the following dynamic libraries: Unable to load dynamic library 'FirebaseCppApp-11_2_0' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "FirebaseCppApp-11_2_0" not found at Firebase.AppUtilPINVOKE+SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_AppUtil (Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate applicationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate arithmeticDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate divideByZeroDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate indexOutOfRangeDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidCastDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidOperationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate ioDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+E

On my Editor it runs without problems. I have done the Force Resolve of Android too. Screenshot 2023-07-19 alle 18 00 46

I have imported all of FirebaseStorage.unitypackage and tried more and more times to clear and re-import the package.

Any help? thanks :)

google-oss-bot commented 1 year ago

Hey @yuji-10473. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

yuji-10473 commented 1 year ago

As yet, the problem is not resolved. I will provide any necessary information. However, I believe that this problem is caused by unnecessary compatibility checks when running in the Unity Editor.

rekcah1986 commented 1 year ago

Error: System.TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE.SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_3_0'. Tried the load the following dynamic libraries: Unable to load dynamic library 'FirebaseCppApp-11_3_0' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "FirebaseCppApp-11_3_0" not found at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.<Login>b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.<Login>b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtilPINVOKE+SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_AppUtil (Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate applicationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate arithmeticDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate divideByZeroDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate indexOutOfRangeDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidCastDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidOperationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate ioDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate nullReferenceDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate outOfMemoryDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate overflowDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate systemExceptionDelegate) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtilPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0 --- End of inner exception stack trace --- at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtilPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0 --- End of inner exception stack trace --- at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0 --- End of inner exception stack trace --- at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.<Login>b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.<Login>b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0 --- End of inner exception stack trace --- at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.FirebaseAuth (System.String authCode) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown ---

at DJ.GooglePlayGamesSDKPlatform.b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <00000000000000000000000000000000>:0 --- End of stack trace from previous location where exception was thrown ---

at DJ.GooglePlayGamesSDKPlatform.b0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <00000000000000000000000000000000>:0 at DJ.GooglePlayGamesSDKPlatform.b__0_1 (System.String code) [0x00000] in <00000000000000000000000000000000>:0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b7_0 (System.Object state) [0x00000] in <00000000000000000000000000000000>:0

AlmostMatt commented 1 year ago

@rekcah1986, @yuji-10473, @SabeenoGH, @juzdepeche

Can any of you confirm whether or not the workaround suggested by fardeen-khan17 is effective in your case?

Specifically, attempt to open Assets/Firebase/Plugins/x86_64/FirebaseCppApp-11_3_0.bundle using a random program like VS code, and see if any permission errors popup and if so attempt to resolve them.

On Mac this is typically a prompt like "FirebaseCppApp.bundle” cannot be opened because it is from an unidentified developer." When that happens you can click "Ok", and then go to your Mac's Security Settings to find an entry like "FirebaseCppApp.bundle” was blocked from use because it is not from an identified developer." and you can click "Open Anyway" and the next time you attempt to open the bundle you should have an "Open" option instead of just ok/cancel.

lishun001 commented 1 year ago

I have the same problem. OS:macOS Big Sur

DllNotFoundException: FirebaseCppApp-10_4_0 Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4072) Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. Firebase.AppUtilPINVOKE..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4092) Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception. Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:4802) Firebase.LogUtil..ctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:81) Firebase.LogUtil..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/app/src/LogUtil.cs:37) Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception. Firebase.FirebaseApp..cctor () (at /Users/runner/work/firebase-unity-sdk/firebase-unity-sdk/macos_unity/x86_64/app/swig/Firebase.App_fixed.cs:2014) Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.

SatoruNiinuma commented 1 year ago

I was having the same problem with Big Sur on my Mac, but after upgrading to Ventura, it went away. FYI.

yuji-10473 commented 1 year ago

@AlmostMatt

My environment is not MAC, so I don't get a warning. It is possible to open the file in VS Code. We are aware of the issues that occur with MACs. I believe that the problems that occur on Linux are occurring separately.

SabeeenoGH commented 1 year ago

@AlmostMatt In my case it is not an error related to Mac permissions. However, I have given up on using Firebase on Unity for now. If I pick it up again later I will let you know.

Antonio-Gorisek commented 1 year ago

I had this error for ANDROID and I fix it (I haven't tested it for iOS jet) DllNotFoundException: FirebaseCppApp-11_2_0 assembly: It was actually very simple for me.

1) The Firebase and ExternalDependencyManager folders must be located in the Asset folder; you should not move them elsewhere.

2) Delete the Firebase and ExternalDependencyManager folders and then install each Firebase SDK asset you need.

3) Run Force resolve. Screenshot_84

LightGameStudio42 commented 1 year ago

Same on Windows

TahaHassan672 commented 1 year ago

For me the project runs fine on editor and android but on iOS my build is made but only a black screen is shown. The output of the build is the same as the error you guys are facing. I can provide details if anyone knows how to deal with this kindly help

Uploading Crash Report DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_3_0'. Tried the load the following dynamic libraries: Unable to load dynamic library '/FirebaseCppApp-11_3_0' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen(/FirebaseCppApp-11_3_0, 0x0005): tried: '/FirebaseCppApp-11_3_0' (no such file), '/private/preboot/Cryptexes/OS/FirebaseCppApp-11_3_0' (no such file), '/FirebaseCppApp-11_3_0' (no such file) at Firebase.AppUtilPINVOKE+SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_AppUtil (Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate applicationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate arithmeticDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate divideByZeroDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate indexOutOfRangeDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidCastDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate invalidOperationDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate ioDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate nullReferenceDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate outOfMemoryDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate overflowDelegate, Firebase.AppUtilPINVOKE+SWIGExceptionHelper+ExceptionDelegate systemExceptionDelegate) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtilPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging+Listener..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging+Listener.Create () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging..cctor () [0x00000] in <00000000000000000000000000000000>:0 at FirebaseMessaging.OnEnable () [0x00000] in <00000000000000000000000000000000>:0 Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE.SWIGExceptionHelper' threw an exception. at Firebase.AppUtilPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.LogUtil..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.FirebaseApp..cctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging+Listener..ctor () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging+Listener.Create () [0x00000] in <00000000000000000000000000000000>:0 at Firebase.Messaging.FirebaseMessaging..cctor () [0x00000] in <00000000000000000000000000000000>:0 at FirebaseMessaging.OnEnable () [0x00000] in <00000000000000000000000000000000>:0

wjnovember commented 1 year ago

In Windows, I ran into this issue as well. I tried to open the bundle with VS-Code as did on a mac, but the issue still persisted. My colleague also uses Windows, but he doesn't have this problem. image

TomaszBlaszczyk commented 1 year ago

I got the same error on 11.5.0 version and I've upgraded to 11.6.0. Then I got the system warning "Cannot open 'FirebaseCppApp-11_6_0.bundle'; the application is from an unidentified developer." and this tutorial was the solution: https://www.youtube.com/watch?v=0AyHEyGx1-g

komldh07 commented 1 year ago

I have found a solution. Follow these steps -

  1. Remove Firebase and external library folder from Assets.
  2. Import again.
  3. Run Unity, you will get popup of unidentified developer. And you have only two options in popup so you can select to move to bin.
  4. Then in system preferences -> Allow bundle.
  5. Open Bin and drag and drop deleted bundle which is "FirebaseCppApp-11_6_0.bundle" to Assets in Unity.
  6. Make sure settings allow that bundle.
  7. Run Unity and BOOM...It will run project successfully!
ROBOKOP1000000 commented 1 year ago

не помогло

a-bers commented 12 months ago

FirebaseCppApp 11 uses function getTimeZone in icu.dll (according Dependency Walker), that is missing on OS prior windows10. Copying icu.dll into folder with FirebaseCppApp-11.#.#.dll resolved the problem

AnPK193 commented 12 months ago

FYI, I got the same issue on BigSur OS. The bug was gone after I updated the OS to Sonoma version 14.1.2

dhtpdud commented 10 months ago

I used Windows and solved it with this.
https://github.com/firebase/firebase-unity-sdk/issues/443#issuecomment-1231976123

jimrogerz commented 7 months ago

In my case (MacOS, running in Editor), reinstalling then going to System Settings->Privacy & Security and allowing the dll, and then clicking "Open" next time I ran it fixed the issue.

StrozhDima commented 5 months ago

For Windows 10 64 bit download icu.dll 64 bit form dll-files.com. copy it to C:\Windows\System32 and C:\Windows\SysWOW64 throught PowerShell (copy command). in PowerShell go to C:\Windows\System32 and run "regsvr32 icu.dll". check result in app Dependencies v.1.11.1.0 (open DLL)