veritrans / Veritrans-ios-sdk

The new iOS SDK
MIT License
14 stars 33 forks source link

*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0] #610

Open bakumpai opened 1 week ago

bakumpai commented 1 week ago

Hi team, does anyone know what caused this crash?

Version 1.24.2

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x8408c (Missing UUID 47427277ee153c17ad686886b0380b5e)
1  libobjc.A.dylib                0x172e4 objc_exception_throw
2  CoreFoundation                 0x1641c (Missing UUID 47427277ee153c17ad686886b0380b5e)
3  CoreFoundation                 0x16038 (Missing UUID 47427277ee153c17ad686886b0380b5e)
4  bk_ios                         0x31babc -[MidtransUIPaymentViewController setupNavigationBar] + 151 (MidtransUIPaymentViewController.m:151)
5  bk_ios                         0x31b5c8 -[MidtransUIPaymentViewController viewDidLoad] + 124 (MidtransUIPaymentViewController.m:124)
6  UIKitCore                      0x59558 (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
7  UIKitCore                      0x580e0 (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
8  UIKitCore                      0x57d18 (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
9  UIKitCore                      0x396318 (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
10 UIKitCore                      0x396120 (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
11 UIKitCore                      0x39557c (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
12 bk_ios                         0x31b404 -[MidtransUIPaymentViewController initWithToken:andPaymentFeature:] + 104 (MidtransUIPaymentViewController.m:104)
13 bk_ios                         0x2f7f4 closure #1 in OrderDetailsViewController.openMidtransPage() + 523 (OrderDetailsViewController.swift:523)
14 bk_ios                         0x8d3d4 thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
15 libdispatch.dylib              0x40d0 _dispatch_client_callout
16 libdispatch.dylib              0x7580 _dispatch_continuation_pop
17 libdispatch.dylib              0x1b53c _dispatch_source_latch_and_call
18 libdispatch.dylib              0x1a104 _dispatch_source_invoke
19 libdispatch.dylib              0x128f4 _dispatch_main_queue_drain
20 libdispatch.dylib              0x125fc _dispatch_main_queue_callback_4CF
21 CoreFoundation                 0x56f64 (Missing UUID 47427277ee153c17ad686886b0380b5e)
22 CoreFoundation                 0x54188 (Missing UUID 47427277ee153c17ad686886b0380b5e)
23 CoreFoundation                 0x535b8 (Missing UUID 47427277ee153c17ad686886b0380b5e)
24 GraphicsServices               0x11c4 GSEventRunModal
25 UIKitCore                      0x3de5f0 (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
26 UIKitCore                      0x48d10c (Missing UUID 5bd027b10ec935fdb9f06288a525693a)
27 bk_ios                         0x56190 main + 20 (AppDelegate.swift:20)
28 ???                            0x1aa67bd34 (Missing)

Crashed: com.google.firebase.crashlytics.ios.exception
0  FirebaseCrashlytics            0x2152c FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393)
1  FirebaseCrashlytics            0x2190c FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424)
2  FirebaseCrashlytics            0x189b0 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3  FirebaseCrashlytics            0x136d4 __FIRCLSExceptionRecord_block_invoke + 232 (FIRCLSException.mm:232)
4  libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
5  libdispatch.dylib              0x13750 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6  FirebaseCrashlytics            0x126e0 FIRCLSExceptionRecord + 234 (FIRCLSException.mm:234)
7  FirebaseCrashlytics            0x131f4 FIRCLSExceptionRecordNSException + 126 (FIRCLSException.mm:126)
8  FirebaseCrashlytics            0x12338 FIRCLSTerminateHandler() + 398 (FIRCLSException.mm:398)
9  libc++abi.dylib                0x1287c std::__terminate(void (*)()) + 16
10 libc++abi.dylib                0x12820 std::terminate() + 108
11 libobjc.A.dylib                0x3f938 objc_terminate + 16
12 libdispatch.dylib              0x40e4 _dispatch_client_callout + 40
13 libdispatch.dylib              0x7580 _dispatch_continuation_pop + 596
14 libdispatch.dylib              0x1b53c _dispatch_source_latch_and_call + 420
15 libdispatch.dylib              0x1a104 _dispatch_source_invoke + 836
16 libdispatch.dylib              0x128f4 _dispatch_main_queue_drain + 744
17 libdispatch.dylib              0x125fc _dispatch_main_queue_callback_4CF + 44
18 CoreFoundation                 0x56f64 <redacted> + 16
19 CoreFoundation                 0x54188 <redacted> + 1996
20 CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
21 GraphicsServices               0x11c4 GSEventRunModal + 164
22 UIKitCore                      0x3de5f0 <redacted> + 816
23 UIKitCore                      0x48d10c UIApplicationMain + 340
24 bk_ios                         0x56190 main + 20 (AppDelegate.swift:20)
25 ???                            0x1aa67bd34 (Missing)

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  CoreFoundation                 0x547cc <redacted> + 160
5  CoreFoundation                 0x53e78 <redacted> + 1212
6  CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
7  Foundation                     0xb6f00 <redacted> + 212
8  Foundation                     0xb6d50 <redacted> + 64
9  UIKitCore                      0x3f1a44 <redacted> + 420
10 Foundation                     0xc8058 <redacted> + 724
11 libsystem_pthread.dylib        0x637c _pthread_start + 136
12 libsystem_pthread.dylib        0x1494 thread_start + 8

com.google.firebase.crashlytics.MachExceptionServer
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  FirebaseCrashlytics            0x1afec FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192)
5  libsystem_pthread.dylib        0x637c _pthread_start + 136
6  libsystem_pthread.dylib        0x1494 thread_start + 8

Realm notification listener
0  libsystem_kernel.dylib         0x846c kevent + 8
1  Realm                          0x39e950 realm::_impl::ExternalCommitHelper::listen() + 156
2  Realm                          0x39eaa0 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        0x637c _pthread_start + 136
4  libsystem_pthread.dylib        0x1494 thread_start + 8

Realm notification listener
0  libsystem_kernel.dylib         0x846c kevent + 8
1  Realm                          0x39e950 realm::_impl::ExternalCommitHelper::listen() + 156
2  Realm                          0x39eaa0 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        0x637c _pthread_start + 136
4  libsystem_pthread.dylib        0x1494 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  CoreFoundation                 0x547cc <redacted> + 160
5  CoreFoundation                 0x53e78 <redacted> + 1212
6  CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
7  CFNetwork                      0xfdf44 <redacted> + 416
8  Foundation                     0xc8058 <redacted> + 724
9  libsystem_pthread.dylib        0x637c _pthread_start + 136
10 libsystem_pthread.dylib        0x1494 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8
uziwuzzy commented 1 week ago

can you try to update to the latest version? https://github.com/veritrans/Veritrans-ios-sdk/releases

bakumpai commented 1 week ago

can you try to update to the latest version? https://github.com/veritrans/Veritrans-ios-sdk/releases

Unfortunately, it shows a maintenance page when we use the latest SDK.

bakumpai commented 1 week ago

Additionally, the crash happens intermittently, @uziwuzzy. However, it shows the highest number of crashes in our Crashlytics.

uziwuzzy commented 1 week ago

For bugs/issues please provide a step by step guide to reproduce it. Otherwise we can't fix it. Maintenance Page should be because of intermittent Midtrans backend issue.

bakumpai commented 6 days ago

For bugs/issues please provide a step by step guide to reproduce it. Otherwise we can't fix it. Maintenance Page should be because of intermittent Midtrans backend issue.

Just call this code in viewDidAppear; that's how we do it. Did we do it wrong?

guard let paymentController = MidtransUIPaymentViewController(
   token: token,
   andPaymentFeature: .GOPAY
) else { return }
paymentController.paymentDelegate = self
self.present(paymentController, animated: true)

it still happens in the latest version 1.27.1