firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

[Bug] DllNotFoundException: Unable to load DLL 'FirebaseCppApp-11_8_1'

Open vanxet opened this issue 1 year ago • 1 comments

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!

vanxet avatar Apr 09 '24 10:04 vanxet

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Apr 09 '24 10:04 google-oss-bot

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.

paulinon avatar Apr 12 '24 11:04 paulinon

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

vanxet avatar Apr 15 '24 03:04 vanxet

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!

argzdev avatar May 07 '24 18:05 argzdev

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!

vanxet avatar May 08 '24 07:05 vanxet