sumup / sumup-ios-sdk

Other
46 stars 24 forks source link

App Crash #124

Closed rivella50 closed 3 months ago

rivella50 commented 1 year ago

Hi there, we use SumUp integration in our Flutter app by using this plugin, where iOS SumUpSDK version seems to be 4.3.1. Recently we got this crash report in Firebase Crashlytics which happened on one of our customer's device:

Crashed: com.apple.main-thread
0  Runner                         0x494b4c closure #4 in SwiftSumupPlugin.handle(_:result:) + 406652
1  Runner                         0x49824c partial apply for closure #1 in SwiftSumupPlugin.checkout(request:completion:) + 420732 (<compiler-generated>:420732)
2  Runner                         0x494e4c thunk for @escaping @callee_guaranteed (@guaranteed SMPCheckoutResult?, @guaranteed Error?) -> () + 407420 (<compiler-generated>:407420)
3  SumUpSDK                       0x830f0 __69+[SMPSumUpSDK didCreateCheckout:error:fromViewController:completion:]_block_invoke.162 + 252
4  SumUpSDK                       0x31b54 -[SMPHandlerChain invokeIndex:object:sortedHandlers:] + 304
5  SumUpSDK                       0x31c04 __53-[SMPHandlerChain invokeIndex:object:sortedHandlers:]_block_invoke + 52
6  SumUpSDK                       0x6af84 -[SMPFirmwareUpdateManager didGetFirmwareUpdate:error:completion:] + 332
7  SumUpSDK                       0x6ae14 __77-[SMPFirmwareUpdateManager paymentNavigationControllerDidDismiss:completion:]_block_invoke + 88
8  libdispatch.dylib              0x2460 _dispatch_call_block_and_release + 32
9  libdispatch.dylib              0x3f88 _dispatch_client_callout + 20
10 libdispatch.dylib              0x127f4 _dispatch_main_queue_drain + 928
11 libdispatch.dylib              0x12444 _dispatch_main_queue_callback_4CF + 44
12 CoreFoundation                 0x9a6c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
13 CoreFoundation                 0x7c02c __CFRunLoopRun + 2036
14 CoreFoundation                 0x80eb0 CFRunLoopRunSpecific + 612
15 GraphicsServices               0x1368 GSEventRunModal + 164
16 UIKitCore                      0x3a1668 -[UIApplication _run] + 888
17 UIKitCore                      0x3a12cc UIApplicationMain + 340
18 Runner                         0x5444 main + 5 (AppDelegate.swift:5)
19 ???                            0x1bc46c960 (Fehlt)

Could you tell what went wrong here and could this error already have been fixed in a newer SDK release version? Thanks a lot for your answer.

jadeburton-sumup commented 1 year ago

Hi @rivella50, looking at frame 0 I see a crash in a closure within the SwiftSumupPlugin.handle method. Can you confirm that the crash occurs within a method of the SDK itself, and not in the code you use to call the SDK?

rivella50 commented 1 year ago

Hi Jade, unfortunately i cannot confirm that since the crash happened on a user's device we don't know. And between the Flutter app i can control and the SDK is the mentioned 3rd-party plugin in addition we use to communicate with the SDK. Therefore i was hoping you could tell more from having a look at the stacktrace.

jadeburton-sumup commented 1 year ago

The SDK passes control back to your code (or a plugin you are using) above frame 3. This could be triggered at the end of a successful transaction or at the end of a transaction that failed with an error. I recommend checking the code of SwiftSumupPlugin.

rivella50 commented 1 year ago

Ok, thank you very much for your response. I will check then with the plugin developer.