firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.69k stars 1.48k forks source link

AppHang on FIRAnalytics initiateOnDeviceConversionMeasurementWithEmailAddress #13888

Open walt-etermax opened 1 month ago

walt-etermax commented 1 month ago

Description

Hello.

We have an AppHang caused by +[FIRAnalytics initiateOnDeviceConversionMeasurementWithEmailAddress:].

We have FirebaseAnalyticsOnDeviceConversion included in our build.

It happens on all kind of devices and in all iOS versions.

It does not happen all the time. But it is slowly affecting more of our users.

Reproducing the issue

We do not have a consistent way to reproduce this issue.

Firebase SDK Version

10.24.0

Xcode Version

15.4

Installation Method

CocoaPods

Firebase Product(s)

Analytics, Crashlytics, DynamicLinks

Targeted Platforms

iOS

Relevant Log Output

App Hang: The app was terminated while unresponsive

0  libsystem_kernel.dylib +0x1878  ___psynch_cvwait
1  libsystem_pthread.dylib +0x99a8 __pthread_cond_wait$VARIANT$mp
2  Foundation +0x3d0e0             -[NSOperation waitUntilFinished]
3  Foundation +0x3cee0             ___NSOPERATIONQUEUE_IS_WAITING_ON_AN_OPERATION__
4  Foundation +0xaae58             -[NSOperationQueue waitUntilAllOperationsAreFinished]
5  XXXXXXXXXXX +0xf714e0           +[APMAnalytics queueOperationWithBlockThenWait:]
6  XXXXXXXXXXX +0xf71c38           +[APMAnalytics setUserData:]
7  XXXXXXXXXXX +0xf6a588           +[FIRAnalytics initiateOnDeviceConversionMeasurementWithEmailAddress:]
8  XXXXXXXXXXX +0x2bbae8           @objc FirebaseCrashlyticsAnalyticsAdapter.setUserInfo(_:) (FirebaseCrashlyticsAnalyticsAdapter.swift:19:23)
9  P2Analytics +0x4418             -[AGAnalytics setUserInfo:] (AGAnalytics.m:89:13)
10 XXXXXXXXXXX +0xf66c0            -[AGAppDelegate applicationDidBecomeActive:] (AGAppDelegate.m:111:9)
11 XXXXXXXXXXX +0xe028             -[PRAppDelegate applicationDidBecomeActive:] (PRAppDelegate.m:553:5)
12 UIKitCore +0x26d394             -[UIApplication _stopDeactivatingForReason:]
13 UIKitCore +0x26ce1c             -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:]
14 UIKitCore +0x26cc10             -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
15 UIKitCore +0x26c7e0             -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:]
16 UIKitCore +0x26c6c0             ___186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke
17 UIKitCore +0x8eba78             +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:]
18 UIKitCore +0x97f7b4             __UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion
19 UIKitCore +0x12b138             -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]
20 UIKitCore +0x55f3ac             ___64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.196
21 UIKitCore +0x1f1738             -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:]
22 UIKitCore +0x1f15cc             -[UIScene scene:didUpdateWithDiff:transitionContext:completion:]
23 UIKitCore +0x1f1428             -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:]
24 FrontBoardServices +0x3c3c      -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:]
25 FrontBoardServices +0x3a94      ___94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2
26 FrontBoardServices +0x6ef8      -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
27 FrontBoardServices +0x6e20      ___94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke
28 libdispatch.dylib +0x6477c      __dispatch_client_callout
29 libdispatch.dylib +0x6cc8       __dispatch_block_invoke_direct$VARIANT$mp
30 FrontBoardServices +0x1040c     __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
31 FrontBoardServices +0x10048     -[FBSSerialQueue _targetQueue_performNextIfPossible]
32 FrontBoardServices +0x125fc     -[FBSSerialQueue _performNextFromRunLoopSource]
33 CoreFoundation +0xc90e4         ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
34 CoreFoundation +0xd4d58         ___CFRunLoopDoSource0
35 CoreFoundation +0x60018         ___CFRunLoopDoSources0
36 CoreFoundation +0x75134         ___CFRunLoopRun
37 CoreFoundation +0x79d1c         _CFRunLoopRunSpecific
38 GraphicsServices +0x1994        _GSEventRunModal
39 UIKitCore +0x371348             -[UIApplication _run]
40 UIKitCore +0x370fc0             _UIApplicationMain
41 XXXXXXXXXXX +0x1d8f4            main (main.m:8:22)
42 dyld +0x14340                   start

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml - Firebase (10.24.0): - Firebase/Core (= 10.24.0) - Firebase/Analytics (10.24.0): - Firebase/Core - Firebase/Core (10.24.0): - Firebase/CoreOnly - FirebaseAnalytics (~> 10.24.0) - Firebase/CoreOnly (10.24.0): - FirebaseCore (= 10.24.0) - Firebase/Crashlytics (10.24.0): - Firebase/CoreOnly - FirebaseCrashlytics (~> 10.24.0) - Firebase/DynamicLinks (10.24.0): - Firebase/CoreOnly - FirebaseDynamicLinks (~> 10.24.0) - Firebase/Messaging (10.24.0): - Firebase/CoreOnly - FirebaseMessaging (~> 10.24.0) - FirebaseAnalytics (10.24.0): - FirebaseAnalytics/AdIdSupport (= 10.24.0) - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30911.0, >= 2.30908.0) - FirebaseAnalytics/AdIdSupport (10.24.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - GoogleAppMeasurement (= 10.24.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.11) - GoogleUtilities/MethodSwizzler (~> 7.11) - GoogleUtilities/Network (~> 7.11) - "GoogleUtilities/NSData+zlib (~> 7.11)" - nanopb (< 2.30911.0, >= 2.30908.0) - FirebaseAnalyticsOnDeviceConversion (10.24.0): - GoogleAppMeasurementOnDeviceConversion (= 10.24.0) - FirebaseCore (10.24.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) - FirebaseCoreExtension (10.24.0): - FirebaseCore (~> 10.0) - FirebaseCoreInternal (10.24.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - FirebaseCrashlytics (10.24.0): - FirebaseCore (~> 10.5) - FirebaseInstallations (~> 10.0) - FirebaseRemoteConfigInterop (~> 10.23) - FirebaseSessions (~> 10.5) - GoogleDataTransport (~> 9.2) - GoogleUtilities/Environment (~> 7.8) - nanopb (< 2.30911.0, >= 2.30908.0) - PromisesObjC (~> 2.1) - FirebaseDynamicLinks (10.24.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (10.24.0): - FirebaseCore (~> 10.0) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - FirebaseMessaging (10.24.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - GoogleDataTransport (~> 9.3) - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/Reachability (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - nanopb (< 2.30911.0, >= 2.30908.0) - FirebaseRemoteConfigInterop (10.24.0) - FirebaseSessions (10.24.0): - FirebaseCore (~> 10.5) - FirebaseCoreExtension (~> 10.0) - FirebaseInstallations (~> 10.0) - GoogleDataTransport (~> 9.2) - GoogleUtilities/Environment (~> 7.10) - nanopb (< 2.30911.0, >= 2.30908.0) - PromisesSwift (~> 2.1) ```
google-oss-bot commented 1 month ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.