[Bug] DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_8_1'
Description
I get error when run app on Android with Firebase Analytics version 11.8.1
Reproducing the issue
No response
Firebase Unity SDK Version
11.8.1
Unity editor version
2023.1.3f1
Installation Method
.unitypackage
Problematic Firebase Component(s)
Analytics
Other Firebase Component(s) in use
No response
Additional SDKs you are using
AVPro Video trial version Web3Auth SDK
Targeted Platform(s)
Android
Unity editor platform
Windows
Scripting Runtime
IL2CPP
Release Distribution Type
Pre-built SDK from https://firebase.google.com/download/unity
Relevant Log Output
DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_8_1'. Tried the load the following dynamic libraries: Unable to load dynamic library 'FirebaseCppApp-11_8_1' because of 'Failed to open the requested dynamic library (0x06000000) dlerror() = dlopen failed: library "FirebaseCppApp-11_8_1" not found
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) (at <00000000000000000000000000000000>:0)
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at <00000000000000000000000000000000>:0)
Firebase.AppUtilPINVOKE..cctor () (at <00000000000000000000000000000000>:0)
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at <00000000000000000000000000000000>:0)
Firebase.LogUtil..ctor () (at <00000000000000000000000000000000>:0)
Firebase.LogUtil..cctor () (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp..cctor () (at <00000000000000000000000000000000>:0)
TrackingHelper.Start () (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE.SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at <00000000000000000000000000000000>:0)
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at <00000000000000000000000000000000>:0)
Firebase.LogUtil..ctor () (at <00000000000000000000000000000000>:0)
Firebase.LogUtil..cctor () (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp..cctor () (at <00000000000000000000000000000000>:0)
TrackingHelper.Start () (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at <00000000000000000000000000000000>:0)
Firebase.LogUtil..ctor () (at <00000000000000000000000000000000>:0)
Firebase.LogUtil..cctor () (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp..cctor () (at <00000000000000000000000000000000>:0)
TrackingHelper.Start () (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at <00000000000000000000000000000000>:0)
TrackingHelper.Start () (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
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!
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @vanxet,
Could you confirm if going to Assets > External Dependency Manager > Android Resolver > Force Resolve makes any difference? You could also try reimporting the SDK and see if resolves the issue.
Hi @paulinon , I have Force Resolve but still error I think it conflict with other sdk (web3auth or avpro), so I try remove and reimport them but result have a lot of bug build
Hey @vanxet, I'd recommend trying to isolate the conflict by testing this on a separate project and importing Firebase dependency first and then the other dependencies, until you hit the conflict. Could you also provide me a copy of your manifest.json (this is located under your Packages folder) so I can try this out myself? Thanks!
Hi @argzdev , currently I'm no longer working on Firebase-related features. If I need do it again in the future, I'll try your approach Thank!