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.

Unity 2021 Editor crash on startup with 8.5.0 Firebase SDK

See original GitHub issue

A skeleton project set up with Firebase App and Firebase Auth crashes Unity 2021.2 immediately on startup. The relevant error from the Editor.log is thus:

* Assertion at loader.c:345, condition `is_ok (error)' not met, function:mono_field_from_token, Could not resolve field token 0x0400001c, due to: Could not load type of field 'Firebase.Editor.GenerateXmlFromGoogleServicesJson:<>f__mg$cache0' (17) due to: Could not load file or assembly 'Google.JarResolver, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:/Users/mdb/projects/bugs/unity-2021-firebase-files/Library/PackageCache/com.google.firebase.app@25e0485ee6cf-1636337084685/Firebase/Editor/Firebase.Editor.dll type:GenerateXmlFromGoogleServicesJson member:(null)

You can clone this repo: https://github.com/samskivert/unity-2021-firebase-crash and then put the requisite .tgz files from https://developers.google.com/unity/archive into GooglePackages in the top-level directory to repro the crash:

GooglePackages/com.google.external-dependency-manager-1.2.167.tgz
GooglePackages/com.google.firebase.app-8.5.0.tgz
GooglePackages/com.google.firebase.auth-8.5.0.tgz

Notably it does not happen if the Unity SDK is added via the .unitypackage files, so something about installing the SDK via the package manager is tickling the bug.

I have not been able to devise a workaround, so it prevents us from upgrading from Unity 2020 (where it works) to Unity 2021 (where it crashes on startup).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:6

github_iconTop GitHub Comments

3reactions
ewnucommented, Nov 30, 2021

still suffers from this issue in 8.6.2

3reactions
samskivertcommented, Nov 8, 2021

FWIW if you’re just making a cursory examination of the error message Google.JarResolver.dll does exist, at the right location and it is the right version. So I think the or one of its dependencies is the pertinent information here, but Mono helpfully does not tell us what downstream dependency is sticking a fork in things.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does anyone else experience editor crash when using ...
Does anyone else experience editor crash when using Firebase sdk? I keep getting random editor crashes when using Firebase.
Read more >
Firebase Unity SDK Release Notes
Fixed a Unity Editor hang on Windows when restarting an app after listening to a query, document, or snapshots in sync (#845). Fixed...
Read more >
Unity Editor Crash on Firebase Analytics SDK Intregration
Hi, I have Firebase authentication integrated on my project. it works fine until i try to integrate Firebase analytics SDK.
Read more >
Firebase crashes unity iOS app at startup
Using Firebase 3.0.1 Unity SDK and Unity 5.1.1p3 ... However, on iOS once it's built out, the game crashes pretty much when we...
Read more >
Untitled
WebFeb 19, 2021 · How to initialize GA4F (Google Analytics for Firebase) in Unity + iOS. How to create custom events and parameters....
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