Closed adamlucax closed 3 months ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Hey @adamlucax, thanks for reaching out. I tried testing the products you've mentioned with version 12.1.0
using our Firebase Unity quickstart with Simular iOS 17.4
but so far did not encounter any issue. I'm wondering if it's because of the External Dependency Manager.
External Dependencies Manager: was: 1.2.179 new: 1.2.181
According to the Firebase Unity Archive page, the version tied up with each Firebase product of 12.1.0
is External Dependency Manager version 1.2.177
. I'm not sure if this is what's causing the issue. Could you try changing this and see if there's any difference. Other than that, could you provide more details regarding the crash. Such as stacktrace, code snippets, or minimal reproducible example so we can investigate this further. Thanks!
Hey @adamlucax. 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!
Since there haven't been any recent updates here, I am going to close this issue.
@adamlucax if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Sorry about the delay, we were testing some changes to bring some evidence for a further investigation
We tried EDM4U downgrade, but it doesn't work
We are currently building just for ARM64 as the firebase changelog says it stops supporting 32 bits architecture, but we also tried to build for all architectures and still no working
We were having some crashes on Android API 34, so we made this update and discovered that iOS builds started crashing after the Firebase SDK 11.5, which is the same that fixed the crashes on API 34, so this is preventing us from any update cause we should support Android API 34
We also got some crashes on Crashlytics so I'm sending them below in this message
Crashed: com.google.firebase.crashlytics.ios.exception
0 UnityFramework 0x2c3c940 FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393)
1 UnityFramework 0x2c3cd20 FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424)
2 UnityFramework 0x2c33de0 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3 UnityFramework 0x2c2eb14 __FIRCLSExceptionRecord_block_invoke + 232 (FIRCLSException.mm:232)
4 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20
5 libdispatch.dylib 0x132c4 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 UnityFramework 0x2c2db20 FIRCLSExceptionRecord + 234 (FIRCLSException.mm:234)
7 UnityFramework 0x2c2d8cc FIRCLSTerminateHandler() + 412 (FIRCLSException.mm:412)
8 libc++abi.dylib 0x14068 std::__terminate(void (*)()) + 16
9 libc++abi.dylib 0x1735c __cxa_get_exception_ptr + 86
10 libc++abi.dylib 0x172a0 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*) + 306
11 UnityFramework 0x4fc2f8c il2cpp::vm::Exception::RaiseOutOfMemoryException() + 124 (Exception.cpp:124)
12 UnityFramework 0x4ff0cfc il2cpp::utils::collections::ArrayValueMap<void (*)(), MethodDefinitionKey, il2cpp::utils::MethodInfoToMethodPointerConverter, std::__1::less<void (*)()>, std::__1::equal_to<void (*)()>>::~ArrayValueMap() + 142 (Collections.h:142)
13 UnityFramework 0x9af9f8 (Missing UUID c0b77933ab3f3f718cfd026c90672d01)
14 UnityFramework 0x9b0970 (Missing UUID c0b77933ab3f3f718cfd026c90672d01)
15 UnityFramework 0x9af724 (Missing UUID c0b77933ab3f3f718cfd026c90672d01)
16 HempParadise 0x48b5678 ReversePInvokeWrapper.FutureVoid_SWIG_CompletionDispatcher (Firebase.App.cpp)
17 UnityFramework 0x4d40344 CallbackImpl(FutureVoidCallbackData)
18 UnityFramework 0x4d5ef80 firebase::callback::CallbackValue1<FutureVoidCallbackData>::Run()
19 UnityFramework 0x4c943a0 firebase::callback::CallbackEntry::Execute()
20 UnityFramework 0x4c917f4 firebase::callback::CallbackDispatcher::DispatchCallbacks()
21 UnityFramework 0x4c9173c firebase::callback::PollCallbacks()
22 UnityFramework 0x4d48ac0 Firebase_App_CSharp_PollCallbacks
23 UnityFramework 0x9b9798 (Missing UUID c0b77933ab3f3f718cfd026c90672d01)
24 UnityFramework 0x9c3f44 (Missing UUID c0b77933ab3f3f718cfd026c90672d01)
25 UnityFramework 0x4fde6e0 il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) + 608 (Runtime.cpp:608)
26 UnityFramework 0x4fde628 il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 602 (Runtime.cpp:602)
27 UnityFramework 0x3d5da80 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 290 (ScriptingApi_Il2Cpp.cpp:290)
28 UnityFramework 0x3d6b060 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 298 (ScriptingInvocation.cpp:298)
29 UnityFramework 0x3d79e3c MonoBehaviour::CallUpdateMethod(int) + 589 (MonoBehaviour.cpp:589)
30 UnityFramework 0x3b9feb8 void BaseBehaviourManager::CommonUpdate<BehaviourManager>() + 180 (Behaviour.cpp:180)
31 UnityFramework 0x3c61c1c ExecutePlayerLoop(NativePlayerLoopSystem*) + 393 (PlayerLoop.cpp:393)
32 UnityFramework 0x3c61c5c ExecutePlayerLoop(NativePlayerLoopSystem*) + 417 (PlayerLoop.cpp:417)
33 UnityFramework 0x3c61f30 PlayerLoop() + 527 (PlayerLoop.cpp:527)
34 UnityFramework 0x4356184 UnityPlayerLoopImpl(bool) + 342 (LibEntryPoint.mm:342)
35 UnityFramework 0x2bd2254 UnityRepaint + 215 (UnityAppController+Rendering.mm:215)
36 QuartzCore 0xd0ecc CA::Display::DisplayLinkItem::dispatch_(CA::SignPost::Interval<(CA::SignPost::CAEventCode)835322056>&) + 48
37 QuartzCore 0xcf230 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 876
38 QuartzCore 0xcfbb8 display_timer_callback(__CFMachPort*, void*, long, void*) + 372
39 CoreFoundation 0x54d68 __CFMachPortPerform + 176
40 CoreFoundation 0x54ca4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
41 CoreFoundation 0x54bc4 __CFRunLoopDoSource1 + 524
42 CoreFoundation 0x53a0c __CFRunLoopRun + 2244
43 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
44 GraphicsServices 0x11a8 GSEventRunModal + 164
45 UIKitCore 0x40a90c -[UIApplication _run] + 888
46 UIKitCore 0x4be9d0 UIApplicationMain + 340
47 UnityFramework 0x2bd1e8c -[UnityFramework runUIApplicationMainWithArgc:argv:] + 96 (main.mm:96)
48 HempParadise 0x412c main + 28 (main.mm:28)
49 ??? 0x1b7f4de4c (Missing)
We were having some crashes on Android API 34, so we made this update and discovered that iOS builds started crashing after the Firebase SDK 11.5, which is the same that fixed the crashes on API 34, so this is preventing us from any update cause we should support Android API 34
There were recent issues regarding Android API 34, this should be working in the most recent version of the Unity Editor. I noticed you're using 2022.3.23f
, could you try updating to 2022.3.40f1
. Also please update the minSdkVersion to 24.
This issue is related to this thread. Let me know if it works!
Hey @argzdev thanks for the suggestion. We will try it and let you know the findings.
That said, I'd like to reinforce the scenario we're facing. Android builds are working correctly on API 34 when we use Firebase version 11.5 or above. The problem is that iOS builds crashes with any Firebase version 11.5 or above as well.
So, the current scenario is (considering we're targeting Android API 34):
Fatal Exception: Il2CppExceptionWrapper Crashed: com.google.firebase.crashlytics.ios.exception
@adamlucax mentioned above.We have another project that is using Firebase 11.8 and targeting Android 34, but no such errors are happening. The build process is strictly the same, the main differences we have are the SDKs included: the project from this thread is using AppLovin MAX and AppsFlyer, while the working project is using IronSource (and no AppsFlyer). Not sure if this is relevant, but would like to share it anyway.
Thanks for the updates, @nanddo. The stacktrace suggests that the issue is due to RaiseOutOfMemoryException
. However, it is difficult to say what's causing this. Could you provide an MCVE so we can investigate this further?
Currently, testing with our Firebase Unity Quickstart doesn't show any of these issues. I'm wondering if there are code changes that could be causing this.
Hey @argzdev, we're working on an MCVE, to provide it to you. And we still looking for some relevant code changes that could impact firebase initialization, but we didn't found anything yet.
Also, we got this crash report trying to get more detailed logs using the xcode, hope it helps
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: 6FED6A0F-977A-49C9-A679-9A4F826824D6
CrashReporter Key: 7569CE39-C0D1-45A9-2F10-535CC701510C
Hardware Model: Macmini9,1
Process: <Project_Name> [79892]
Path: /private/var/folders/*/<Project_Name>.app/<Project_Name>
Identifier: <Project_Id>
Version: 1.19.2518 (2518)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: <Project_Id> [631483]
Date/Time: 2024-08-05 14:02:02.2937 +0000
Launch Time: 2024-08-05 14:01:30.9498 +0000
OS Version: macOS 14.3.1 (23D60)
Release Type: User
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: <Project_Name> [79892]
Triggered by Thread: 0
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x187ac20dc __pthread_kill + 8
1 libsystem_pthread.dylib 0x187af9cc0 pthread_kill + 288
2 libsystem_c.dylib 0x187a05ad4 __abort + 136
3 libsystem_c.dylib 0x187a05a4c abort + 192
4 libc++abi.dylib 0x187ab1070 abort_message + 132
5 libc++abi.dylib 0x187aa112c demangling_terminate_handler() + 348
6 libobjc.A.dylib 0x18774799c _objc_terminate() + 160
7 UnityFramework 0x11ab926bc FIRCLSTerminateHandler() + 436 (FIRCLSException.mm:463)
8 libc++abi.dylib 0x187ab0434 std::__terminate(void (*)()) + 16
9 libc++abi.dylib 0x187ab3520 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 88
10 libc++abi.dylib 0x187ab3464 __cxa_throw + 308
11 UnityFramework 0x11db11920 il2cpp::vm::Exception::Rethrow(Il2CppException*) + 44 (Exception.cpp:120)
12 UnityFramework 0x11db3f690 il2cpp::utils::RethrowException(Il2CppException*) + 12 (Finally.cpp:8)
13 UnityFramework 0x11cd65f24 il2cpp::utils::FinallyHelper<FutureVoid_Dispose_mE53AC3550993F046EC655040D365FA932C784DE0::$_11, false>::~FinallyHelper() + 68 (Finally.h:49)
14 UnityFramework 0x11cd62dc4 il2cpp::utils::FinallyHelper<FutureVoid_Dispose_mE53AC3550993F046EC655040D365FA932C784DE0::$_11, false>::~FinallyHelper() + 28 (Finally.h:36)
15 UnityFramework 0x1170cda88 FutureVoid_Dispose_mE53AC3550993F046EC655040D365FA932C784DE0 + 492 (Firebase.App.cpp:7415)
16 UnityFramework 0x11cc49c04 VirtualActionInvoker1<bool>::Invoke(unsigned short, Il2CppObject*, bool) + 80 (Assembly-CSharp__1.cpp:31)
17 UnityFramework 0x1170c3ef4 FutureBase_Dispose_m32193D02DE4608C6C3EDF42F3D0495707DA4D15E + 84 (Firebase.App.cpp:2998)
18 UnityFramework 0x1170cf4ec U3CU3Ec__DisplayClass5_0_U3CGetTaskU3Eb__0_m3C63FB12C6FC4D1551D9D48B32F123DF7EAA4AE0 + 1048 (Firebase.App.cpp:8292)
19 UnityFramework 0x1170cef00 Action_Invoke_mB0C4867EC8469233A3647955D2408E97D6107F91_inline(Action_t64BE78B93B14480A890D4907745BF10FC9C31B2F*, MethodInfo const*) + 48 (Firebase.App.cpp:15991)
20 UnityFramework 0x1170cd73c FutureVoid_SWIG_CompletionDispatcher_mE9933C19D489F4E5B7B8F99C087A7A1C95681554 + 940 (Firebase.App.cpp:7905)
21 UnityFramework 0x11cd62d18 ReversePInvokeWrapper_FutureVoid_SWIG_CompletionDispatcher_mE9933C19D489F4E5B7B8F99C087A7A1C95681554 + 36 (Firebase.App.cpp:7283)
22 UnityFramework 0x11d88ebd4 CallbackImpl(FutureVoidCallbackData) + 32
23 UnityFramework 0x11d8ad810 firebase::callback::CallbackValue1<FutureVoidCallbackData>::Run() + 44
24 UnityFramework 0x11d7e2694 firebase::callback::CallbackEntry::Execute() + 144
25 UnityFramework 0x11d7dfae8 firebase::callback::CallbackDispatcher::DispatchCallbacks() + 116
26 UnityFramework 0x11d7dfa30 firebase::callback::PollCallbacks() + 68
27 UnityFramework 0x11d897350 Firebase_App_CSharp_PollCallbacks + 12
28 UnityFramework 0x1170da4e8 AppUtilPINVOKE_PollCallbacks_mD2FF7C60A52AF22E9AC028564A06E0F3974B6D56 + 20 (Firebase.App.cpp:13954)
29 UnityFramework 0x1170dc838 AppUtil_PollCallbacks_mB25BC1FD5126974F80860A05910301AAF7589BFC + 112 (Firebase.App.cpp:15389)
30 UnityFramework 0x1170dc958 FirebaseAppUtils_PollCallbacks_m94AC1FCAA3602F030E6AA26C1FD6CB03E0F7155C + 28 (Firebase.App.cpp:15864)
31 UnityFramework 0x11cc3d984 InterfaceActionInvoker0::Invoke(unsigned short, Il2CppClass*, Il2CppObject*) + 68 (AnalyticsIOS.cpp:74)
32 UnityFramework 0x1170ebfe4 FirebaseHandler_Update_mDBFD412D735E6C3F328C9BA3E5B3C5ECFBF49138 + 232 (Firebase.Platform.cpp:3710)
33 UnityFramework 0x1170edfdc FirebaseMonoBehaviour_Update_m7DEE72CA7C251D41465F5997BA4455A33B429A6C + 192 (Firebase.Platform.cpp:4878)
34 UnityFramework 0x11d388020 RuntimeInvoker_TrueVoid_t4861ACF8F4594C3437BB48B6E56783494B843915(void (*)(), MethodInfo const*, void*, void**, void*) + 48 (Il2CppInvokerTable.cpp:99408)
35 UnityFramework 0x11db2d074 il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) + 100 (Runtime.cpp:608)
36 UnityFramework 0x11db2cfbc il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) + 84 (Runtime.cpp:594)
37 UnityFramework 0x11bfb3c64 scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) + 124 (ScriptingApi_Il2Cpp.cpp:290)
38 UnityFramework 0x11bfc4670 ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) + 140 (ScriptingInvocation.cpp:298)
39 UnityFramework 0x11bfd55e8 Invoke + 20 (ScriptingInvocation.h:71) [inlined]
40 UnityFramework 0x11bfd55e8 CallMethodIfAvailable + 64 (MonoBehaviour.cpp:483) [inlined]
41 UnityFramework 0x11bfd55e8 MonoBehaviour::CallUpdateMethod(int) + 256 (MonoBehaviour.cpp:588)
42 UnityFramework 0x11bd53518 UpdateBehaviour + 12 (Behaviour.cpp:180) [inlined]
43 UnityFramework 0x11bd53518 void BaseBehaviourManager::CommonUpdate<BehaviourManager>() + 100 (Behaviour.cpp:158)
44 UnityFramework 0x11bd53464 BehaviourManager::Update() + 36 (Behaviour.cpp:175)
45 UnityFramework 0x11be33534 InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdateRegistrator::Forward() + 80 (Player.cpp:1677)
46 UnityFramework 0x11be26750 ExecutePlayerLoop(NativePlayerLoopSystem*) + 140 (PlayerLoop.cpp:393)
47 UnityFramework 0x11be26790 ExecutePlayerLoop(NativePlayerLoopSystem*) + 204 (PlayerLoop.cpp:414)
48 UnityFramework 0x11be26af4 PlayerLoop() + 324 (PlayerLoop.cpp:521)
49 UnityFramework 0x11c706c64 UnityPlayerLoopImpl(bool) + 116 (LibEntryPoint.mm:339)
50 UnityFramework 0x11aaf9f38 UnityRepaint + 56 (UnityAppController+Rendering.mm:213)
51 UnityFramework 0x11aaf9ef0 -[UnityAppController(Rendering) repaint] + 116 (UnityAppController+Rendering.mm:57)
52 UnityFramework 0x11aaf9e6c -[UnityAppController(Rendering) repaintDisplayLink] + 84 (UnityAppController+Rendering.mm:43)
53 QuartzCore 0x18fd817b8 CA::Display::DisplayLinkItem::dispatch_(CA::SignPost::Interval<(CA::SignPost::CAEventCode)835322056>&) + 48
54 QuartzCore 0x18fd0ad48 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 860
55 QuartzCore 0x18fd82648 CA::Display::DisplayLink::callback(_CADisplayTimer*, unsigned long long, unsigned long long, unsigned long long, bool, void*) + 812
56 QuartzCore 0x18fd0a96c display_timer_callback(__CFMachPort*, void*, long, void*) + 348
57 CoreFoundation 0x187c07424 __CFMachPortPerform + 296
58 CoreFoundation 0x187bd7f6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
59 CoreFoundation 0x187bd7e8c __CFRunLoopDoSource1 + 520
60 CoreFoundation 0x187bd6858 __CFRunLoopRun + 2244
61 CoreFoundation 0x187bd593c CFRunLoopRunSpecific + 608
62 HIToolbox 0x19219e448 RunCurrentEventLoopInMode + 292
63 HIToolbox 0x19219e284 ReceiveNextEventCommon + 648
64 HIToolbox 0x19219dfdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
65 AppKit 0x18b3b4ed0 _DPSNextEvent + 660
66 AppKit 0x18bb9feec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
67 AppKit 0x18b3a837c -[NSApplication run] + 476
68 AppKit 0x18b37f640 NSApplicationMain + 880
69 AppKit 0x18b5d18fc _NSApplicationMainWithInfoDictionary + 24
70 UIKitMacHelper 0x1a087d6b8 UINSApplicationMain + 972
71 UIKitCore 0x1b64e00f8 UIApplicationMain + 148
72 UnityFramework 0x11aaf9910 -[UnityFramework runUIApplicationMainWithArgc:argv:] + 136 (main.mm:96)
73 <Project_Name> 0x100bac1d0 main + 76 (main.mm:26)
74 dyld 0x1877790e0 start + 2360
Thanks for the additional information, @adamlucax. Sorry, the stacktrace only shows that there's a crashing related to Unity integration with Firebase, other than that, there's not really much information in the stacktrace that would help us investigate this further. I did notice a few details:
These crash details is somewhat different from your previous reply. I initially noticed a RaiseOutOfMemoryException
from the stacktrace, I don't think this is the same issue. This doesn't really suggests that the Firebase SDK is causing the issue, but rather a potential memory leak. Have you tried using any memory profiling tool to see if there are libraries that are causing memory leaks?
@nanddo mentioned something interesting:
"We have another project that is using Firebase 11.8 and targeting Android 34, but no such errors are happening. The build process is strictly the same, the main differences we have are the SDKs included".
From what I know, the Firebase SDK shouldn't affect integration with other libraries, but I could be wrong. I've checked the Firebase iOS repository, there aren't any similar trending issues at the moment. Since the stacktraces are a bit vague, an MCVE and steps to repro will definitely help speed up the investigation.
Hey @argzdev I have some good news, we fixed it.
The issue was these files in the image below, these files were probably from a previous integration, it does trigger a Warning during the build process accusing they're duplicated, but we never had any trouble until the firebase version that also had the API 34 crash fix
Thanks a lot for the help, we do appreciate it!
Awesome, thanks for sharing updates, @adamlucax. I'm guessing the resolver didn't correctly uninstall the previous Unity SDK properly, causing duplicate classes to happen. But I'm glad you managed to resolve the issue! I'll go ahead and close this thread for now. Thanks!
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
App just starts crashing for iOS after firebase services SDKs upgrade. .ips is attached and list of services used is bellow
Remote Config was: 11.3.0 new: 12.1.0
Crashalytics was: 11.3.0 new: 12.1.0
Firebase Google Analytics was: 11.3.0 new: 12.1.0
External Dependencies Manager: was: 1.2.179 new: 1.2.181
Please answer the following, if applicable:
What's the issue repro rate? 100%
What happened? How can we make the problem occur? Just opening the game when initialization starts it just crash
Logs on .ips:
`