[Bug] Firebase for Unity v10.0.1 Cannot run on Android Platform in Editor Mode!
See original GitHub issue[REQUIRED] Please fill in the following fields:
- Unity editor version: Unity2021.3.11f1
- Firebase Unity SDK version: v10.0.1
- Source you installed the SDK: .unitypackage (.unitypackage or Unity Package Manager)
- Problematic Firebase Component: AppCore (Auth, Database, etc.)
- Other Firebase Components in use: Crashlytics,Analytics (Auth, Database, etc.)
- Additional SDKs you are using: Facebook,Applovin Max (Facebook, AdMob, etc.)
- Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
- Platform you are targeting: Android (iOS, Android, and/or desktop)
- Scripting Runtime: Mono (Mono, and/or IL2CPP)
- Pre-built SDK from the website or open-source from this repo: Pre-built SDK
[REQUIRED] Please describe the issue here:
When run in editor mode with switched to Android Platform, FirebaseApp
cannot be construct staticly!
See the following log:
DllNotFoundException: FirebaseCppApp-10_0_1 assembly: type: member:(null)
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)
In the log, we can find firebase-unity-sdk/android_unity/armeabi-v7a/app/swig
, it is an android implement? why you use android implement in Editor mode? why not use an eiditor implement?
Due to this issue, I cannot use FirebaseApp
anytime in Editor mode with Android Platform.
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
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)
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
Issue Analytics
- State:
- Created a year ago
- Comments:14 (3 by maintainers)
Top GitHub Comments
Reopening because as mentioned in https://github.com/firebase/firebase-unity-sdk/issues/449#issuecomment-1297966811, the other issue #449 mentioned docker containers or other context that does not apply here, so this is potentially a separate issue.
Since there haven’t been any recent updates here, I am going to close this issue.
@CodeMasterYi 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.