firebase / firebase/firebase-unity-sdk
DllNotFoundException: FirebaseCppApp-11_2_0 assembly:<unknown assembly> type:<unknown type> member:(null)
- Dominant language
- C#
- Stars
- 320
- Forks
- 60
- Avg merge
- 13h 32m
- Merged PRs (30d)
- 13
Description
### [READ] For Firebase Unity SDK issues, please report to [Firebase Unity open-source](https://github.com/firebase/firebase-unity-sdk/issues/new/choose)
Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.
### [REQUIRED] Please fill in the following fields:
* Unity editor version: 2021.3.22f1
* Firebase Unity SDK version: 11.2.0
* Source you installed the SDK: auth (.unitypackage or Unity Package Manager)
* Problematic Firebase Component: _____ (Auth, Database, etc.)
* Other Firebase Components in use: _____ (Auth, Database, etc.)
* Additional SDKs you are using: empty project (Facebook, AdMob, etc.)
* Platform you are using the Unity editor on: Linux and Mac (Mac, Windows, or Linux)
* Platform you are targeting: desktop (iOS, Android, and/or desktop)
* Scripting Runtime: Mono (Mono, and/or IL2CPP)
### [REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
I get this error when I call any firebase functions in a project.
DllNotFoundException: FirebaseCppApp-11_2_0 assembly: 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:4087)
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:4107)
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:4817)
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:2014)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
Firebase.Sample.Auth.UIHandler.Start () (at Assets/Firebase/Sample/Auth/UIHandler.cs:80)
#### 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:
```
// TODO(you): code here to reproduce the problem
```
https://github.com/firebase/quickstart-unity/issues/1130
It seems that the compatibility of the Unity-SDK package cannot be maintained. In a Windows environment, it works fine.
Contributor guide
Research direction
Begin by reproducing the Firebase Unity quickstart Auth sample at Assets/Firebase/Sample/Auth/UIHandler.cs:80 on Linux and macOS. Trace initialization through app/src/LogUtil.cs and the generated Firebase.App_fixed.cs, then compare the DllNotFoundException with the referenced quickstart issue. Done means a confirmed diagnosis and a reproducible fix or documented platform limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, linux, macos, unity
- Domain
- desktop-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100