Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_4_0' #466

Closed
SteliosDaVitzi opened this issue Sep 10, 2019 · 16 comments
Closed

Comments

@SteliosDaVitzi
Copy link

Please fill in the following fields:

Unity editor version: 2019.1.8
Firebase Unity SDK version: 6.4.0
Firebase plugins in use (Auth, Database, etc.):Analytics,DeepLinks
Additional SDKs you are using (Facebook, AdMob, etc.): GooglePlayServices, Facebook, Appodeal, Game Analytics, AppsFlyer, UTNotifications.
Platform you are using the Unity editor on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Android

Please describe the issue here:

We build for arm 64 architecture.All working fine.
We build the game for arm 7 architecture.
One of the first logs appearing is
DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_4_0': The specified module could not be found.
09-10 16:32:28.275 19551 19607 E Unity : at Firebase.AppUtilPINVOKE.FirebaseApp_DefaultName_get () [0x00000] in <00000000000000000000000000000000>:0
09-10 16:32:28.275 19551 19607 E Unity : at Firebase.FirebaseApp.get_DefaultName () [0x00000] in <00000000000000000000000000000000>:0
09-10 16:32:28.275 19551 19607 E Unity : at Firebase.FirebaseApp.get_DefaultInstance () [0x00000] in <00000000000000000000000000000000>:0
09-10 16:32:28.275 19551 19607 E Unity : at Firebase.DynamicLinks.DynamicLinks..cctor () [0x00000] in <00000000000000000000000000000000>:0
09-10 16:32:28.275 19551 19607 E Unity : at WildWestSaga.DeepLinksHandler.OnDestroy () [0x00000] in <00000000000000000000000000000000>:0
09-10 16:32:28.275 19551 19607 E Unity : Rethrow as TypeInitializationException: The type initializer for 'Firebase.DynamicLinks.DynamicLinks' threw an exception.
09-10 16:32:28.275 19551 19607 E Unity : at WildWestSaga.DeepLinksHandler.OnDestroy () [0x00000] in <00000000000000000000000000000000>:0

Please answer the following, if applicable:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Have not tried.

@SteliosDaVitzi SteliosDaVitzi added the new New issue. label Sep 10, 2019
@tonyjoseph456
Copy link

Same issue is happening for me too.
E Unity : Unable to find FirebaseCppApp-6_4_0 E Unity : DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_4_0': The specified module could not be found. E Unity : 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,

@AliEnver
Copy link

AliEnver commented Sep 11, 2019

Same issue is happening 6.3.0 version.
32bit apk build is working. 64bit version is not working.

@muflub muflub added type: bug and removed new New issue. labels Sep 11, 2019
@muflub
Copy link

muflub commented Sep 11, 2019

Hi SteliosDaVitzi, thanks for the bug report. Just to confirm the problem platform you are having the problem with is arm64-v8a? Looking at the Firebase 6.4.0 package it looks like all the files are there and are built for the correct platform. I will look into this a little more to try and work out what is going on.

@SteliosDaVitzi
Copy link
Author

SteliosDaVitzi commented Sep 11, 2019

Hi!Thanks for the answer.We have the problem when building for arm7.Arm64 works fine.The dll that seems to be missing, exists within the files in unity editor (arm64 works fine with them), but for some reason arm7 can't see it.

@muflub
Copy link

muflub commented Sep 11, 2019

Have you tried running the android resolver as outlined in this other issue about the same problem: #362

@SteliosDaVitzi
Copy link
Author

SteliosDaVitzi commented Sep 12, 2019

Yes, I've already done three resolves until now(with different combinations of sdks), every time the error is the same.

@acoale
Copy link

acoale commented Sep 12, 2019

I had the same issue I was running my app on 2018 unity with 5.4.4 Firebase, I went to upgrade Firebase and Unity to the same mentioned versions above and got this error. FYI I did double check and the DLLs were present in the files and the settings for them all seemed correct, but the error was still there.
I reverted back to my old version and am now having permission denied issues with the database. I assume it has something to do with attempting to access the database with the newer version previously? I don't know exactly. Reverting back DID, in fact, remove the .dll error.

@tonyjoseph456
Copy link

Initially I was having issues with the 32 bit as well as 64 bit builds. After a little bit of hard work (removing all plugins including firebase, play service resolver etc) and, deleting library and unwanted project folders and copying the jar and aar files from this project to my project), now the 32 bit build is working fine. But the 64 bit is not working.

Currently I'm using Unity 2019.2.5f1 and using 32 bit ARM architecture.

@SteliosDaVitzi
Copy link
Author

Hi!Is there any news or progress about the issue?

@SteliosDaVitzi
Copy link
Author

SteliosDaVitzi commented Sep 17, 2019

When i complete the arm64 build,i open the apk with 7zip, and inside lib/arm64-v8a/ there is like this
Screenshot_1

but when i build for arm7 and open the .apk, the files inside lib/armeabi-v7a/ are like this
Screenshot_2

Clearly Unity does not build the firebase dll(s) when it comes to arm7.Why is that?Is it a Unity problem or a Firebase problem?

@SteliosDaVitzi
Copy link
Author

SteliosDaVitzi commented Sep 17, 2019

Fixed it!After poking around a bunch of files, i found that the files "com.google.firebase.firebase-analytics-unity-6.4.0.aar", "com.google.firebase.firebase-app-unity-6.4.0.aar" and "com.google.firebase.firebase-dynamic-links-unity-6.4.0.aar" didn't include the libraries for arm7.After some tries,i figured out that i had to check both arm7 and arm64 in project settings, and then do a force resolve.Now all working fine.

@AliEnver
Copy link

@SteliosDaVitzi thank you. All working fine.

@acoale
Copy link

acoale commented Sep 17, 2019

I was going to try this, I updated to 2019.2.5 and Firebase 6.5. But no longer was getting the error. Perhaps it was fixed for 6.5 release.

@muflub
Copy link

muflub commented Sep 17, 2019

@SteliosDaVitzi im glad you found a fix for the issue. I tested creating a new project in unity and importing the Firebase Sdk's you mentioned and have all the correct files for arm7 after running the Play Services resolver in force mode.

I ran the standard resolve menu option first and it did say that every thing was good but the apk was missing the files like you had above. I had to run the force resolve menu option and it found a issue with my setup and after fixing that had all the required files.

@tonyjoseph456
Copy link

@markchandler-google @stewartmiles Earlier in my project I was having this issue with the firebase auth and it was fixed in firebase sdk 6.5.0. Now I'm using 6.5.0. Today I need to add the firebase messaging to my project and this issue started again, with the following log:

09-19 18:44:28.833 27399 27426 E Unity : DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_5_0': The specified module could not be found. 09-19 18:44:28.833 27399 27426 E Unity : at Firebase.AppUtilPINVOKE.GetEnabledAppCallbackByName (System.String jarg1) [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.833 27399 27426 E Unity : at Firebase.AppUtil.GetEnabledAppCallbackByName (System.String arg0) [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.833 27399 27426 E Unity : at Firebase.FirebaseApp.InitializeAppUtilCallbacks () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.833 27399 27426 E Unity : at Firebase.FirebaseApp.CheckDependenciesAsync () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.833 27399 27426 E Unity : at Firebase.FirebaseApp.CheckAndFixDependenciesAsync () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.833 27399 27426 E Unity : at Firebase.Sample.Messaging.FCMUIHandler.Start () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.833 27399 27426 E Unity : 09-19 18:44:28.833 27399 27426 E Unity : (Filename: currently not available on il2cpp Line: -1) 09-19 18:44:28.833 27399 27426 E Unity : 09-19 18:44:28.849 27399 27430 E Unity : DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_5_0': The specified module could not be found. 09-19 18:44:28.849 27399 27430 E Unity : at Firebase.AppUtilPINVOKE.SetLogFunction (Firebase.LogUtil LogMessageDelegate jarg1) [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.849 27399 27430 E Unity : at Firebase.AppUtil.SetLogFunction (Firebase.LogUtil LogMessageDelegate arg0) [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.849 27399 27430 E Unity : at Firebase.LogUtil.Finalize () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.849 27399 27430 E Unity : System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs) 09-19 18:44:28.849 27399 27430 E Unity : 09-19 18:44:28.849 27399 27430 E Unity : (Filename: currently not available on il2cpp Line: -1) 09-19 18:44:28.849 27399 27430 E Unity : 09-19 18:44:28.854 27399 27426 E Unity : DllNotFoundException: Unable to load DLL 'FirebaseCppApp-6_5_0': The specified module could not be found. 09-19 18:44:28.854 27399 27426 E Unity : at Firebase.AppUtilPINVOKE.PollCallbacks () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.854 27399 27426 E Unity : at Firebase.AppUtil.PollCallbacks () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.854 27399 27426 E Unity : at Firebase.Platform.FirebaseHandler.Update () [0x00000] in <00000000000000000000000000000000>:0 09-19 18:44:28.854 27399 27426 E Unity : 09-19 18:44:28.854 27399 27426 E Unity : (Filename: currently not available on il2cpp Line: -1)

Can you please suggest me a solution for this issue? I need to add firebase authentication and firebase cloud messaging to my app.

@SteliosDaVitzi I did extracted the apk and found that the lib/arm64-v8a/ and lib/armeabi-v7a/ has the same files in the below screenshot:
Screenshot 2019-09-19 at 6 54 38 PM

So I dont know why this issue is happening to me again. I have force resolved using play services resolver. still I'm having issue now after adding firebase messaging to the project. Any help from anyone is appreciated.

Thanks in advance.

@SteliosDaVitzi
Copy link
Author

Hi @tonyjoseph456 !Did you force resolve having the project settings as below? When i did my settings were checked arm7, checked arm64, scripting runtime and api compatibility set to .NET 4.x , and scripting backend to IL2CPP.

@firebase firebase locked and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants