firebase-unity-sdk
firebase-unity-sdk copied to clipboard
[Bug] System.DllNotFoundException : FirebaseCppApp-9_2_0 assembly:<unknown assembly> type:<unknown type> member:(null)
[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.3.4f1
- Firebase Unity SDK version: 9.2.0
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: FirebaseApp
- Other Firebase Components in use: Auth, Database, RemoteConfig, Crashlytics, pretty much all of them
- Additional SDKs you are using: AppsFlyer, AppLovinMax
- Platform you are using the Unity editor on: Linux
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
- Pre-built SDK from the website
[REQUIRED] Please describe the issue here:
When running playtests that use the Firebase SDK through CICD with game.ci, I get the following issue:
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 'SWIGExceptionHelper' threw an exception.
----> System.DllNotFoundException : FirebaseCppApp-9_2_0 assembly:<unknown assembly> type:<unknown type> member:(null)
The server runs Unity in a docker container on Ubuntu 22.04. My development machine has Ubuntu 22.04 as well and I don't have this problem.
I've seen existing issues where this was happening on MacOS, but they seem to be resolved.
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:
Same issue on Firebase 9.4 and docker image editor-ubuntu-2021.3.7f1-android-1.0.1 from game-ci. I get this error on test-runner, the build step succeeds (after disabling test-runner), and it works on target device.
Happening to us too, I really hope this gets fixed soon. Tests are a vital part of our feedback loop, and because of this issue about half our tests are failing, similar to @dginovker's scenario. Same firebase version.
Happening to us as well. Please fix ASAP.
Running Ubuntu 18.04 linux, with unity editor 2021 latest.
Our project that works fine on Windows, and OSX editors.. fails during our unit testing when it tries to construct FirebaseApp or any firebase type.. like Firebase Analytics .. new Parameter(..)
Hi folks,
Does this only occurs ONLY when you run a desktop test on a Ubuntu docker container? We do have nightly test on Ubuntu and did not see this kind of issue.
Could you elaborate a bit about how you configure your Unity project and run it through docker container?
It would be best if you guide us step by step to reproduce this issue.
Thank you!
This occurs for me in both a docker container, and a clean linux ubuntu desktop install.
Unlike ipilip, it works for us on a Ubuntu (and Pop!_OS) desktop install (edit: Although I'm running the Editor too. Sounds like ipilip is running the tests via docker on a desktop install).
Anyways to answer @chkuang-g - We run the tests via Docker with GameCI's test runner. It's great for having Github actions run tests: https://game.ci/docs/github/test-runner
I'm getting this error as well, building on 2021.3.7f1 Apple M1 to an Android 12 device.
I'm getting this error as well, building on 2021.3.7f1 Apple M1 to an Android 12 device.
Which Firebase version are you using? There was a bug in an older Firebase version that affected MacOS but it was fixed
I'm getting this error on MacOS while using Unity 2021.3.7f1, issue emerged after importing analytics x86_64 plugins
Hi folks,
Sorry I am not very familiar with game.ci.
I assume that this test-runner run your code on a Ubuntu machine, which means it is running Firebase desktop implementation.
- Does it run Unity with
-batchmode
or-executeMethod
? - From the error message, it looks like
Firebase.App.dll
was presented BUTFirebaseCppApp-9_2_0.so
was not or disabled. How did you setup your Unity project before deploying to the docker image?
BTW, @chadrockey mentioned this potential solution here https://github.com/firebase/firebase-unity-sdk/issues/232#issuecomment-1220180129, but @dev-cmurphy mentioned that it did not work for them with game.ci.
I am wondering if this solution work for any of you here.
We managed the solved this issue. In our case, it's caused by MacOS gatekeeper permissions. Issue resolved after we allow permission for firebase dlls. If you don't see permission prompt in gatekeeper, simply delete existing dlls then reimport package again. After unity runs for first time, gatekeeper asks for permissions again.
Hey @dginovker. 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!
DllNotFoundException: FirebaseCppApp-10_0_1 assembly:
DllNotFoundException: FirebaseCppApp-10_0_1 assembly:<unknown assembly> type:<unknown 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:3916)
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:3936)
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:4646)
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:1897)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
Pluto.LiteGame.Firebase.FirebaseInit.Awake () (at Assets/Scripts/Firebase/FirebaseInit.cs:27)
UnityEngine.Object:Instantiate(GameObject, Transform)
<InitDelayPrefabs>d__46:MoveNext() (at Assets/Scripts/UI/Common/AZ_GameInitLoading.cs:258)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
Why? Switch to Android Platform. Running in editor mode! Why use Android instance in Editor mode?
(CodeMasterYi provided an additional report of this in #506)
@CodeMasterYi Can you clarify whether your setup is similar to some of the other reports and whether or not any of the above workarounds work for you?
Specifically
- Is this issue occuring when using a docker container?
- does the workaround from https://github.com/firebase/firebase-unity-sdk/issues/232#issuecomment-1220180129 work for you? (installing libsecret on the device)
- Are MacOS Gatekeeper permissions relevant as mentioned in https://github.com/firebase/firebase-unity-sdk/issues/449#issuecomment-1278619869?
Why I open this issue https://github.com/firebase/firebase-unity-sdk/issues/506 :
My answer for your specifically asking questions is all No
.
I do not use a docker container. I use it on my mac directly.
I installed libsecret via brew install libsecret
and then reopen my UnityHub and Unity Editor. Not working.
About gatekeeper, I ever config it to allow apps from any source.
So I think my question maybe caused by another issue, then I create a new issue.
Hey @dginovker. 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!
Since there haven't been any recent updates here, I am going to close this issue.
@dginovker if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.