firebase-ios-sdk: In-App Messaging serious crash - [NSBundle initWithURL:]: nil URL argument
Describe your environment
- Xcode version: 10.2
- Firebase SDK version: v6.5.0
- Firebase Component: In-App Messaging
- Component version: v0.15.2
Describe the problem
Steps to reproduce:
I created and deployed my first In-App Message dialog. When I tested on my device I did not run into any issues, but after I started the campaign, I started seeing a lot of crashes (approximately 25% of DAU).
Nothing in the stack trace below is from my code, it’s all from the Firebase SDK.
Relevant Code:
No client side code
Stack Trace:
# Crashlytics - plaintext stacktrace downloaded by Sam Bender at Mon, 12 Aug 2019 19:37:35 GMT
# URL: https://fabric.io/sam-bender/ios/apps/com.sambender.traincentric/issues/22358fc98e00f1896dc9af04b5f24613?time=last-twenty-four-hours/sessions/6ce816f32d0b4e06bf3f9ab86b95f458_DNE_0_v2
# Organization: Sam Bender
# Platform: ios
# Application: Train Centric
# Version: 3.5.5 (187)
# Bundle Identifier: com.sambender.TrainCentric
# Issue ID: 22358fc98e00f1896dc9af04b5f24613
# Session ID: 6ce816f32d0b4e06bf3f9ab86b95f458_DNE_0_v2
# Date: 2019-08-12T19:02:00Z
# OS Version: 12.3.1 (16F203)
# Device: iPhone X
# RAM Free: 13.1%
# Disk Free: 13.4%
#9. Crashed: com.twitter.crashlytics.ios.exception
0 TrainCentric 0x1023d1ff0 CLSProcessRecordAllThreads + 376 (CLSProcess.c:376)
1 TrainCentric 0x1023d23d8 CLSProcessRecordAllThreads + 407 (CLSProcess.c:407)
2 TrainCentric 0x1023c1d4c CLSHandler + 26 (CLSHandler.m:26)
3 TrainCentric 0x1023d0604 __CLSExceptionRecord_block_invoke + 199 (CLSException.mm:199)
4 libdispatch.dylib 0x2211357d4 _dispatch_client_callout + 16
5 libdispatch.dylib 0x2211165fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 TrainCentric 0x1023d00a0 CLSExceptionRecord + 206 (CLSException.mm:206)
7 TrainCentric 0x1023cfed4 CLSExceptionRecordNSException + 102 (CLSException.mm:102)
8 TrainCentric 0x1023cfaf0 CLSTerminateHandler() + 259 (CLSException.mm:259)
9 libc++abi.dylib 0x2208c4838 std::__terminate(void (*)()) + 16
10 libc++abi.dylib 0x2208c48c4 std::terminate() + 84
11 libobjc.A.dylib 0x2208cfd5c _destroyAltHandlerList + 10
12 libdispatch.dylib 0x2211357e8 _dispatch_client_callout + 36
13 libdispatch.dylib 0x221106040 _dispatch_once_callout + 28
14 TrainCentric 0x1024340e4 +[FIRIAMDefaultDisplayImpl getViewResourceBundle] + 85 (once.h:85)
15 TrainCentric 0x10243421c +[FIRIAMDefaultDisplayImpl displayCardViewWithMessageDefinition:displayDelegate:] + 75 (FIRIAMDefaultDisplayImpl.m:75)
16 TrainCentric 0x102435100 -[FIRIAMDefaultDisplayImpl displayMessage:displayDelegate:] + 258 (FIRIAMDefaultDisplayImpl.m:258)
17 TrainCentric 0x10241fe84 __55-[FIRIAMDisplayExecutor displayForMessage:triggerType:]_block_invoke + 593 (FIRIAMDisplayExecutor.m:593)
18 TrainCentric 0x102425b84 __63-[FIRIAMMessageContentDataWithImageURL loadImageDataWithBlock:]_block_invoke.23 + 145 (FIRIAMMessageContentDataWithImageURL.m:145)
19 TrainCentric 0x102425ee0 __68-[FIRIAMMessageContentDataWithImageURL fetchImageFromURL:withBlock:]_block_invoke + 176 (FIRIAMMessageContentDataWithImageURL.m:176)
20 CFNetwork 0x221cc9688 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
21 CFNetwork 0x221cdd220 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 176
22 Foundation 0x222159ef8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
23 Foundation 0x2220663e0 -[NSBlockOperation main] + 72
24 Foundation 0x2220658c8 -[__NSOperationInternal _start:] + 740
25 Foundation 0x22215bc7c __NSOQSchedule_f + 272
26 libdispatch.dylib 0x221134a38 _dispatch_call_block_and_release + 24
27 libdispatch.dylib 0x2211357d4 _dispatch_client_callout + 16
28 libdispatch.dylib 0x22110cc34 _dispatch_continuation_pop$VARIANT$armv81 + 404
29 libdispatch.dylib 0x22110c314 _dispatch_async_redirect_invoke + 592
30 libdispatch.dylib 0x2211189d4 _dispatch_root_queue_drain + 340
31 libdispatch.dylib 0x221119248 _dispatch_worker_thread2 + 116
32 libsystem_pthread.dylib 0x2213151b4 _pthread_wqthread + 464
33 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
--
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x2216f527c __exceptionPreprocess
1 libobjc.A.dylib 0x2208cf9f8 objc_exception_throw
2 CoreFoundation 0x2215ff4b0 -[NSCache init]
3 Foundation 0x222090bd4 -[NSBundle initWithURL:]
4 Foundation 0x222090b58 +[NSBundle bundleWithURL:]
5 TrainCentric 0x10243415c __49+[FIRIAMDefaultDisplayImpl getViewResourceBundle]_block_invoke + 61 (FIRIAMDefaultDisplayImpl.m:61)
6 libdispatch.dylib 0x2211357d4 _dispatch_client_callout
7 libdispatch.dylib 0x221106040 _dispatch_once_callout
8 TrainCentric 0x1024340e4 +[FIRIAMDefaultDisplayImpl getViewResourceBundle] + 85 (once.h:85)
9 TrainCentric 0x10243421c +[FIRIAMDefaultDisplayImpl displayCardViewWithMessageDefinition:displayDelegate:] + 75 (FIRIAMDefaultDisplayImpl.m:75)
10 TrainCentric 0x102435100 -[FIRIAMDefaultDisplayImpl displayMessage:displayDelegate:] + 258 (FIRIAMDefaultDisplayImpl.m:258)
11 TrainCentric 0x10241fe84 __55-[FIRIAMDisplayExecutor displayForMessage:triggerType:]_block_invoke + 593 (FIRIAMDisplayExecutor.m:593)
12 TrainCentric 0x102425b84 __63-[FIRIAMMessageContentDataWithImageURL loadImageDataWithBlock:]_block_invoke.23 + 145 (FIRIAMMessageContentDataWithImageURL.m:145)
13 TrainCentric 0x102425ee0 __68-[FIRIAMMessageContentDataWithImageURL fetchImageFromURL:withBlock:]_block_invoke + 176 (FIRIAMMessageContentDataWithImageURL.m:176)
14 CFNetwork 0x221cc9688 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke
15 CFNetwork 0x221cdd220 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke
16 Foundation 0x222159ef8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__
17 Foundation 0x2220663e0 -[NSBlockOperation main]
18 Foundation 0x2220658c8 -[__NSOperationInternal _start:]
19 Foundation 0x22215bc7c __NSOQSchedule_f
20 libdispatch.dylib 0x221134a38 _dispatch_call_block_and_release
21 libdispatch.dylib 0x2211357d4 _dispatch_client_callout
22 libdispatch.dylib 0x22110cc34 _dispatch_continuation_pop$VARIANT$armv81
23 libdispatch.dylib 0x22110c314 _dispatch_async_redirect_invoke
24 libdispatch.dylib 0x2211189d4 _dispatch_root_queue_drain
25 libdispatch.dylib 0x221119248 _dispatch_worker_thread2
26 libsystem_pthread.dylib 0x2213151b4 _pthread_wqthread
27 libsystem_pthread.dylib 0x221317cd4 start_wqthread
#0. com.apple.main-thread
0 CoreFoundation 0x2215e0fc0 -[__NSDictionaryM objectForKey:] + 264
1 SharkORM 0x102aff220 __35-[SharkORM fetchEntitySetForQuery:]_block_invoke + 2093 (SharkORM.m:2093)
2 SharkORM 0x102afe7e4 -[SharkORM performQuery:rowBlock:] + 1988 (SharkORM.m:1988)
3 SharkORM 0x102afef9c -[SharkORM fetchEntitySetForQuery:] + 2075 (SharkORM.m:2075)
4 SharkORM 0x102b9da98 -[SRKQuery fetch] + 448 (SRKQuery.m:448)
5 TrainCentric 0x102356300 specialized BrowseWorkoutsViewController.workouts() + 74 (BrowseWorkoutsViewController.swift:74)
6 TrainCentric 0x10235240c closure #1 in BrowseWorkoutsViewController.viewDidLoad() + 68 (BrowseWorkoutsViewController.swift:68)
7 TrainCentric 0x102375abc thunk for @escaping @callee_guaranteed (@in_guaranteed Notification) -> () (<compiler-generated>)
8 Foundation 0x222077540 -[__NSObserver _doit:] + 316
9 CoreFoundation 0x221666318 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
10 CoreFoundation 0x2216662e4 ___CFXRegistrationPost_block_invoke + 64
11 CoreFoundation 0x2216657d8 _CFXRegistrationPost + 392
12 CoreFoundation 0x221665484 ___CFXNotificationPost_block_invoke + 96
13 CoreFoundation 0x2215ded64 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1496
14 CoreFoundation 0x221664f34 _CFXNotificationPost + 696
15 Foundation 0x22204d7f4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
16 TrainCentric 0x102341c24 closure #1 in closure #1 in closure #1 in static SyncProvider.sync(completion:progressHandler:) + 65 (SyncProvider.swift:65)
17 TrainCentric 0x1022dc060 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
18 libdispatch.dylib 0x221134a38 _dispatch_call_block_and_release + 24
19 libdispatch.dylib 0x2211357d4 _dispatch_client_callout + 16
20 libdispatch.dylib 0x2211159e4 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 1008
21 CoreFoundation 0x221686c1c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
22 CoreFoundation 0x221681b54 __CFRunLoopRun + 1924
23 CoreFoundation 0x2216810b0 CFRunLoopRunSpecific + 436
24 GraphicsServices 0x22388179c GSEventRunModal + 104
25 UIKitCore 0x24deed978 UIApplicationMain + 212
26 TrainCentric 0x10225d328 main + 20 (StoreCollectionViewController.swift:20)
27 libdyld.dylib 0x2211468e0 start + 4
#1. com.apple.root.background-qos
0 libobjc.A.dylib 0x2208e7d14 objc_release + 132
1 libobjc.A.dylib 0x2208e9b9c (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 672
2 libdispatch.dylib 0x2211357b4 _dispatch_last_resort_autorelease_pool_pop + 40
3 libdispatch.dylib 0x221118cb4 _dispatch_root_queue_drain + 1076
4 libdispatch.dylib 0x221119248 _dispatch_worker_thread2 + 116
5 libsystem_pthread.dylib 0x2213151b4 _pthread_wqthread + 464
6 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#2. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x221315138 _pthread_wqthread + 340
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#3. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x2213151f8 _pthread_wqthread + 532
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#4. com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x2212870f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x2212865a0 mach_msg + 72
2 CoreFoundation 0x221686a10 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x221681920 __CFRunLoopRun + 1360
4 CoreFoundation 0x2216810b0 CFRunLoopRunSpecific + 436
5 Foundation 0x22204efac -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
6 Foundation 0x22204ee3c -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7 UIKitCore 0x24dfd3494 -[UIEventFetcher threadMain] + 136
8 Foundation 0x22217b6a4 __NSThread__start__ + 984
9 libsystem_pthread.dylib 0x2213142c0 _pthread_body + 128
10 libsystem_pthread.dylib 0x221314220 _pthread_start + 44
11 libsystem_pthread.dylib 0x221317cdc thread_start + 4
#5. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x221315138 _pthread_wqthread + 340
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#6. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x2213151f8 _pthread_wqthread + 532
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#7. com.twitter.crashlytics.ios.MachExceptionServer
0 libsystem_kernel.dylib 0x2212870f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x2212865a0 mach_msg + 72
2 TrainCentric 0x1023bcd20 CLSMachExceptionServer + 180 (CLSMachException.c:180)
3 libsystem_pthread.dylib 0x2213142c0 _pthread_body + 128
4 libsystem_pthread.dylib 0x221314220 _pthread_start + 44
5 libsystem_pthread.dylib 0x221317cdc thread_start + 4
#8. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x221315138 _pthread_wqthread + 340
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#9. Crashed: com.twitter.crashlytics.ios.exception
0 TrainCentric 0x1023d1ff0 CLSProcessRecordAllThreads + 376 (CLSProcess.c:376)
1 TrainCentric 0x1023d23d8 CLSProcessRecordAllThreads + 407 (CLSProcess.c:407)
2 TrainCentric 0x1023c1d4c CLSHandler + 26 (CLSHandler.m:26)
3 TrainCentric 0x1023d0604 __CLSExceptionRecord_block_invoke + 199 (CLSException.mm:199)
4 libdispatch.dylib 0x2211357d4 _dispatch_client_callout + 16
5 libdispatch.dylib 0x2211165fc _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 TrainCentric 0x1023d00a0 CLSExceptionRecord + 206 (CLSException.mm:206)
7 TrainCentric 0x1023cfed4 CLSExceptionRecordNSException + 102 (CLSException.mm:102)
8 TrainCentric 0x1023cfaf0 CLSTerminateHandler() + 259 (CLSException.mm:259)
9 libc++abi.dylib 0x2208c4838 std::__terminate(void (*)()) + 16
10 libc++abi.dylib 0x2208c48c4 std::terminate() + 84
11 libobjc.A.dylib 0x2208cfd5c _destroyAltHandlerList + 10
12 libdispatch.dylib 0x2211357e8 _dispatch_client_callout + 36
13 libdispatch.dylib 0x221106040 _dispatch_once_callout + 28
14 TrainCentric 0x1024340e4 +[FIRIAMDefaultDisplayImpl getViewResourceBundle] + 85 (once.h:85)
15 TrainCentric 0x10243421c +[FIRIAMDefaultDisplayImpl displayCardViewWithMessageDefinition:displayDelegate:] + 75 (FIRIAMDefaultDisplayImpl.m:75)
16 TrainCentric 0x102435100 -[FIRIAMDefaultDisplayImpl displayMessage:displayDelegate:] + 258 (FIRIAMDefaultDisplayImpl.m:258)
17 TrainCentric 0x10241fe84 __55-[FIRIAMDisplayExecutor displayForMessage:triggerType:]_block_invoke + 593 (FIRIAMDisplayExecutor.m:593)
18 TrainCentric 0x102425b84 __63-[FIRIAMMessageContentDataWithImageURL loadImageDataWithBlock:]_block_invoke.23 + 145 (FIRIAMMessageContentDataWithImageURL.m:145)
19 TrainCentric 0x102425ee0 __68-[FIRIAMMessageContentDataWithImageURL fetchImageFromURL:withBlock:]_block_invoke + 176 (FIRIAMMessageContentDataWithImageURL.m:176)
20 CFNetwork 0x221cc9688 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
21 CFNetwork 0x221cdd220 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 176
22 Foundation 0x222159ef8 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
23 Foundation 0x2220663e0 -[NSBlockOperation main] + 72
24 Foundation 0x2220658c8 -[__NSOperationInternal _start:] + 740
25 Foundation 0x22215bc7c __NSOQSchedule_f + 272
26 libdispatch.dylib 0x221134a38 _dispatch_call_block_and_release + 24
27 libdispatch.dylib 0x2211357d4 _dispatch_client_callout + 16
28 libdispatch.dylib 0x22110cc34 _dispatch_continuation_pop$VARIANT$armv81 + 404
29 libdispatch.dylib 0x22110c314 _dispatch_async_redirect_invoke + 592
30 libdispatch.dylib 0x2211189d4 _dispatch_root_queue_drain + 340
31 libdispatch.dylib 0x221119248 _dispatch_worker_thread2 + 116
32 libsystem_pthread.dylib 0x2213151b4 _pthread_wqthread + 464
33 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#10. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x221315138 _pthread_wqthread + 340
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#11. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x221315138 _pthread_wqthread + 340
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#12. Thread
0 libsystem_kernel.dylib 0x221292b74 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x2213151f8 _pthread_wqthread + 532
2 libsystem_pthread.dylib 0x221317cd4 start_wqthread + 4
#13. AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x2212870f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x2212865a0 mach_msg + 72
2 CoreFoundation 0x221686a10 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x221681920 __CFRunLoopRun + 1360
4 CoreFoundation 0x2216810b0 CFRunLoopRunSpecific + 436
5 AVFAudio 0x227569334 GenericRunLoopThread::Entry(void*) + 156
6 AVFAudio 0x227593c60 CAPThread::Entry(CAPThread*) + 88
7 libsystem_pthread.dylib 0x2213142c0 _pthread_body + 128
8 libsystem_pthread.dylib 0x221314220 _pthread_start + 44
9 libsystem_pthread.dylib 0x221317cdc thread_start + 4
#14. Thread
0 libsystem_kernel.dylib 0x221287148 semaphore_timedwait_trap + 8
1 libdispatch.dylib 0x221104a4c _dispatch_sema4_timedwait$VARIANT$armv81 + 64
2 libdispatch.dylib 0x2211053a8 _dispatch_semaphore_wait_slow + 72
3 libdispatch.dylib 0x2211187c8 _dispatch_worker_thread + 344
4 libsystem_pthread.dylib 0x2213142c0 _pthread_body + 128
5 libsystem_pthread.dylib 0x221314220 _pthread_start + 44
6 libsystem_pthread.dylib 0x221317cdc thread_start + 4
#15. com.apple.audio.toolbox.AUScheduledParameterRefresher
0 libsystem_kernel.dylib 0x221287130 semaphore_wait_trap + 8
1 AudioToolbox 0x225592834 WorkThread::run() + 48
2 AudioToolbox 0x225592794 WorkThread::entry(void*) + 20
3 AudioToolbox 0x22598d4f8 CAPThread::Entry(CAPThread*) + 88
4 libsystem_pthread.dylib 0x2213142c0 _pthread_body + 128
5 libsystem_pthread.dylib 0x221314220 _pthread_start + 44
6 libsystem_pthread.dylib 0x221317cdc thread_start + 4
#16. com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x2212870f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x2212865a0 mach_msg + 72
2 CoreFoundation 0x221686a10 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x221681920 __CFRunLoopRun + 1360
4 CoreFoundation 0x2216810b0 CFRunLoopRunSpecific + 436
5 CFNetwork 0x221c9a74c -[__CoreSchedulingSetRunnable runForever] + 216
6 Foundation 0x22217b6a4 __NSThread__start__ + 984
7 libsystem_pthread.dylib 0x2213142c0 _pthread_body + 128
8 libsystem_pthread.dylib 0x221314220 _pthread_start + 44
9 libsystem_pthread.dylib 0x221317cdc thread_start + 4
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (9 by maintainers)
@rednebmas Great catch! Thank you for your attentive code review!
@Anastassi Thank you for additional details.
@maksymmalyhin How does PR #3593 fix the crash? All it does is add a log statement.