Firebase Auth iOS crash only from UCB

I’m getting a crash that appears related to Firebase Auth only when it’s built from Unity Cloud Build. This is the symbolicated crash stack:

0 0x0000000101f4fb64 firebase::auth::Auth::GetAuth(firebase::App*, firebase::InitResult*) + 80
1 0x00000001001e12ec FirebaseAuth_GetAuthInternal_m794040299 (Bulk_Firebase.Auth_0.cpp:4250)
2 0x00000001001e157c U3CGetAuthU3Ec__AnonStorey1_U3CU3Em__0_m3414313004 (Bulk_Firebase.Auth_0.cpp:4436)
3 0x00000001001cb2b8 FirebaseApp_TranslateDllNotFoundException_m3870437601 (Bulk_Firebase.App_0.cpp:6720)
4 0x00000001001e0164 FirebaseAuth_GetAuth_m1881142076 (Bulk_Firebase.Auth_0.cpp:3648)
5 0x0000000100497738 U3CGetAllInstancesWithInjectSplitU3Ec__Iterator0_MoveNext_m1612672149_gshared (Bulk_Generics_38.cpp:12268)
6 0x000000010018f9b8 IProviderExtensions_GetAllInstances_m3683282722 (Bulk_Assembly-CSharp_4.cpp:6609)
7 0x0000000100180ddc DiContainer_SafeGetInstances_m2972866851 (Bulk_Assembly-CSharp_3.cpp:15660)
8 0x0000000100180668 DiContainer_Resolve_m2981882194 (Bulk_Assembly-CSharp_3.cpp:15212)
9 0x0000000100181444 DiContainer_InstantiateInternal_m3973979177 (Bulk_Assembly-CSharp_3.cpp:16096)

The thing that stands out is this: FirebaseApp_TranslateDllNotFoundException but the DLL is certainly there and I can see from the UCB logs that it is listed as a dependency DLL after it builds. I’ve tried to mimic UCB’s environment for Unity version and Xcode version but I can’t replicate it when building locally. If the DLL is not there or not selected for iOS then Unity gives compile errors.

This is using Firebase Unity SDK 3.0.3 and the iOS SDK 3.17.0 integrating without CocoaPods as I don’t think that works with UCB yet.

Anyone seen this before? Or see any other leads?

One other thing is that I have seen it locally once or twice when integrating Firebase but it went away after reimporting the Firebase Auth Unity package so that is highly suspicious but I am not able to replicate locally with any consistency although UCB always creates a build with this crash. The reimported Firebase Auth Unity package also didn’t actually change the dlls, just meta files.

This has been one hell of a head scratcher! I’m using Git LFS as well so I thought maybe that was a problem and cloned the project somewhere else and tried building locally and it’s fine. I’m currently testing selecting and unselecting the platform settings for the dll files just in case something is borked there and adding all the Firebase assemblies to link.xml. UCB doesn’t build all that fast so the test iteration is slow :slight_smile:

Just in case anyone runs into this problem in the future, the issue is with Firebase Invites SDK and UCB. Namely that 2 URL Schemes necessary for Firebase Invites/Dynamic Links are not added to the info.plist file when building from UCB. I am guessing some kind of post build script from the Firebase Invites SDK is not run or fails. I didn’t notice any errors in the UCB full log but it may have been there and I just missed it.

I resolved this by checking for these 2 missing URL Schemes and adding them if not exist in info.plist in a post build processor script–the same place for adding additional frameworks or turning off bitcode.

The Firebase Invites iOS Getting Started Guide talks about these 2 URL Schemes so you can check there for specifics or just build it locally on a Mac and you should see exactly what the URL Type values are and then duplicate it in the post processor script.