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

[Question] DllNotFoundException: FirebaseCppApp on the editor #1222

Closed
metamoru00 opened this issue Jan 19, 2022 · 10 comments
Closed

[Question] DllNotFoundException: FirebaseCppApp on the editor #1222

metamoru00 opened this issue Jan 19, 2022 · 10 comments

Comments

@metamoru00
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.4.31f1
  • Firebase Unity SDK version: 8.7.0
  • Source you installed the SDK: .unitypackage (.unitypackage or Unity Package Manager)
  • Problematic Firebase Component: messaging (Auth, Database, etc.)
  • Other Firebase Components in use: _____ (Auth, Database, etc.)
  • Additional SDKs you are using: _____ (Facebook, AdMob, etc.)
  • Platform you are using the Unity editor on: Mac High Sierra 10.13.6 (Mac, Windows, or Linux)
  • Platform you are targeting: Android and iOS (iOS, Android, and/or desktop)
  • Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)

[REQUIRED] Please describe the question here:

I am not good at English, so I have described it in google translate.

Hello.
I installed firebase, but the error cannot be resolved.

Steps to reproduce:
Import dotnet4's FirebaseMessaging.unitypackage into Firebase Unity quickstarts.
When I play UnityEditor, DllNotFoundException: FirebaseCppApp-8_7_0 is displayed on the console.

Assets / Firebase / Plugins / x86_64 has FirebaseCppApp.bundle, FirebaseCppApp.dll, FirebaseCppApp.so, but I get a DllNotFoundException.

Plugin placement:
スクリーンショット 2022-01-19 19 48 33

ImportSetting:
スクリーンショット 2022-01-19 19 53 56

ErrorLog:

DllNotFoundException: FirebaseCppApp-8_7_0
Firebase.AppUtilPINVOKE SWIGExceptionHelper..cctor () (at Z:/tmp/tmp.uX3mTvNLXM/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:117)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at Z:/tmp/tmp.uX3mTvNLXM/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:137)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil LogMessageDelegate arg0) (at Z:/tmp/tmp.uX3mTvNLXM/firebase/app/client/unity/proxy/AppUtil.cs:64)
Firebase.LogUtil..ctor () (at Z:/tmp/tmp.uX3mTvNLXM/firebase/app/client/unity/proxy/LogUtil.cs:81)
Firebase.LogUtil..cctor () (at Z:/tmp/tmp.uX3mTvNLXM/firebase/app/client/unity/proxy/LogUtil.cs:37)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at Z:/tmp/tmp.uX3mTvNLXM/firebase/app/client/unity/proxy/FirebaseApp.cs:67)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
Firebase.Sample.Messaging.UIHandler.Start () (at Assets/Firebase/Sample/Messaging/UIHandler.cs:65)

I removed the library and re-imported FirebaseMessaging.unitypackage and still got the same error.
Versions 8.3.0 and 8.4.0 did not get a DllNotFoundException, but from version 8.5.0 I got this error.
Do I need to make any other settings?

Many thanks for any help

@paulinon
Copy link
Contributor

Hi @metamoru00,

Thanks for reporting this. I'd like you to try going to your Mac’s System Preferences > Security & Privacy then Click Allow Anyway. It should look something like this:

Screen Shot 2022-01-12 at 11 08 17 PM

Let me know if this solution worked for you. Otherwise, please provide the complete steps you performed before facing this issue.

@paulinon paulinon added the needs-info Need information for the developer label Jan 19, 2022
@metamoru00
Copy link
Author

Hi @paulinon
Thanks for your answer.
Allow Anyway wasn't showing up in Security & Privacy.

スクリーンショット 2022-01-20 10 25 26

Otherwise, please provide the complete steps you performed before facing this issue.

Here are the steps I took:
Step1: Download quickstart from git
Step2: Open the messaging testapp project in Unity
Step3: Select yes.
スクリーンショット 2022-01-20 11 03 15

Step4: Select to continue
スクリーンショット 2022-01-20 11 06 44

Step5: Change platform to android.
Step6: Import dotnet4's FirebaseMessaging.unitypackage.
Step7: Select disable.
スクリーンショット 2022-01-20 11 40 53

Step8: Play Unity.

DllNotFoundException is displayed by the above procedure.
Do I need to run Android Resolver>Forece Resolve before playing in the editor?

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Jan 20, 2022
@paulinon
Copy link
Contributor

Hi @metamoru00,

Running Force Resolve isn't usually necessary. Could you try this out and see if it makes a difference?

Additionally, are you getting an alert like this when playing the scene?

Screen Shot 2022-01-12 at 11 05 27 PM

If so, click Cancel so that the Allow Anyway can appear.

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Jan 20, 2022
@metamoru00
Copy link
Author

Hi @paulinon
Force Resolve does not change the result.

Additionally, are you getting an alert like this when playing the scene?

I didn't see such an alert when I played the scene.

Apparently, project members other than myself haven't got any errors.
I tried reinstalling Unity because there seems to be a problem with the local environment, but the result did not change.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Jan 20, 2022
@paulinon
Copy link
Contributor

Hi @metamoru00,

When you reinstalled Unity, did you maintain the same version as the one you indicated (2019.4.31f1)? Could you try if updating the editor makes a difference (The latest LTS release is version 2020.3.26f1)?

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Jan 21, 2022
@metamoru00
Copy link
Author

metamoru00 commented Jan 21, 2022

Hi @paulinon

When you reinstalled Unity, did you maintain the same version as the one you indicated (2019.4.31f1)?

Yes. I installed the same version, but the results did not change.
I also installed version 2020.3.26f1 and imported Firebase Messaging in a new Firebase quickstart project, but I got a DllNotFoundException.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Jan 21, 2022
@metamoru00
Copy link
Author

I will try to upgrade MacOS.
High Sierra 10.13.6Big Sur 11.6.2
We will notify you when the update is complete.

@paulinon
Copy link
Contributor

Thanks for the update, @metamoru00. Let me know if the software update makes any difference.

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Jan 24, 2022
@metamoru00
Copy link
Author

Hi @paulinon .

I have a good report.
When I play a scene after upgrading MacOS, the alert I told you before is now displayed.
#1222 (comment)
After clicking Allow Anyway in System Preferences> Security & Privacy, I played the scene again and it worked fine.

I don't know if this bug is specific to High Sierra, but it seems that older OS needs to be upgraded.
I hope this issue helps someone.

Thank you for your help!

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Jan 24, 2022
@paulinon
Copy link
Contributor

That's good to hear, @metamoru00. It's generally recommended that you update your system (in terms of operating system, SDK, editor, etc.) in order to have the latest updates and bug fixes.

I'll be closing this for now. Let me know if the issue arises.

@firebase firebase locked and limited conversation to collaborators Feb 24, 2022
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

3 participants