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] Firebase 11.1 causing multiple issues

See original GitHub issue

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.14f1
  • Firebase Unity SDK version: 11.1.0
  • Source you installed the SDK: UPM
  • Problematic Firebase Component: Crashlytics, Core
  • Other Firebase Components in use: Auth, Firestore, Storage, Messaging, Installation, Auth, Remote Config, Analytics
  • Additional SDKs you are using: iron-source
  • Platform you are using the Unity editor on: mac, windows and linux
  • Platform you are targeting: iOS and Android
  • Scripting Runtime: IL2CPP
  • Pre-built SDK from the website or open-source from this repo: Website

[REQUIRED] Please describe the issue here:

Since we’d updated the Firebase SDK to 11.0+ we’ve found several issues across our project:

Editor - NOT FIXED

After updating we are occasionally experiencing Editor crashes that are linked to the Firebase SDK. We haven’t been able to specifically identify where, although I’m going to provide some logs as it may be useful:

	Managed Stacktrace:
=================================================================
	  at <unknown> <0xffffffff>
	  at Firebase.Auth.AuthUtilPINVOKE:FirebaseUser_UserId_get <0x000a5>
	  at Firebase.Auth.FirebaseUser:get_UserId <0x0004a>
	  at Pixodust.Firebase.Auth.FirebaseAuthHandler:get_FirebaseId <0x00032>
	  at DisconnectController:TryGetValidUserId <0x0003d>
	  at DisconnectController:FindUserId <0x00032>
	  at DisconnectController:Initialize <0x00032>
	  ...
	  at UnityEngine.Events.UnityAction`2:invoke_void_T0_T1 <0x000c8>
	  at UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded <0x00052>
	  at <Module>:runtime_invoke_void_Scene_int <0x00098

This only happens when trying to connect with Firebase services, there’s also this other log:

FunctionsException: INTERNAL
Firebase.Functions.HttpsCallableReference.<CallAsync>b__9_0 (System.Threading.Tasks.Task`1[TResult] task) (at /home/runner/work/firebase-unity-sdk/firebase-unity-sdk/functions/src/HttpsCallableReference.cs:88)
System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () (at <41229cbbc9214cf28863fc47f2e1508c>:0)
System.Threading.Tasks.Task.Execute () (at <41229cbbc9214cf28863fc47f2e1508c>:0)
--- End of stack trace from previous location where exception was thrown ---

This happens on Editor, but you can see that we’ve got some logs for ‘/home/runner’ path, perhaps this is an issue with Firebase CI?

Steps to reproduce:

It happens really occasionally, no specific steps are recorded but this issue is present in both MacOS Ventura 13.1 and Windows 11

Build - WORKAROUNDED

We found that running Android builds on Linux environments will output broken builds which cannot be opened. This is due this error, when triggered Crashlytics can’t generate the build_id property and will prevent the game from opening:

Assembly 'Packages/com.google.firebase.crashlytics/Firebase/Editor/Firebase.Crashlytics.Editor.dll' will not be loaded due to errors:

Unable to resolve reference 'UnityEditor.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?"

To solve this we had to add iOS Build Support for CI Android, which is not optimal.

If I can provide any further info or help please let me know, thanks 😃

[EDIT]

Issue also present on MacOS 12.5

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cometa93commented, Jul 7, 2023
0reactions
AlkisFortuneFishcommented, Jul 25, 2023

We have just updated from Firebase 10.4.0 to 11.2.0 and we’re getting this Editor crash randomly, across all our editors. In our case the call stack is:

Received signal SIGSEGV
Obtained 33 stack frames
0x00007fff9dfa5075 (FirebaseCppApp-11_2_0) uS::Socket::freeMessage
0x00007fff9dfd767d (FirebaseCppApp-11_2_0) uS::TLS::Context::operator bool
0x00007fff9dfdd12d (FirebaseCppApp-11_2_0) uS::TLS::Context::operator bool
0x00007fff9dfdd0d4 (FirebaseCppApp-11_2_0) uS::TLS::Context::operator bool
0x00007fff9dfcf485 (FirebaseCppApp-11_2_0) uS::TLS::Context::operator bool
0x00007fff9df5f9af (FirebaseCppApp-11_2_0) Firebase_Auth_CSharp_FirebaseUser_Token
0x000002a9e074583a (Mono JIT Code) (wrapper managed-to-native) Firebase.Auth.AuthUtilPINVOKE:FirebaseUser_Token (System.Runtime.InteropServices.HandleRef,bool)
0x000002a9e07454e3 (Mono JIT Code) [Firebase.Auth_fixed.cs:3623] Firebase.Auth.FirebaseUser:TokenAsync (bool) 
0x000002a9c9bb1afb (Mono JIT Code) [NetworkManager.cs:2218] NetworkManager/<ReAuthUser>d__234:MoveNext () 
0x000002a8b8ac9ab2 (Mono JIT Code) System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start<TStateMachine_REF> (TStateMachine_REF&)
0x000002a9c9bb14ab (Mono JIT Code) NetworkManager:ReAuthUser ()

There have been no changes to our auth code, the only change has been updating Firebase while integrating Firebase Messaging. There is clearly something broken here, please re-open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase Unity SDK Release Notes
Fixed an issue causing garbage collection every frame. Fixed issues causing Unity 2020 Android builds to fail. Improved the performance of Firebase Editor ......
Read more >
Release Notes | Firebase
The Firebase Admin Node.js SDK (v11.10.1) is now available. This release addresses an issue in v11.10.0 that caused an incompatibility in Realtime Database...
Read more >
Re: Why does an 'Unable to process request due to
"There was a recent bug in the Firebase Console that caused the wrong auth domain to be presented when enabling other OAuth providers....
Read more >
Build errors using Firebase SDK (VS2019/C++11) in a ...
The code compiled fine, I got many link errors which I haven't been able to resolve. They all seem to be related to...
Read more >
Firebase Auth error on Android (worknig fine on Editor)
I'm testing today FirebaseAuth quickStart example but still there's the same issue. It works fine on editor, it builds fine... but it ...
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