[Bug] Error when running after building with Firebase 8.10.1
See original GitHub issue[REQUIRED] Please fill in the following fields:
- Unity editor version: 2021.2.8f1
- Firebase Unity SDK version: 8.10.1
- Source you installed the SDK: .unitypackage
- Problematic Firebase Component: Crashlytics
- Other Firebase Components in use: Analytics,Auth,FireStore,Installations,Functions,Storage
- Additional SDKs you are using: Facebook, AdMob
- Platform you are using the Unity editor on: Mac(M1)
- Platform you are targeting: Android
- Scripting Runtime: IL2CPP
[REQUIRED] Please describe the issue here:
I was using Firebase 8.9.0 well before. I updated it after 8.10.0 came out and it went without any problems, but some developers had problems with python in the editor, so I updated it to 8.10.1. The python-related problem disappeared in the editor, but the following error occurred when running after build.
field_ids[i] || (field.optional == kMethodOptional)
Firebase.Crashlytics.CrashlyticsInternalPINVOKE:FirebaseCrashlyticsInternal_GetInstance__SWIG_0(HandleRef, Int32&)
Firebase.Crashlytics.FirebaseCrashlyticsInternal:GetInstance(FirebaseApp, InitResult&)
Firebase.Crashlytics.AndroidImpl:.ctor()
Firebase.Crashlytics.Impl:Make()
Firebase.Crashlytics.PlatformAccessor:.cctor()
Firebase.Crashlytics.Crashlytics:Initialize()
System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
Firebase.FirebaseApp:InitializeCrashlyticsIfPresent()
Firebase.FirebaseApp:CreateAndTrack(CreateDelegate, FirebaseApp)
JH.<>c:<PreLoadFirebase>b__208_1(Boolean, DependencyStatus)
Firebase.Extensions.<>c__DisplayClass4_1`1:<ContinueWithOnMainThread>b__1()
Firebase.<>c__DisplayClass5_0`1:<RunAsync>b__0()
Firebase.ExceptionAggregator:Wrap(Action)
Firebase.Dispatcher:PollJobs()
Firebase.Platform.FirebaseHandler:Update()
ApplicationException: Unable to find Field com/google/firebase/crashlytics/FirebaseCrashlytics.core (signature 'Lcom/google/firebase/crashlytics/internal/common/CrashlyticsCore;', instance). Please verify the AAR which contains the com/google/firebase/crashlytics/FirebaseCrashlytics class is included in your app.
Firebase.Crashlytics.FirebaseCrashlyticsInternal.GetInstance (Firebase.FirebaseApp app, Firebase.InitResult& init_result_out) (at <00000000000000000000000000000000>:0)
Firebase.Crashlytics.AndroidImpl..ctor () (at <00000000000000000000000000000000>:0)
Firebase.Crashlytics.Impl.Make () (at <00000000000000000000000000000000>:0)
Firebase.Crashlytics.Crashlytics+PlatformAccessor..cctor () (at <00000000000000000000000000000000>:0)
Firebase.Crashlytics.Crashlytics.Initialize () (at <00000000000000000000000000000000>:0)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp.InitializeCrashlyticsIfPresent () (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) (at <00000000000000000000000000000000>:0)
JH.FirebaseManager+<>c.<PreLoadFirebase>b__208_1 (System.Boolean success, Firebase.DependencyStatus depStatus) (at <00000000000000000000000000000000>:0)
Firebase.Extensions.TaskExtension+<>c__DisplayClass4_1`1[T].<ContinueWithOnMainThread>b__1 () (at <00000000000000000000000000000000>:0)
Firebase.Dispatcher+<>c__DisplayClass5_0`1[TResult].<RunAsync>b__0 () (at <00000000000000000000000000000000>:0)
Firebase.ExceptionAggregator.Wrap (System.Action action) (at <00000000000000000000000000000000>:0)
Firebase.Dispatcher.PollJobs () (at <00000000000000000000000000000000>:0)
Firebase.Platform.FirebaseHandler.Update () (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.Crashlytics.Crashlytics.PlatformAccessor' threw an exception.
Firebase.Crashlytics.Crashlytics.Initialize () (at <00000000000000000000000000000000>:0)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp.InitializeCrashlyticsIfPresent () (at <00000000000000000000000000000000>:0)
Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) (at <00000000000000000000000000000000>:0)
JH.FirebaseManager+<>c.<PreLoadFirebase>b__208_1 (System.Boolean success, Firebase.DependencyStatus depStatus) (at <00000000000000000000000000000000>:0)
Firebase.Extensions.TaskExtension+<>c__DisplayClass4_1`1[T].<ContinueWithOnMainThread>b__1 () (at <00000000000000000000000000000000>:0)
Firebase.Dispatcher+<>c__DisplayClass5_0`1[TResult].<RunAsync>b__0 () (at <00000000000000000000000000000000>:0)
Firebase.ExceptionAggregator.Wrap (System.Action action) (at <00000000000000000000000000000000>:0)
Firebase.Dispatcher.PollJobs () (at <00000000000000000000000000000000>:0)
Firebase.Platform.FirebaseHandler.Update () (at <00000000000000000000000000000000>:0)
Scene.<Start>d__11:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Link that came up with a similar issue when I searched it, but it is different from the current version. I was wondering if there is a way to temporarily solve this issue in the current state.
Steps to reproduce:
Import and install Firebase Unity 8.10.1 and build for Android. An error log occurs with a 100% probability when running after build.
I didn’t have time to go ahead with the QuickStart project.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How can I fix "Failed to compile src/index.js 'firebase' is not ...
Every time I run "npm run start", I get this error message. Failed to compile src/index.js Line 25:1: 'firebase' is not defined no-undef...
Read more >Build failed after Firebase Analytics added - Invalid bitcode ...
I added Firebase Analytics to the game and now I can build it in xcode. I get an error: could not reparse object...
Read more >Firebase JavaScript SDK Release Notes - Google
This fixes a bug introduced in 9.17.0 that prevented some bundlers and frameworks from building. For these build failures, the error text is:...
Read more >Firebase related error in Expo Snack. Anyone experience ...
A client of mine reached out and said her snack wasn't working. The snack was built using version 43.0 which has since been...
Read more >Refactor a React app with the new Firebase v9.x Web SDK
Code written in Firebase v8.x will throw errors when used in v9.x, which calls for refactoring. In this article, we'll learn how to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright, for a workaround you can add the following to your custom proguard-user.txt file:
Ah, so the problem seems to be when enabling minification, it is not preserving the Android library symbols correctly. We will see if we can get this fixed, and find a workaround in the meantime.