firebase / firebase-ios-sdk

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

GDTCCTUploader.m line 331 crash #5449

Closed Coloretta closed 4 years ago

Coloretta commented 4 years ago

Always getting crash in firebase sdk:

Crashed: com.google.GDTCCTUploader
0  libobjc.A.dylib                0x1a2586294 objc_retain + 100
1  libdispatch.dylib              0x1a24f900c _dispatch_client_callout + 20
2  libdispatch.dylib              0x1a2505804 _dispatch_lane_barrier_sync_invoke_and_complete + 60
3  Plann                          0x1007b42d8 -[GDTCCTUploader readyToUploadTarget:conditions:] + 331 (GDTCCTUploader.m:331)
4  Plann                          0x1007af494 __52-[GDTCORUploadCoordinator uploadTargets:conditions:]_block_invoke + 120 (GDTCORUploadCoordinator.m:120)
5  libdispatch.dylib              0x1a24f7bb0 _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x1a24f900c _dispatch_client_callout + 20
7  libdispatch.dylib              0x1a24ff484 _dispatch_lane_serial_drain + 568
8  libdispatch.dylib              0x1a24ffeb0 _dispatch_lane_invoke + 368
9  libdispatch.dylib              0x1a2508f20 _dispatch_workloop_worker_thread + 580
10 libsystem_pthread.dylib        0x1a255eaa0 _pthread_wqthread + 280
11 libsystem_pthread.dylib        0x1a2564c78 start_wqthread + 8
google-oss-bot commented 4 years ago

I found a few problems with this issue:

morganchen12 commented 4 years ago

Hey @Coloretta, please fill out the issue template. It will help us debug your issue. Most importantly, we'll need to know the versions of GoogleDataTransport you're using, since this looks like a bug that was recently fixed in the latest version.

fbarraganef commented 4 years ago

This is happening to me too.

#15. Crashed: com.google.GDTCCTUploader
0  libobjc.A.dylib                0x19d693284 objc_retain + 100
1  libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
2  libdispatch.dylib              0x19d6127f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
3  EnviaFloresStore               0x102b1e4b8 -[GDTCCTUploader readyToUploadTarget:conditions:] + 331 (GDTCCTUploader.m:331)
4  EnviaFloresStore               0x102b1972c __52-[GDTCORUploadCoordinator uploadTargets:conditions:]_block_invoke + 120 (GDTCORUploadCoordinator.m:120)
5  libdispatch.dylib              0x19d604b7c _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
7  libdispatch.dylib              0x19d60c450 _dispatch_lane_serial_drain + 568
8  libdispatch.dylib              0x19d60ce7c _dispatch_lane_invoke + 368
9  libdispatch.dylib              0x19d615f20 _dispatch_workloop_worker_thread + 580
10 libsystem_pthread.dylib        0x19d66b6d0 _pthread_wqthread + 280
11 libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

--

#0. com.google.GDTCORStorage
0  libsystem_kernel.dylib         0x19d74ca2c kevent_id + 8
1  libdispatch.dylib              0x19d622c74 _dispatch_kq_poll + 332
2  libdispatch.dylib              0x19d62363c _dispatch_event_loop_wait_for_ownership + 416
3  libdispatch.dylib              0x19d612a90 __DISPATCH_WAIT_FOR_QUEUE__ + 308
4  libdispatch.dylib              0x19d612698 _dispatch_sync_f_slow + 144
5  EnviaFloresStore               0x102b19988 -[GDTCORUploadCoordinator initWithCoder:] + 190 (GDTCORUploadCoordinator.m:190)
6  Foundation                     0x19dd1dc60 _decodeObjectBinary + 2256
7  Foundation                     0x19dd1d0dc _decodeObject + 344
8  Foundation                     0x19dc24e58 -[NSKeyedUnarchiver decodeObjectForKey:] + 172
9  Foundation                     0x19dc24cac -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 356
10 EnviaFloresStore               0x102b18370 __31-[GDTCORStorage initWithCoder:]_block_invoke + 291 (GDTCORStorage.m:291)
11 libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
12 libdispatch.dylib              0x19d6127f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
13 EnviaFloresStore               0x102b18194 -[GDTCORStorage initWithCoder:] + 282 (GDTCORStorage.m:282)
14 Foundation                     0x19dd1dc60 _decodeObjectBinary + 2256
15 Foundation                     0x19dd1d0dc _decodeObject + 344
16 Foundation                     0x19dc24e58 -[NSKeyedUnarchiver decodeObjectForKey:] + 172
17 Foundation                     0x19dc24cac -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 356
18 Foundation                     0x19dc24900 -[NSCoder(Exceptions) __tryDecodeObjectForKey:error:decodeBlock:] + 104
19 Foundation                     0x19dc24870 -[NSCoder decodeTopLevelObjectOfClasses:forKey:error:] + 124
20 Foundation                     0x19dc23adc +[NSKeyedUnarchiver unarchivedObjectOfClasses:fromData:error:] + 140
21 Foundation                     0x19dc6bbf0 +[NSKeyedUnarchiver unarchivedObjectOfClass:fromData:error:] + 120
22 EnviaFloresStore               0x102b15638 GDTCORDecodeArchive + 213 (GDTCORPlatform.m:213)
23 EnviaFloresStore               0x102b17d84 -[GDTCORStorage appWillForeground:] + 218 (GDTCORStorage.m:218)
24 EnviaFloresStore               0x102b14954 -[GDTCORLifecycle applicationWillEnterForeground:] + 100 (GDTCORLifecycle.m:100)
25 Foundation                     0x19dd2affc __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 28
26 CoreFoundation                 0x19d8b899c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
27 CoreFoundation                 0x19d8b89ec ___CFXRegistrationPost1_block_invoke + 68
28 CoreFoundation                 0x19d8b7ce4 _CFXRegistrationPost1 + 396
29 CoreFoundation                 0x19d8b797c ___CFXNotificationPost_block_invoke + 108
30 CoreFoundation                 0x19d830910 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1424
31 CoreFoundation                 0x19d8b72ac _CFXNotificationPost + 1268
32 Foundation                     0x19dc19b8c -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
33 EnviaFloresStore               0x102b15cb4 -[GDTCORApplication iOSApplicationWillEnterForeground:] + 388 (GDTCORPlatform.m:388)
34 Foundation                     0x19dd2affc __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 28
35 CoreFoundation                 0x19d8b899c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28
36 CoreFoundation                 0x19d8b89ec ___CFXRegistrationPost1_block_invoke + 68
37 CoreFoundation                 0x19d8b7ce4 _CFXRegistrationPost1 + 396
38 CoreFoundation                 0x19d8b797c ___CFXNotificationPost_block_invoke + 108
39 CoreFoundation                 0x19d830910 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1424
40 CoreFoundation                 0x19d8b72ac _CFXNotificationPost + 1268
41 Foundation                     0x19dc19b8c -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
42 UIKitCore                      0x1a1a77cc0 -[UIApplication _sendWillEnterForegroundCallbacks] + 284
43 UIKitCore                      0x1a11f8eb4 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 1780
44 UIKitCore                      0x1a16a9518 _UIScenePerformActionsWithLifecycleActionMask + 112
45 UIKitCore                      0x1a11f8724 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 212
46 UIKitCore                      0x1a11f8154 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 304
47 UIKitCore                      0x1a11f8540 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 752
48 UIKitCore                      0x1a11f7dc4 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340
49 UIKitCore                      0x1a11fc544 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 196
50 UIKitCore                      0x1a16c339c ___UISceneSettingsDiffActionPerformChangesWithTransitionContext_block_invoke + 28
51 UIKitCore                      0x1a15d57bc +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 868
52 UIKitCore                      0x1a16c3354 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 260
53 UIKitCore                      0x1a11fc25c __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 152
54 UIKitCore                      0x1a16c323c _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 108
55 UIKitCore                      0x1a11fc0b8 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 392
56 UIKitCore                      0x1a1064434 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 640
57 UIKitCore                      0x1a1062ef8 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256
58 UIKitCore                      0x1a1064164 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 236
59 UIKitCore                      0x1a15f7b7c -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 480
60 FrontBoardServices             0x1a2b56918 -[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:] + 560
61 FrontBoardServices             0x1a2b7cff8 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke_2 + 136
62 FrontBoardServices             0x1a2b60ef4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240
63 FrontBoardServices             0x1a2b7cf14 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke + 200
64 libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
65 libdispatch.dylib              0x19d608d1c _dispatch_block_invoke_direct + 264
66 FrontBoardServices             0x1a2ba3254 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48
67 FrontBoardServices             0x1a2ba2f00 -[FBSSerialQueue _queue_performNextIfPossible] + 432
68 FrontBoardServices             0x1a2ba346c -[FBSSerialQueue _performNextFromRunLoopSource] + 32
69 CoreFoundation                 0x19d8dc108 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
70 CoreFoundation                 0x19d8dc05c __CFRunLoopDoSource0 + 84
71 CoreFoundation                 0x19d8db818 __CFRunLoopDoSources0 + 264
72 CoreFoundation                 0x19d8d6694 __CFRunLoopRun + 1068
73 CoreFoundation                 0x19d8d5f40 CFRunLoopRunSpecific + 480
74 GraphicsServices               0x1a7b66534 GSEventRunModal + 108
75 UIKitCore                      0x1a1a61580 UIApplicationMain + 1940
76 EnviaFloresStore               0x1027b8450 main + 32 (AppDelegate.swift:32)
77 libdyld.dylib                  0x19d754e18 start + 4

#1. com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x19d728c04 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19d728020 mach_msg + 76
2  CoreFoundation                 0x19d8db964 __CFRunLoopServiceMachPort + 220
3  CoreFoundation                 0x19d8d67fc __CFRunLoopRun + 1428
4  CoreFoundation                 0x19d8d5f40 CFRunLoopRunSpecific + 480
5  Foundation                     0x19dc1b340 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
6  Foundation                     0x19dc1b218 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92
7  UIKitCore                      0x1a1afce9c -[UIEventFetcher threadMain] + 156
8  Foundation                     0x19dc19fa4 -[NSThread main] + 40
9  Foundation                     0x19dd55a74 __NSThread__start__ + 852
10 libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
11 libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#2. com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x19d728c04 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19d728020 mach_msg + 76
2  CoreFoundation                 0x19d8db964 __CFRunLoopServiceMachPort + 220
3  CoreFoundation                 0x19d8d67fc __CFRunLoopRun + 1428
4  CoreFoundation                 0x19d8d5f40 CFRunLoopRunSpecific + 480
5  CFNetwork                      0x1a0bdb568 (Missing)
6  Foundation                     0x19dc19fa4 -[NSThread main] + 40
7  Foundation                     0x19dd55a74 __NSThread__start__ + 852
8  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
9  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#3. com.twitter.crashlytics.ios.MachExceptionServer
0  EnviaFloresStore               0x102a3d674 CLSProcessRecordAllThreads + 452940
1  EnviaFloresStore               0x102a3da5c CLSProcessRecordAllThreads + 453940
2  EnviaFloresStore               0x102a2d2d4 CLSHandler + 386476
3  EnviaFloresStore               0x102a28cfc CLSMachExceptionServer + 368596
4  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
5  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#4. AVAudioSession Notify Thread
0  libsystem_pthread.dylib        0x19d66ecb0 pthread_mutex_lock + 102
1  CoreFoundation                 0x19d8d6864 __CFRunLoopRun + 1532
2  CoreFoundation                 0x19d8d5f40 CFRunLoopRunSpecific + 480
3  AVFAudio                       0x1aa87df70 GenericRunLoopThread::Entry(void*) + 160
4  AVFAudio                       0x1aa8cf1fc CAPThread::Entry(CAPThread*) + 208
5  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
6  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#5. com.apple.CoreMotion.MotionThread
0  libsystem_kernel.dylib         0x19d728c04 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19d728020 mach_msg + 76
2  CoreFoundation                 0x19d8db964 __CFRunLoopServiceMachPort + 220
3  CoreFoundation                 0x19d8d67fc __CFRunLoopRun + 1428
4  CoreFoundation                 0x19d8d5f40 CFRunLoopRunSpecific + 480
5  CoreFoundation                 0x19d8d6c70 CFRunLoopRun + 64
6  CoreMotion                     0x1aa73d704 CLClientCreateIso6709Notation + 149508
7  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
8  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#6. JavaScriptCore bmalloc scavenger
0  libsystem_kernel.dylib         0x19d74accc __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x19d66d21c _pthread_cond_wait + 676
2  libc++.1.dylib                 0x19d79fd04 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3  JavaScriptCore                 0x1acb3b37c void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 104
4  JavaScriptCore                 0x1acb3ede0 bmalloc::Scavenger::threadRunLoop() + 196
5  JavaScriptCore                 0x1acb3ead8 bmalloc::Scavenger::Scavenger(std::__1::lock_guard<bmalloc::Mutex>&) + 14
6  JavaScriptCore                 0x1acb3fe1c std::__1::__thread_specific_ptr<std::__1::__thread_struct>::set_pointer(std::__1::__thread_struct*) + 42
7  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
8  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#7. WebThread
0  libsystem_kernel.dylib         0x19d728c04 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19d728020 mach_msg + 76
2  CoreFoundation                 0x19d8db964 __CFRunLoopServiceMachPort + 220
3  CoreFoundation                 0x19d8d67fc __CFRunLoopRun + 1428
4  CoreFoundation                 0x19d8d5f40 CFRunLoopRunSpecific + 480
5  WebCore                        0x1a5ab0820 RunWebThread(void*) + 564
6  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
7  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#8. Thread
0  libdispatch.dylib              0x19d615d8c _dispatch_workloop_worker_thread + 176
1  libsystem_pthread.dylib        0x19d66b6d0 _pthread_wqthread + 280
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#9. APMIdentityWorkerQueue
0  libsystem_kernel.dylib         0x19d728c04 mach_msg_trap + 8
1  libsystem_kernel.dylib         0x19d728020 mach_msg + 76
2  libdispatch.dylib              0x19d61b510 _dispatch_mach_send_and_wait_for_reply + 556
3  libdispatch.dylib              0x19d61b904 dispatch_mach_send_with_result_and_wait_for_reply + 56
4  libxpc.dylib                   0x19d55b594 xpc_connection_send_message_with_reply_sync + 240
5  Foundation                     0x19de611fc __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 16
6  Foundation                     0x19dc27090 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2704
7  CoreFoundation                 0x19d964d6c ___forwarding___ + 596
8  CoreFoundation                 0x19d9673a0 _CF_forwarding_prep_0 + 96
9  CoreServices                   0x19df4b0a0 -[LSApplicationWorkspace deviceIdentifierForAdvertising] + 196
10 AdSupport                      0x1b685adac -[ASIdentifierManager advertisingIdentifier] + 60
11 EnviaFloresStore               0x102ae2cd8 -[APMASIdentifierManager advertisingIdentifierString] + 1130416
12 EnviaFloresStore               0x102aabb0c __32-[APMIdentity updateIdentifiers]_block_invoke + 904676
13 libdispatch.dylib              0x19d604b7c _dispatch_call_block_and_release + 32
14 libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
15 libdispatch.dylib              0x19d60c450 _dispatch_lane_serial_drain + 568
16 libdispatch.dylib              0x19d60ce7c _dispatch_lane_invoke + 368
17 libdispatch.dylib              0x19d615f20 _dispatch_workloop_worker_thread + 580
18 libsystem_pthread.dylib        0x19d66b6d0 _pthread_wqthread + 280
19 libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#10. Thread
0  libsystem_pthread.dylib        0x19d6719e0 start_wqthread + 178

#11. Thread
0  libsystem_pthread.dylib        0x19d6719e0 start_wqthread + 178

#12. Realm notification listener
0  libsystem_kernel.dylib         0x19d74c9dc kevent + 8
1  Realm                          0x104ddf35c realm::_impl::ExternalCommitHelper::listen() + 160
2  Realm                          0x104ddfe30 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >(void*) + 52
3  libsystem_pthread.dylib        0x19d669840 _pthread_start + 168
4  libsystem_pthread.dylib        0x19d6719f4 thread_start + 8

#13. com.apple.root.default-qos.overcommit
0  libsystem_kernel.dylib         0x19d74ca2c kevent_id + 8
1  libdispatch.dylib              0x19d622c74 _dispatch_kq_poll + 332
2  libdispatch.dylib              0x19d62363c _dispatch_event_loop_wait_for_ownership + 416
3  libdispatch.dylib              0x19d612a90 __DISPATCH_WAIT_FOR_QUEUE__ + 308
4  libdispatch.dylib              0x19d612698 _dispatch_sync_f_slow + 144
5  EnviaFloresStore               0x102aaac2c -[APMIdentity appInstanceID] + 900868
6  EnviaFloresStore               0x102a8cadc -[APMESDKProperty proto] + 777652
7  EnviaFloresStore               0x102a88dc4 -[APMEExperimentRequestBuilder request] + 762012
8  EnviaFloresStore               0x102a8e6fc -[APMETaskManager fetchExperiments] + 784852
9  EnviaFloresStore               0x102a8e6a4 __59-[APMETaskManager scheduleFetchingExperimentsOnWorkerQueue]_block_invoke + 784764
10 libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
11 libdispatch.dylib              0x19d608758 _dispatch_continuation_pop + 408
12 libdispatch.dylib              0x19d618f18 _dispatch_source_invoke2 + 892
13 libdispatch.dylib              0x19d6188c4 _dispatch_source_invoke + 428
14 libdispatch.dylib              0x19d614bd4 _dispatch_root_queue_drain + 348
15 libdispatch.dylib              0x19d615384 _dispatch_worker_thread2 + 120
16 libsystem_pthread.dylib        0x19d66b690 _pthread_wqthread + 216
17 libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#14. com.apple.CFNetwork.Connection
0  libsystem_c.dylib              0x19d5c1048 __sfvwrite + 220
1  libsystem_c.dylib              0x19d5c843c __vfprintf + 8660
2  libsystem_c.dylib              0x19d5e9d50 __v2printf + 396
3  libsystem_c.dylib              0x19d5c5f64 _vasprintf + 220
4  libsystem_c.dylib              0x19d5be840 asprintf + 72
5  libnetwork.dylib               0x19ff6e3fc nw_path_copy_description + 536
6  libnetwork.dylib               0x19ff6e1ac -[NWConcrete_nw_path description] + 16
7  Foundation                     0x19dd36ca0 _NS_os_log_callback + 288
8  libsystem_trace.dylib          0x19d53a144 _os_log_fmt_flatten_NSCF + 64
9  libsystem_trace.dylib          0x19d5398f0 _os_log_fmt_flatten_object + 216
10 libsystem_trace.dylib          0x19d546790 _os_log_impl_flatten_and_send + 1872
11 libnetwork.dylib               0x19fc97ba8 nw_endpoint_handler_cancel + 744
12 libnetwork.dylib               0x19fea76d8 __nw_connection_cancel_inner_block_invoke + 1020
13 libnetwork.dylib               0x1a0001160 nw_queue_context_async_if_needed + 92
14 libnetwork.dylib               0x19fea7088 nw_connection_cancel + 228
15 CFNetwork                      0x1a0c85a10 CFURLDownloadCancel + 64132
16 CFNetwork                      0x1a0c5ae64 _CreateCanonicalURL + 4528
17 CFNetwork                      0x1a0c5b2a4 _CreateCanonicalURL + 5616
18 libdispatch.dylib              0x19d604b7c _dispatch_call_block_and_release + 32
19 libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
20 libdispatch.dylib              0x19d60c450 _dispatch_lane_serial_drain + 568
21 libdispatch.dylib              0x19d60ceb4 _dispatch_lane_invoke + 424
22 libdispatch.dylib              0x19d60dfd0 _dispatch_workloop_invoke2 + 572
23 libdispatch.dylib              0x19d60daec _dispatch_workloop_invoke + 428
24 libdispatch.dylib              0x19d615f20 _dispatch_workloop_worker_thread + 580
25 libsystem_pthread.dylib        0x19d66b6d0 _pthread_wqthread + 280
26 libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#15. Crashed: com.google.GDTCCTUploader
0  libobjc.A.dylib                0x19d693284 objc_retain + 100
1  libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
2  libdispatch.dylib              0x19d6127f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
3  EnviaFloresStore               0x102b1e4b8 -[GDTCCTUploader readyToUploadTarget:conditions:] + 331 (GDTCCTUploader.m:331)
4  EnviaFloresStore               0x102b1972c __52-[GDTCORUploadCoordinator uploadTargets:conditions:]_block_invoke + 120 (GDTCORUploadCoordinator.m:120)
5  libdispatch.dylib              0x19d604b7c _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x19d605fd8 _dispatch_client_callout + 20
7  libdispatch.dylib              0x19d60c450 _dispatch_lane_serial_drain + 568
8  libdispatch.dylib              0x19d60ce7c _dispatch_lane_invoke + 368
9  libdispatch.dylib              0x19d615f20 _dispatch_workloop_worker_thread + 580
10 libsystem_pthread.dylib        0x19d66b6d0 _pthread_wqthread + 280
11 libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#16. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#17. Thread
0  libsystem_pthread.dylib        0x19d6719e0 start_wqthread + 178

#18. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#19. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#20. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#21. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#22. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#23. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8

#24. Thread
0  libsystem_kernel.dylib         0x19d74bab4 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x19d66b71c _pthread_wqthread + 356
2  libsystem_pthread.dylib        0x19d6719e8 start_wqthread + 8
mikehaney24 commented 4 years ago

@fbarraganef What does your Podfile.lock look like?

fbarraganef commented 4 years ago

@mikehaney24 here is:

PODS:
  - AFDateHelper (4.2.7)
  - Alamofire (4.9.1)
  - AlamofireImage (3.6.0):
    - Alamofire (~> 4.9)
  - AWSAuthCore (2.11.1):
    - AWSCore (= 2.11.1)
  - AWSCognitoIdentityProvider (2.11.1):
    - AWSCognitoIdentityProviderASF (= 1.0.1)
    - AWSCore (= 2.11.1)
  - AWSCognitoIdentityProviderASF (1.0.1)
  - AWSCore (2.11.1)
  - AWSMobileClient (2.11.1):
    - AWSAuthCore (= 2.11.1)
    - AWSCognitoIdentityProvider (= 2.11.1)
  - AWSPinpoint (2.11.1):
    - AWSCore (= 2.11.1)
  - Braintree (4.33.0):
    - Braintree/Card (= 4.33.0)
    - Braintree/Core (= 4.33.0)
    - Braintree/PayPal (= 4.33.0)
    - Braintree/UI (= 4.33.0)
  - Braintree/Card (4.33.0):
    - Braintree/Core
  - Braintree/Core (4.33.0)
  - Braintree/PaymentFlow (4.33.0):
    - Braintree/Card
    - Braintree/Core
    - Braintree/PayPalOneTouch
  - Braintree/PayPal (4.33.0):
    - Braintree/Core
    - Braintree/PayPalOneTouch
  - Braintree/PayPalDataCollector (4.33.0):
    - Braintree/Core
    - Braintree/PayPalUtils
  - Braintree/PayPalOneTouch (4.33.0):
    - Braintree/Core
    - Braintree/PayPalDataCollector
    - Braintree/PayPalUtils
  - Braintree/PayPalUtils (4.33.0)
  - Braintree/UI (4.33.0):
    - Braintree/Card
    - Braintree/Core
  - Braintree/UnionPay (4.33.0):
    - Braintree/Card
    - Braintree/Core
  - BraintreeDropIn (8.1.0):
    - BraintreeDropIn/DropIn (= 8.1.0)
  - BraintreeDropIn/DropIn (8.1.0):
    - Braintree/Card (~> 4.32)
    - Braintree/Core (~> 4.32)
    - Braintree/PaymentFlow (~> 4.32)
    - Braintree/PayPal (~> 4.32)
    - Braintree/UnionPay (~> 4.32)
    - BraintreeDropIn/UIKit
  - BraintreeDropIn/UIKit (8.1.0)
  - CardIO (5.4.1)
  - Crashlytics (3.14.0):
    - Fabric (~> 1.10.2)
  - CreditCardValidator (0.4)
  - DropDown (2.3.13)
  - DZNEmptyDataSet (1.8.1)
  - EasyPeasy (1.9.0)
  - EmarsysNotificationService (2.5.0)
  - EmarsysSDK (2.0.0)
  - Fabric (1.10.2)
  - FacebookCore (0.9.0):
    - FBSDKCoreKit (~> 5.0)
  - FacebookLogin (0.9.0):
    - FacebookCore (~> 0.9.0)
    - FBSDKCoreKit (~> 5.0)
    - FBSDKLoginKit (~> 5.0)
  - FacebookShare (0.9.0):
    - FacebookCore (~> 0.9.0)
    - FBSDKCoreKit (~> 5.0)
    - FBSDKShareKit (~> 5.0)
  - FBSDKCoreKit (5.15.1):
    - FBSDKCoreKit/Basics (= 5.15.1)
    - FBSDKCoreKit/Core (= 5.15.1)
  - FBSDKCoreKit/Basics (5.15.1)
  - FBSDKCoreKit/Core (5.15.1):
    - FBSDKCoreKit/Basics
  - FBSDKLoginKit (5.15.1):
    - FBSDKLoginKit/Login (= 5.15.1)
  - FBSDKLoginKit/Login (5.15.1):
    - FBSDKCoreKit (~> 5.0)
  - FBSDKShareKit (5.15.1):
    - FBSDKShareKit/Share (= 5.15.1)
  - FBSDKShareKit/Share (5.15.1):
    - FBSDKCoreKit (~> 5.0)
  - Firebase/Core (6.23.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.4.2)
  - Firebase/CoreOnly (6.23.0):
    - FirebaseCore (= 6.6.7)
  - FirebaseAnalytics (6.4.2):
    - FirebaseCore (~> 6.6)
    - FirebaseInstallations (~> 1.2)
    - GoogleAppMeasurement (= 6.4.2)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - FirebaseCore (6.6.7):
    - FirebaseCoreDiagnostics (~> 1.2)
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
  - FirebaseCoreDiagnostics (1.2.4):
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleDataTransportCCTSupport (~> 3.0)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
    - nanopb (~> 0.3.901)
  - FirebaseCoreDiagnosticsInterop (1.2.0)
  - FirebaseInstallations (1.2.0):
    - FirebaseCore (~> 6.6)
    - GoogleUtilities/Environment (~> 6.6)
    - GoogleUtilities/UserDefaults (~> 6.6)
    - PromisesObjC (~> 1.2)
  - FSCalendar (2.8.1)
  - GoogleAppMeasurement (6.4.2):
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - GoogleDataTransport (6.0.0)
  - GoogleDataTransportCCTSupport (3.0.0):
    - GoogleDataTransport (~> 6.0)
    - nanopb (~> 0.3.901)
  - GoogleMaps (3.8.0):
    - GoogleMaps/Maps (= 3.8.0)
  - GoogleMaps/Base (3.8.0)
  - GoogleMaps/Maps (3.8.0):
    - GoogleMaps/Base
  - GooglePlaces (3.8.0):
    - GoogleMaps/Base (= 3.8.0)
  - GoogleUtilities/AppDelegateSwizzler (6.6.0):
    - GoogleUtilities/Environment
    - GoogleUtilities/Logger
    - GoogleUtilities/Network
  - GoogleUtilities/Environment (6.6.0):
    - PromisesObjC (~> 1.2)
  - GoogleUtilities/Logger (6.6.0):
    - GoogleUtilities/Environment
  - GoogleUtilities/MethodSwizzler (6.6.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/Network (6.6.0):
    - GoogleUtilities/Logger
    - "GoogleUtilities/NSData+zlib"
    - GoogleUtilities/Reachability
  - "GoogleUtilities/NSData+zlib (6.6.0)"
  - GoogleUtilities/Reachability (6.6.0):
    - GoogleUtilities/Logger
  - GoogleUtilities/UserDefaults (6.6.0):
    - GoogleUtilities/Logger
  - ImageSlideshow (1.8.3):
    - ImageSlideshow/Core (= 1.8.3)
  - ImageSlideshow/Alamofire (1.8.3):
    - AlamofireImage (~> 3.0)
    - ImageSlideshow/Core
  - ImageSlideshow/Core (1.8.3)
  - KeychainSwift (19.0.0)
  - M13Checkbox (3.4.0)
  - MBProgressHUD (1.1.0)
  - nanopb (0.3.9011):
    - nanopb/decode (= 0.3.9011)
    - nanopb/encode (= 0.3.9011)
  - nanopb/decode (0.3.9011)
  - nanopb/encode (0.3.9011)
  - PromisesObjC (1.2.8)
  - Realm (4.4.1):
    - Realm/Headers (= 4.4.1)
  - Realm/Headers (4.4.1)
  - RealmSwift (4.4.1):
    - Realm (= 4.4.1)
  - SCLAlertView (0.8)
  - SkyFloatingLabelTextField (3.8.0)
  - SwiftMessages (5.0.1):
    - SwiftMessages/App (= 5.0.1)
  - SwiftMessages/App (5.0.1)
  - SwiftyJSON (5.0.0)
  - Wormholy (1.6.0)

DEPENDENCIES:
  - AFDateHelper (~> 4.2.2)
  - Alamofire
  - AlamofireImage (~> 3.1)
  - AWSCore (~> 2.11.0)
  - AWSMobileClient (~> 2.11.0)
  - AWSPinpoint (~> 2.11.0)
  - Braintree
  - BraintreeDropIn
  - CardIO
  - Crashlytics
  - CreditCardValidator
  - DropDown (~> 2.3.4)
  - DZNEmptyDataSet
  - EasyPeasy
  - EmarsysNotificationService
  - EmarsysSDK (~> 2.0.0)
  - Fabric
  - FacebookCore
  - FacebookLogin
  - FacebookShare
  - Firebase/Core
  - FSCalendar
  - GoogleMaps
  - GooglePlaces
  - ImageSlideshow
  - ImageSlideshow/Alamofire
  - KeychainSwift
  - M13Checkbox
  - MBProgressHUD (~> 1.1.0)
  - RealmSwift
  - SCLAlertView
  - SkyFloatingLabelTextField (~> 3.0)
  - SwiftMessages (~> 5.0.1)
  - SwiftyJSON
  - Wormholy

SPEC REPOS:
  trunk:
    - AFDateHelper
    - Alamofire
    - AlamofireImage
    - AWSAuthCore
    - AWSCognitoIdentityProvider
    - AWSCognitoIdentityProviderASF
    - AWSCore
    - AWSMobileClient
    - AWSPinpoint
    - Braintree
    - BraintreeDropIn
    - CardIO
    - Crashlytics
    - CreditCardValidator
    - DropDown
    - DZNEmptyDataSet
    - EasyPeasy
    - EmarsysNotificationService
    - EmarsysSDK
    - Fabric
    - FacebookCore
    - FacebookLogin
    - FacebookShare
    - FBSDKCoreKit
    - FBSDKLoginKit
    - FBSDKShareKit
    - Firebase
    - FirebaseAnalytics
    - FirebaseCore
    - FirebaseCoreDiagnostics
    - FirebaseCoreDiagnosticsInterop
    - FirebaseInstallations
    - FSCalendar
    - GoogleAppMeasurement
    - GoogleDataTransport
    - GoogleDataTransportCCTSupport
    - GoogleMaps
    - GooglePlaces
    - GoogleUtilities
    - ImageSlideshow
    - KeychainSwift
    - M13Checkbox
    - MBProgressHUD
    - nanopb
    - PromisesObjC
    - Realm
    - RealmSwift
    - SCLAlertView
    - SkyFloatingLabelTextField
    - SwiftMessages
    - SwiftyJSON
    - Wormholy

SPEC CHECKSUMS:
  AFDateHelper: 4ad66fb19503041fbba8a3018cb7ef9c71b2ff88
  Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
  AlamofireImage: be9963c6582d68b39e89191f64c82a7d7bf40fdd
  AWSAuthCore: 23545c33485f2e92acde3e7458e6ee07410e7f28
  AWSCognitoIdentityProvider: 81fe83bd5b05151250346eedbabdb055b509d439
  AWSCognitoIdentityProviderASF: f94f1a502e72ef3d0a1de93e10bf7a79c8698118
  AWSCore: 00093a1ff49b5d6ce5f1e4d83fe301486fc5034d
  AWSMobileClient: 1acbe6ae32ebe5899425ac33d89491e4608da393
  AWSPinpoint: a4c6d6b4c5d18a0798dedfd5e45c4a401cc4062e
  Braintree: 586e4d274398fabe9d70ab790eefca41660b8a17
  BraintreeDropIn: fc3e96a8a2b5416e5e3a3beba119f0089713bc1e
  CardIO: 56983b39b62f495fc6dae9ad7cf875143df06443
  Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df
  CreditCardValidator: 9f0814dd61682c004071a250d89327ca83514a48
  DropDown: 8a2116376c1981888557f72ec2ffc9a5e0e456ec
  DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
  EasyPeasy: 19a84ef8f8bbcf925b9fecc29d1d78b7dab96718
  EmarsysNotificationService: 9ca38a2d0586cc282596a1abe25fb1de923addad
  EmarsysSDK: cc01fff9847cfd61be4479f7d1061edc08f10d0d
  Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74
  FacebookCore: ba86524b66cfa86d0f8e65d08faa8504a9f732dd
  FacebookLogin: 6cee9fd6e1fe976fe8f7eec199e27b28b14f5d63
  FacebookShare: 85968ad1b1606c4944fb154924e425fd29184ea5
  FBSDKCoreKit: 1d5acf7c9d7a2f92bb1a242dc60cae5b7adb91df
  FBSDKLoginKit: f1ea8026a58b52d30c9f2e6a58ca7d813619fb83
  FBSDKShareKit: 259737eab3cc807087374553abdf588b3096ba55
  Firebase: 585ae467b3edda6a5444e788fda6888f024d8d6f
  FirebaseAnalytics: 558f7a03d19de451093032c806f39d5f9dff096e
  FirebaseCore: a2788a0d5f6c1dff17b8f79b4a73654a8d4bfdbd
  FirebaseCoreDiagnostics: b59c024493a409f8aecba02c99928d0d8431d159
  FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850
  FirebaseInstallations: 2119fb3e46b0a88bfdbf12562f855ee3252462fa
  FSCalendar: 5245140456fcbcac5824c203b98bd8068bdfee1a
  GoogleAppMeasurement: 2253e99c1f22638cf234c059144660c338ad76c3
  GoogleDataTransport: 061fe7d9b476710e3cd8ea51e8e07d8b67c2b420
  GoogleDataTransportCCTSupport: 0f39025e8cf51f168711bd3fb773938d7e62ddb5
  GoogleMaps: 7c8d66d70e4e8c300f43a7219d8fdaad7b325a9a
  GooglePlaces: d5f70c3e9e427964fdeca1301a665d276ccd8754
  GoogleUtilities: 39530bc0ad980530298e9c4af8549e991fd033b1
  ImageSlideshow: 4694d7d699a1549582e7cc631fb392d8f91630f3
  KeychainSwift: a06190cf933ad46b1e0abc3d77d29c06331715c7
  M13Checkbox: 6f59404540ac98ba83a3d1afac335895a40c6a5d
  MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
  nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
  PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
  Realm: 4eb04d7487bd43c0581256f40b424eafb711deff
  RealmSwift: 3eb8924ff7100df5928c7602f71d0fec51e7c9c5
  SCLAlertView: 6a77bb2edfc65e04dbe57725546cb4107a506b85
  SkyFloatingLabelTextField: 5a338412114808e961fe2d14ea2c5452c8b6e4aa
  SwiftMessages: 32ce3cfc8388b41aae56ff4853cc752a20101147
  SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7
  Wormholy: f52cd3c384fb49ae3e8fdb2b1398b66746a65104

PODFILE CHECKSUM: 56e990c075544bbf6984dc72e9f8362e2653fc81

COCOAPODS: 1.9.1
fbarraganef commented 4 years ago

Screen Shot 2020-04-23 at 13 27 56

fbarraganef commented 4 years ago

com.enviaflores.ios_issue_crash_b34dca04e0b046dbac68c793010ec882_DNE_0_v2.txt com.enviaflores.ios_issue_crash_7278526390d34b97aa493f8f46f35aeb_DNE_0_v2.txt

Here is the crash files received using crashlytics.

morganchen12 commented 4 years ago

Looks like this may be a bug in GDT-latest based on @fbarraganef's stack trace and Podfile.lock.

mikehaney24 commented 4 years ago

I'm not sure that this crash is in GDT 6.0. The line numbers correspond to the previous crash, and the line numbers are different because of the change to fix it.

@fbarraganef Are you sure the version of the app for the issue you're reporting shipped with the GDT changes? Line 331 isn't a line of code in the most recent version.

image

fbarraganef commented 4 years ago

@mikehaney24 yes, It's the same framework version shipped to the production app. A few days ago I updated the production app and I also update the pods, after that i started to receive such error reports.

The Podfile.lock from previous version app in production is:

PODS:

DEPENDENCIES:

SPEC REPOS: trunk:

SPEC CHECKSUMS: AFDateHelper: 4ad66fb19503041fbba8a3018cb7ef9c71b2ff88 Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18 AlamofireImage: be9963c6582d68b39e89191f64c82a7d7bf40fdd CardIO: 56983b39b62f495fc6dae9ad7cf875143df06443 Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df CreditCardValidator: 9f0814dd61682c004071a250d89327ca83514a48 DropDown: 8a2116376c1981888557f72ec2ffc9a5e0e456ec DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7 EasyPeasy: 19a84ef8f8bbcf925b9fecc29d1d78b7dab96718 EmarsysSDK: cc01fff9847cfd61be4479f7d1061edc08f10d0d Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74 FacebookCore: ba86524b66cfa86d0f8e65d08faa8504a9f732dd FacebookLogin: 6cee9fd6e1fe976fe8f7eec199e27b28b14f5d63 FacebookShare: 85968ad1b1606c4944fb154924e425fd29184ea5 FBSDKCoreKit: 1d5acf7c9d7a2f92bb1a242dc60cae5b7adb91df FBSDKLoginKit: f1ea8026a58b52d30c9f2e6a58ca7d813619fb83 FBSDKShareKit: 259737eab3cc807087374553abdf588b3096ba55 Firebase: f378c80340dd41c0ad0914af740c021eb282a04b FirebaseAnalytics: a1a0b3327ceb5cd5b4bacffdb293f6c909aa087d FirebaseCore: 9f495d3afacb7b558711e6218ebb14b1c51b5802 FirebaseCoreDiagnostics: e9b4cd8ba60dee0f2d13347332e4b7898cca5b61 FirebaseCoreDiagnosticsInterop: 296e2c5f5314500a850ad0b83e9e7c10b011a850 FirebaseInstallations: acb3216eb9784d3b1d2d2d635ff74fa892cc0c44 FSCalendar: 5245140456fcbcac5824c203b98bd8068bdfee1a GoogleAppMeasurement: 6e68a94d0eaeb1d73ef6b0ed4f7334e29d63ae29 GoogleDataTransport: b29a21d813e906014ca16c00897827e40e4a24ab GoogleDataTransportCCTSupport: 6f15a89b0ca35d6fa523e1f752ef818588885988 GoogleMaps: 7c8d66d70e4e8c300f43a7219d8fdaad7b325a9a GooglePlaces: d5f70c3e9e427964fdeca1301a665d276ccd8754 GoogleUtilities: ad0f3b691c67909d03a3327cc205222ab8f42e0e ImageSlideshow: 4694d7d699a1549582e7cc631fb392d8f91630f3 KeychainSwift: a06190cf933ad46b1e0abc3d77d29c06331715c7 M13Checkbox: 6f59404540ac98ba83a3d1afac335895a40c6a5d MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9 nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 Realm: e125f464884cda953ebefe70c671b75b03b81b9b RealmSwift: 33656a42bd300959a081fc13347376bc478071af SCLAlertView: 6a77bb2edfc65e04dbe57725546cb4107a506b85 SkyFloatingLabelTextField: 5a338412114808e961fe2d14ea2c5452c8b6e4aa SwiftMessages: 32ce3cfc8388b41aae56ff4853cc752a20101147 SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7

PODFILE CHECKSUM: e99048d7338aafd749dad0d6d3823283368baffa

COCOAPODS: 1.9.1

mikehaney24 commented 4 years ago

How many instances of this crash are you seeing? Is it possible that the app version was incremented and a build created (maybe to QA folks) while still on the old cocoapods?

fbarraganef commented 4 years ago

Screen Shot 2020-04-23 at 16 34 10

I don't think so, because the pods was updated many times before the version increment to these specific version numbers.

awojnowski commented 4 years ago

+1

App update released yesterday with Firebase updated and seeing thousands of crashes in production. No further details other than a stack trace.

awojnowski commented 4 years ago

Pod installations are as follows:

- Firebase/Analytics (6.22.0):
    - Firebase/Core
  - Firebase/Core (6.22.0):
    - Firebase/CoreOnly
    - FirebaseAnalytics (= 6.4.1)
  - Firebase/CoreOnly (6.22.0):
    - FirebaseCore (= 6.6.6)
  - FirebaseAnalytics (6.4.1):
    - FirebaseCore (~> 6.6)
    - FirebaseInstallations (~> 1.1)
    - GoogleAppMeasurement (= 6.4.1)
    - GoogleUtilities/AppDelegateSwizzler (~> 6.0)
    - GoogleUtilities/MethodSwizzler (~> 6.0)
    - GoogleUtilities/Network (~> 6.0)
    - "GoogleUtilities/NSData+zlib (~> 6.0)"
    - nanopb (= 0.3.9011)
  - FirebaseCore (6.6.6):
    - FirebaseCoreDiagnostics (~> 1.2)
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
  - FirebaseCoreDiagnostics (1.2.3):
    - FirebaseCoreDiagnosticsInterop (~> 1.2)
    - GoogleDataTransportCCTSupport (~> 2.0)
    - GoogleUtilities/Environment (~> 6.5)
    - GoogleUtilities/Logger (~> 6.5)
    - nanopb (~> 0.3.901)
  - FirebaseCoreDiagnosticsInterop (1.2.0)
  - FirebaseInstallations (1.1.1):
    - FirebaseCore (~> 6.6)
    - GoogleUtilities/UserDefaults (~> 6.5)
    - PromisesObjC (~> 1.2)
Screen Shot 2020-04-24 at 10 21 38 AM
Crashed: com.google.GDTCCTUploader
0  libobjc.A.dylib                0x1b78b3284 objc_retain + 100
1  libdispatch.dylib              0x1b7825fd8 _dispatch_client_callout + 20
2  libdispatch.dylib              0x1b78327f4 _dispatch_lane_barrier_sync_invoke_and_complete + 60
3  Musi                           0x1030dcfbc -[GDTCCTUploader readyToUploadTarget:conditions:] + 331 (GDTCCTUploader.m:331)
4  Musi                           0x1030d8230 __52-[GDTCORUploadCoordinator uploadTargets:conditions:]_block_invoke + 120 (GDTCORUploadCoordinator.m:120)
5  libdispatch.dylib              0x1b7824b7c _dispatch_call_block_and_release + 32
6  libdispatch.dylib              0x1b7825fd8 _dispatch_client_callout + 20
7  libdispatch.dylib              0x1b782c450 _dispatch_lane_serial_drain + 568
8  libdispatch.dylib              0x1b782ce7c _dispatch_lane_invoke + 368
9  libdispatch.dylib              0x1b7835f20 _dispatch_workloop_worker_thread + 580
10 libsystem_pthread.dylib        0x1b788b6d0 _pthread_wqthread + 280
11 libsystem_pthread.dylib        0x1b78919e8 start_wqthread + 8
Screen Shot 2020-04-24 at 10 21 44 AM
Crashed: com.google.GDTCCTUploader
0  libobjc.A.dylib                0x1914ea9bc objc_retain + 76
1  Musi                           0x1041a1038 __49-[GDTCCTUploader readyToUploadTarget:conditions:]_block_invoke + 281 (GDTCCTUploader.m:281)
2  libdispatch.dylib              0x191473524 _dispatch_client_callout + 16
3  libdispatch.dylib              0x1914260b0 _dispatch_lane_barrier_sync_invoke_and_complete + 56
4  Musi                           0x1041a0fbc -[GDTCCTUploader readyToUploadTarget:conditions:] + 331 (GDTCCTUploader.m:331)
5  Musi                           0x10419c230 __52-[GDTCORUploadCoordinator uploadTargets:conditions:]_block_invoke + 120 (GDTCORUploadCoordinator.m:120)
6  libdispatch.dylib              0x1914729a8 _dispatch_call_block_and_release + 24
7  libdispatch.dylib              0x191473524 _dispatch_client_callout + 16
8  libdispatch.dylib              0x19141f8a4 _dispatch_lane_serial_drain$VARIANT$mp + 608
9  libdispatch.dylib              0x191420294 _dispatch_lane_invoke$VARIANT$mp + 416
10 libdispatch.dylib              0x19142978c _dispatch_workloop_worker_thread + 588
11 libsystem_pthread.dylib        0x1914c4b74 _pthread_wqthread + 272
12 libsystem_pthread.dylib        0x1914c7740 start_wqthread + 8
mikehaney24 commented 4 years ago

How are y'all integrating with Firebase? Is anyone building Firebase as dynamic frameworks?

awojnowski commented 4 years ago

@mikehaney24 We integrate through Cocoapods.

fbarraganef commented 4 years ago

@mikehaney24 no, I'm integrating with Cocoapods.

mikehaney24 commented 4 years ago

@fbarraganef Can you copy and paste your copy of the file GDTCCTUploader.m?

mikehaney24 commented 4 years ago

@awojnowski The updated pods should have fixed that issue (#5312). This issue is for those experiencing identical crashes after having upgraded to GoogleDataTransport >= 6.0.0 and GoogleDataTransportCCTSupport >= 3.0.0

fbarraganef commented 4 years ago

@fbarraganef Can you copy and paste your copy of the file GDTCCTUploader.m?

/*
 * Copyright 2019 Google
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import "GDTCCTLibrary/Private/GDTCCTUploader.h"

#import <GoogleDataTransport/GDTCORConsoleLogger.h>
#import <GoogleDataTransport/GDTCORPlatform.h>
#import <GoogleDataTransport/GDTCORRegistrar.h>

#import <nanopb/pb.h>
#import <nanopb/pb_decode.h>
#import <nanopb/pb_encode.h>

#import "GDTCCTLibrary/Private/GDTCCTCompressionHelper.h"
#import "GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h"
#import "GDTCCTLibrary/Private/GDTCCTPrioritizer.h"

#import "GDTCCTLibrary/Protogen/nanopb/cct.nanopb.h"

#ifdef GDTCCTSUPPORT_VERSION
#define STR(x) STR_EXPAND(x)
#define STR_EXPAND(x) #x
static NSString *const kGDTCCTSupportSDKVersion = @STR(GDTCCTSUPPORT_VERSION);
#else
static NSString *const kGDTCCTSupportSDKVersion = @"UNKNOWN";
#endif  // GDTCCTSUPPORT_VERSION

#if !NDEBUG
NSNotificationName const GDTCCTUploadCompleteNotification = @"com.GDTCCTUploader.UploadComplete";
#endif  // #if !NDEBUG

@interface GDTCCTUploader () <NSURLSessionDelegate>

// Redeclared as readwrite.
@property(nullable, nonatomic, readwrite) NSURLSessionUploadTask *currentTask;

@end

@implementation GDTCCTUploader

+ (void)load {
  GDTCCTUploader *uploader = [GDTCCTUploader sharedInstance];
  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetCCT];
  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetFLL];
  [[GDTCORRegistrar sharedInstance] registerUploader:uploader target:kGDTCORTargetCSH];
}

+ (instancetype)sharedInstance {
  static GDTCCTUploader *sharedInstance;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    sharedInstance = [[GDTCCTUploader alloc] init];
  });
  return sharedInstance;
}

- (instancetype)init {
  self = [super init];
  if (self) {
    _uploaderQueue = dispatch_queue_create("com.google.GDTCCTUploader", DISPATCH_QUEUE_SERIAL);
    NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
    _uploaderSession = [NSURLSession sessionWithConfiguration:config
                                                     delegate:self
                                                delegateQueue:nil];
  }
  return self;
}

/**
 *
 */
- (nullable NSURL *)serverURLForTarget:(GDTCORTarget)target {
  // These strings should be interleaved to construct the real URL. This is just to (hopefully)
  // fool github URL scanning bots.
  static NSURL *CCTServerURL;
  static dispatch_once_t CCTOnceToken;
  dispatch_once(&CCTOnceToken, ^{
    const char *p1 = "hts/frbslgiggolai.o/0clgbth";
    const char *p2 = "tp:/ieaeogn.ogepscmvc/o/ac";
    const char URL[54] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],  p1[4],
                          p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],  p1[8],  p2[8],
                          p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11], p1[12], p2[12], p1[13],
                          p2[13], p1[14], p2[14], p1[15], p2[15], p1[16], p2[16], p1[17], p2[17],
                          p1[18], p2[18], p1[19], p2[19], p1[20], p2[20], p1[21], p2[21], p1[22],
                          p2[22], p1[23], p2[23], p1[24], p2[24], p1[25], p2[25], p1[26], '\0'};
    CCTServerURL = [NSURL URLWithString:[NSString stringWithUTF8String:URL]];
  });

  static NSURL *FLLServerURL;
  static dispatch_once_t FLLOnceToken;
  dispatch_once(&FLLOnceToken, ^{
    const char *p1 = "hts/frbslgigp.ogepscmv/ieo/eaybtho";
    const char *p2 = "tp:/ieaeogn-agolai.o/1frlglgc/aclg";
    const char URL[69] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],  p1[4],
                          p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],  p1[8],  p2[8],
                          p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11], p1[12], p2[12], p1[13],
                          p2[13], p1[14], p2[14], p1[15], p2[15], p1[16], p2[16], p1[17], p2[17],
                          p1[18], p2[18], p1[19], p2[19], p1[20], p2[20], p1[21], p2[21], p1[22],
                          p2[22], p1[23], p2[23], p1[24], p2[24], p1[25], p2[25], p1[26], p2[26],
                          p1[27], p2[27], p1[28], p2[28], p1[29], p2[29], p1[30], p2[30], p1[31],
                          p2[31], p1[32], p2[32], p1[33], p2[33], '\0'};
    FLLServerURL = [NSURL URLWithString:[NSString stringWithUTF8String:URL]];
  });

  static NSURL *CSHServerURL;
  static dispatch_once_t CSHOnceToken;
  dispatch_once(&CSHOnceToken, ^{
    // These strings should be interleaved to construct the real URL. This is just to (hopefully)
    // fool github URL scanning bots.
    const char *p1 = "hts/cahyiseot-agolai.o/1frlglgc/aclg";
    const char *p2 = "tp:/rsltcrprsp.ogepscmv/ieo/eaybtho";
    const char URL[72] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],  p1[4],
                          p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],  p1[8],  p2[8],
                          p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11], p1[12], p2[12], p1[13],
                          p2[13], p1[14], p2[14], p1[15], p2[15], p1[16], p2[16], p1[17], p2[17],
                          p1[18], p2[18], p1[19], p2[19], p1[20], p2[20], p1[21], p2[21], p1[22],
                          p2[22], p1[23], p2[23], p1[24], p2[24], p1[25], p2[25], p1[26], p2[26],
                          p1[27], p2[27], p1[28], p2[28], p1[29], p2[29], p1[30], p2[30], p1[31],
                          p2[31], p1[32], p2[32], p1[33], p2[33], p1[34], p2[34], p1[35], '\0'};
    CSHServerURL = [NSURL URLWithString:[NSString stringWithUTF8String:URL]];
  });

#if !NDEBUG
  if (_testServerURL) {
    return _testServerURL;
  }
#endif  // !NDEBUG

  switch (target) {
    case kGDTCORTargetCCT:
      return CCTServerURL;

    case kGDTCORTargetFLL:
      return FLLServerURL;

    case kGDTCORTargetCSH:
      return CSHServerURL;

    default:
      GDTCORLogDebug(@"GDTCCTUploader doesn't support target %ld", (long)target);
      return nil;
      break;
  }
}

- (NSString *)FLLAndCSHAPIKey {
  static NSString *defaultServerKey;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    // These strings should be interleaved to construct the real key.
    const char *p1 = "AzSBG0honD6A-PxV5nBc";
    const char *p2 = "Iay44Iwtu2vV0AOrz1C";
    const char defaultKey[40] = {p1[0],  p2[0],  p1[1],  p2[1],  p1[2],  p2[2],  p1[3],  p2[3],
                                 p1[4],  p2[4],  p1[5],  p2[5],  p1[6],  p2[6],  p1[7],  p2[7],
                                 p1[8],  p2[8],  p1[9],  p2[9],  p1[10], p2[10], p1[11], p2[11],
                                 p1[12], p2[12], p1[13], p2[13], p1[14], p2[14], p1[15], p2[15],
                                 p1[16], p2[16], p1[17], p2[17], p1[18], p2[18], p1[19], '\0'};
    defaultServerKey = [NSString stringWithUTF8String:defaultKey];
  });
  return defaultServerKey;
}

- (void)uploadPackage:(GDTCORUploadPackage *)package {
  __block GDTCORBackgroundIdentifier bgID = GDTCORBackgroundIdentifierInvalid;
  bgID = [[GDTCORApplication sharedApplication]
      beginBackgroundTaskWithName:@"GDTCCTUploader-upload"
                expirationHandler:^{
                  if (bgID != GDTCORBackgroundIdentifierInvalid) {
                    // Cancel the upload and complete delivery.
                    [self.currentTask cancel];
                    [self.currentUploadPackage completeDelivery];

                    // End the background task.
                    [[GDTCORApplication sharedApplication] endBackgroundTask:bgID];
                  }
                }];

  dispatch_async(_uploaderQueue, ^{
    if (self->_currentTask || self->_currentUploadPackage) {
      GDTCORLogWarning(GDTCORMCWUploadFailed, @"%@",
                       @"An upload shouldn't be initiated with another in progress.");
      return;
    }
    GDTCORTarget target = package.target;
    id completionHandler = ^(NSData *_Nullable data, NSURLResponse *_Nullable response,
                             NSError *_Nullable error) {
      GDTCORLogDebug(@"%@", @"CCT: request completed");
      if (error) {
        GDTCORLogWarning(GDTCORMCWUploadFailed, @"There was an error uploading events: %@", error);
      }
      NSError *decodingError;
      GDTCORClock *futureUploadTime;
      if (data) {
        gdt_cct_LogResponse logResponse = GDTCCTDecodeLogResponse(data, &decodingError);
        if (!decodingError && logResponse.has_next_request_wait_millis) {
          GDTCORLogDebug(
              @"CCT: The backend responded asking to not upload for %lld millis from now.",
              logResponse.next_request_wait_millis);
          futureUploadTime =
              [GDTCORClock clockSnapshotInTheFuture:logResponse.next_request_wait_millis];
        } else if (decodingError) {
          GDTCORLogDebug(@"There was a response decoding error: %@", decodingError);
        }
        pb_release(gdt_cct_LogResponse_fields, &logResponse);
      }
      if (!futureUploadTime) {
        GDTCORLogDebug(@"%@", @"CCT: The backend response failed to parse, so the next request "
                              @"won't occur until 15 minutes from now");
        // 15 minutes from now.
        futureUploadTime = [GDTCORClock clockSnapshotInTheFuture:15 * 60 * 1000];
      }
      switch (target) {
        case kGDTCORTargetCCT:
          self->_CCTNextUploadTime = futureUploadTime;
          break;

        case kGDTCORTargetFLL:
          // Falls through.
        case kGDTCORTargetCSH:
          self->_FLLNextUploadTime = futureUploadTime;
        default:
          break;
      }

      // Only retry if one of these codes is returned, or there was an error.
      if (error || ((NSHTTPURLResponse *)response).statusCode == 429 ||
          ((NSHTTPURLResponse *)response).statusCode == 503) {
        [package retryDeliveryInTheFuture];
      } else {
#if !NDEBUG
        // Post a notification when in DEBUG mode to state how many packages were uploaded. Useful
        // for validation during tests.
        [[NSNotificationCenter defaultCenter] postNotificationName:GDTCCTUploadCompleteNotification
                                                            object:@(package.events.count)];
#endif  // #if !NDEBUG
        GDTCORLogDebug(@"%@", @"CCT: package delivered");
        [package completeDelivery];
      }

      // End the background task if there was one.
      if (bgID != GDTCORBackgroundIdentifierInvalid) {
        [[GDTCORApplication sharedApplication] endBackgroundTask:bgID];
        bgID = GDTCORBackgroundIdentifierInvalid;
      }
      self.currentTask = nil;
      self.currentUploadPackage = nil;
    };
    self->_currentUploadPackage = package;
    NSData *requestProtoData =
        [self constructRequestProtoFromPackage:(GDTCORUploadPackage *)package];
    NSData *gzippedData = [GDTCCTCompressionHelper gzippedData:requestProtoData];
    BOOL usingGzipData = gzippedData != nil && gzippedData.length < requestProtoData.length;
    NSData *dataToSend = usingGzipData ? gzippedData : requestProtoData;
    NSURLRequest *request = [self constructRequestForTarget:target data:dataToSend];
    GDTCORLogDebug(@"CTT: request created: %@", request);
    self.currentTask = [self.uploaderSession uploadTaskWithRequest:request
                                                          fromData:dataToSend
                                                 completionHandler:completionHandler];
    GDTCORLogDebug(@"%@", @"CCT: The upload task is about to begin.");
    [self.currentTask resume];
  });
}

- (BOOL)readyToUploadTarget:(GDTCORTarget)target conditions:(GDTCORUploadConditions)conditions {
  __block BOOL result = NO;
  NSSet *CSHEvents = [[GDTCCTPrioritizer sharedInstance] eventsForTarget:kGDTCORTargetCSH];
  dispatch_sync(_uploaderQueue, ^{
    if (target == kGDTCORTargetCSH) {
      result = CSHEvents.count > 0;
      return;
    }

    if (self->_currentUploadPackage) {
      result = NO;
      GDTCORLogDebug(@"%@", @"CCT: can't upload because a package is in flight");
      return;
    }
    if (self->_currentTask) {
      result = NO;
      GDTCORLogDebug(@"%@", @"CCT: can't upload because a task is in progress");
      return;
    }
    if ((conditions & GDTCORUploadConditionHighPriority) == GDTCORUploadConditionHighPriority) {
      result = YES;
      GDTCORLogDebug(@"%@", @"CCT: a high priority event is allowing an upload");
      return;
    }
    switch (target) {
      case kGDTCORTargetCCT:
        if (self->_CCTNextUploadTime) {
          result = [[GDTCORClock snapshot] isAfter:self->_CCTNextUploadTime];
        }
        break;

      case kGDTCORTargetFLL:
        if (self->_FLLNextUploadTime) {
          result = [[GDTCORClock snapshot] isAfter:self->_FLLNextUploadTime];
        }
        break;

      default:
        // The CSH backend should be handled above.
        break;
    }
    if (result) {
      GDTCORLogDebug(@"CCT: can upload to target %ld because the request wait time has transpired",
                     (long)target);
    } else {
      GDTCORLogDebug(@"CCT: can't upload to target %ld because the backend asked to wait",
                     (long)target);
    }
    result = YES;
    GDTCORLogDebug(@"CCT: can upload to target %ld because nothing is preventing it", (long)target);
  });
  return result;
}

#pragma mark - Private helper methods

/** Constructs data given an upload package.
 *
 * @param package The upload package used to construct the request proto bytes.
 * @return Proto bytes representing a gdt_cct_LogRequest object.
 */
- (nonnull NSData *)constructRequestProtoFromPackage:(GDTCORUploadPackage *)package {
  // Segment the log events by log type.
  NSMutableDictionary<NSString *, NSMutableSet<GDTCOREvent *> *> *logMappingIDToLogSet =
      [[NSMutableDictionary alloc] init];
  [package.events enumerateObjectsUsingBlock:^(GDTCOREvent *_Nonnull event, BOOL *_Nonnull stop) {
    NSMutableSet *logSet = logMappingIDToLogSet[event.mappingID];
    logSet = logSet ? logSet : [[NSMutableSet alloc] init];
    [logSet addObject:event];
    logMappingIDToLogSet[event.mappingID] = logSet;
  }];

  gdt_cct_BatchedLogRequest batchedLogRequest =
      GDTCCTConstructBatchedLogRequest(logMappingIDToLogSet);

  NSData *data = GDTCCTEncodeBatchedLogRequest(&batchedLogRequest);
  pb_release(gdt_cct_BatchedLogRequest_fields, &batchedLogRequest);
  return data ? data : [[NSData alloc] init];
}

/** Constructs a request to FLL given a URL and request body data.
 *
 * @param target The target backend to send the request to.
 * @param data The request body data.
 * @return A new NSURLRequest ready to be sent to FLL.
 */
- (NSURLRequest *)constructRequestForTarget:(GDTCORTarget)target data:(NSData *)data {
  NSURL *URL = [self serverURLForTarget:target];
  NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
  NSString *targetString;
  switch (target) {
    case kGDTCORTargetCCT:
      targetString = @"cct";
      break;

    case kGDTCORTargetFLL:
      targetString = @"fll";
      break;

    case kGDTCORTargetCSH:
      targetString = @"csh";
      break;

    default:
      targetString = @"unknown";
      break;
  }
  NSString *userAgent =
      [NSString stringWithFormat:@"datatransport/%@ %@support/%@ apple/", kGDTCORVersion,
                                 targetString, kGDTCCTSupportSDKVersion];
  if (target == kGDTCORTargetFLL || target == kGDTCORTargetCSH) {
    [request setValue:[self FLLAndCSHAPIKey] forHTTPHeaderField:@"X-Goog-Api-Key"];
  }
  if ([GDTCCTCompressionHelper isGzipped:data]) {
    [request setValue:@"gzip" forHTTPHeaderField:@"Content-Encoding"];
  }
  [request setValue:@"application/x-protobuf" forHTTPHeaderField:@"Content-Type"];
  [request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];
  [request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
  request.HTTPMethod = @"POST";
  [request setHTTPBody:data];
  return request;
}

#pragma mark - GDTCORUploadPackageProtocol

- (void)packageExpired:(GDTCORUploadPackage *)package {
  dispatch_async(_uploaderQueue, ^{
    [self.currentTask cancel];
    self.currentTask = nil;
    self.currentUploadPackage = nil;
  });
}

#pragma mark - GDTCORLifecycleProtocol

- (void)appWillTerminate:(GDTCORApplication *)application {
  dispatch_sync(_uploaderQueue, ^{
    [self.currentTask cancel];
    [self.currentUploadPackage completeDelivery];
  });
}

#pragma mark - NSURLSessionDelegate

- (void)URLSession:(NSURLSession *)session
                          task:(NSURLSessionTask *)task
    willPerformHTTPRedirection:(NSHTTPURLResponse *)response
                    newRequest:(NSURLRequest *)request
             completionHandler:(void (^)(NSURLRequest *_Nullable))completionHandler {
  if (!completionHandler) {
    return;
  }
  if (response.statusCode == 302 || response.statusCode == 301) {
    if ([request.URL isEqual:[self serverURLForTarget:kGDTCORTargetFLL]]) {
      NSURLRequest *newRequest = [self constructRequestForTarget:kGDTCORTargetCCT
                                                            data:task.originalRequest.HTTPBody];
      completionHandler(newRequest);
    }
  } else {
    completionHandler(request);
  }
}

@end
seanLee commented 4 years ago

@mikehaney24 When GoogleDataTransport is 5.1.1 and GoogleDataTransportCCTSupport is 2.0.2,I got the same issue.

mikehaney24 commented 4 years ago

@mikehaney24 When GoogleDataTransport is 5.1.1 and GoogleDataTransportCCTSupport is 2.0.2,I got the same issue.

Yes, that issue is already fixed, as I said above, in #5312

seanLee commented 4 years ago

@mikehaney24 I'am sorry that I have misunderstood your meaning.Now I have both update to new version.Thanks very much.

mikehaney24 commented 4 years ago

@mikehaney24 I'am sorry that I have misunderstood your meaning.Now I have both update to new version.Thanks very much.

No problem! This is a confusing issue.

mikehaney24 commented 4 years ago

@fbarraganef Your file looks correct, so it doesn't really make sense that you're seeing a crash at the given lines. Unfortunately, the only recommendation I have is to pod update and update your app again. We suspect that this report is from an older version of the pods somehow.

awojnowski commented 4 years ago

@mikehaney24 Not the OP but just want to jump in and note that updating fixed this crash for us. Thank you for your quick reply and apologies for the confusion.