question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] DllNotFoundException in editor on Windows

See original GitHub issue

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.6f1
  • Firebase Unity SDK version: 9.4.0, 9.3.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Crashlytics
  • Other Firebase Components in use:
  • Additional SDKs you are using:
  • Platform you are using the Unity editor on: Windows 10 Pro 21H2 CPU: AMD Ryzen 7 5700G
  • Platform you are targeting: Android and desktop
  • Scripting Runtime: Mono (Editor)
  • Pre-built SDK from the website or open-source from this repo: website

[REQUIRED] Please describe the issue here:

One of the developers in my team got this exception as soon as the first access to firebase happens

DllNotFoundException: FirebaseCppApp-9_4_0 assembly:<unknown assembly> type:<unknown type> member:(null)
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at <e453f444a42d4ceeaaeeea32bbd6030c>:0)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at <e453f444a42d4ceeaaeeea32bbd6030c>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at <e453f444a42d4ceeaaeeea32bbd6030c>:0)
Firebase.LogUtil..ctor () (at <e453f444a42d4ceeaaeeea32bbd6030c>:0)
Firebase.LogUtil..cctor () (at <e453f444a42d4ceeaaeeea32bbd6030c>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at <e453f444a42d4ceeaaeeea32bbd6030c>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
CrashTest.Awake () (at Assets/CrashTest.cs:11)

This happens only on one machine. on other computers, everything works fine, without any problems. We have also tried version 9.3.0, but got the same error. previously we had version 8.8.0 and had no exceptions.

Steps to reproduce:

Here minimal repro of this problem: TestCrashlytics it has nothing special but it reproduces the error on that machine Steps used to reproduce the issue:

  1. Clone the repo;
  2. Import project into Unity for the Android platform;
  3. Import Firebase Crashlytics SDK into the project;
  4. Add package id;
  5. Add google-services.json into the project;
  6. Open SampleScene;
  7. Hit Play

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
VolodymyrBScommented, Aug 30, 2022

HI @paulinon

We found the issue. On that single machine was installed C++ Redistributable 2005, 2010, 2012, 2013, 2017 but not newer. Installing C++ Redistributable 2015-2022 fixed the issue.

So I’m closing this issue. Thanks for your help!

0reactions
google-oss-botcommented, Aug 29, 2022

Hey @VolodymyrBS. 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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

DllNotFoundException
When it executes in the Editor, I get the following: Plugins: Failed to load 'Assets/Plugins/x64/ObjLoad.dll' with error 'The specified module ...
Read more >
dll - DLLNotFoundException - Unity3D Plugin
I'm getting a DLLNotFoundException in standalone builds on some windows machines, others work perfectly. Dll file is definitely in the plugins ...
Read more >
DllNotFoundException Class (System)
The DllNotFoundException is thrown when a dynamic link library defined by the System.Runtime.InteropServices.DllImportAttribute attribute or a comparable ...
Read more >
DllNotFoundException: OculusPlugin - Meta Community Forums
After digging around I found a solution to the problem. I had to add the "OculusPlugin.DLL" to the Unity "editor" folder. Strange but...
Read more >
Workaround for System.DllNotFoundException bug - I'm Stuck
Open up Assets/ARDK/Configuration/ArdkGlobalConfig.cs · Change line 39 from impl = new _NativeArdkConfig(); to impl = new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found