Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTThreeDSecureDriver crashes sometimes when user taps cancel #329

Closed
meismyles opened this issue Apr 10, 2017 · 10 comments
Closed

BTThreeDSecureDriver crashes sometimes when user taps cancel #329

meismyles opened this issue Apr 10, 2017 · 10 comments

Comments

@meismyles
Copy link

General information

  • SDK/Library version: 4.8.0
  • Environment: Production
  • iOS Version and Device: Multiple iPhones, iOS 9 & 10
  • Integration type and version: CocoaPods 1.2.0

Issue description

Crash that started appearing in Fabric over the weekend. Seems to happen when users hit cancel during 3D Secure. Unable to re-create this ourselves as of yet, but based on the stack trace (see below) potentially looks like an issue where the completion block is called and nil passed back when it shouldn't be nil. See here.

Crashed: com.apple.main-thread
0  Braintree                      0x6761ca -[BTThreeDSecureDriver threeDSecureViewControllerDidFinish:] (BTThreeDSecureDriver.m:200)
1  libobjc.A.dylib                0x1a6a27bd objc::DenseMapBase<objc::DenseMap<DisguisedPtr<objc_object>, unsigned long, true, objc::DenseMapInfo<DisguisedPtr<objc_object> > >, DisguisedPtr<objc_object>, unsigned long, objc::DenseMapInfo<DisguisedPtr<objc_object> >, true>::FindAndConstruct(DisguisedPtr<objc_object> const&) + 16
2  Braintree                      0x674bc7 -[BTThreeDSecureAuthenticationViewController tappedCancel] (BTThreeDSecureAuthenticationViewController.m:116)
3  UIKit                          0x20505f25 -[UIApplication sendAction:to:from:forEvent:] + 76
4  UIKit                          0x2067901f -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 140
5  UIKit                          0x20505f25 -[UIApplication sendAction:to:from:forEvent:] + 76
6  UIKit                          0x20505eb3 -[UIControl sendAction:to:forEvent:] + 62
7  UIKit                          0x204effd7 -[UIControl _sendActionsForEvents:withEvent:] + 470
8  UIKit                          0x204f00f5 -[UIControl _sendActionsForEvents:withEvent:] + 756
9  UIKit                          0x205057db -[UIControl touchesEnded:withEvent:] + 634
10 UIKit                          0x20505327 -[UIWindow _sendTouchesForEvent:] + 2126
11 UIKit                          0x204fff27 -[UIWindow sendEvent:] + 2662
12 UIKit                          0x204d0d35 -[UIApplication sendEvent:] + 320
13 UIKit                          0x20c6c98d __dispatchPreprocessedEventFromEventQueue + 2620
14 UIKit                          0x20c665d3 __handleEventQueue + 834
15 CoreFoundation                 0x1b3e071b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
16 CoreFoundation                 0x1b3e0225 __CFRunLoopDoSources0 + 438
17 CoreFoundation                 0x1b3de4fb __CFRunLoopRun + 762
18 CoreFoundation                 0x1b32d533 CFRunLoopRunSpecific + 486
19 CoreFoundation                 0x1b32d341 CFRunLoopRunInMode + 104
20 GraphicsServices               0x1cb04bfd GSEventRunModal + 156
21 UIKit                          0x2053be67 -[UIApplication _run] + 574
22 UIKit                          0x20536591 UIApplicationMain + 150
23 Skiddle                        0x46b91 main (main.m:17)
24 libdispatch.dylib              0x1aaf750b (Missing)
@demerino
Copy link
Member

@meismyles is this related to a specific version of your app? I wonder if it is related to the updates we've made? Is the version of Drop-in also the same? Kinda strange that it just started.

@meismyles
Copy link
Author

@dermerino we only just pushed payments live end of last week so it is unrelated to the changes you made as they won't be in our public build. Maybe not strange that it just started since it seems to be an intermittent issue and all other issues we have reported are from our internal testing. It's only just gone out to a larger number of users so probably why it has just started.

@demerino
Copy link
Member

@meismyles Okay, so to clarify - the version of the SDK that is live (public) is 4.8.0? That was released on Monday and was supposed to have potential fixes for this issue.

@meismyles
Copy link
Author

Ok, looks like someone updated to 4.8.0 without me noticing haha. So the live version crashing is 4.8.0.

When you say potential fixes for this issue - you don't mean the double callback issue do you? This is slightly different (but maybe related, not sure).

@meismyles
Copy link
Author

Any update on this?

@demerino
Copy link
Member

@meismyles I haven't been able to reproduce it but I'm thinking that the callback block has already been executed once and it is somehow being called again (customer rapidly hitting cancel/done?). So I'm thinking we can check to ensure the callback block is only called once and doing nothing if it is called a 2nd time. I'll work on a PR next week.

@meismyles
Copy link
Author

Hey @demerino, did a potential fix for this go into 4.8.1?

@demerino
Copy link
Member

demerino commented May 9, 2017

@meismyles No - the fix didn't go out yet. We're looking to get it out in the next release which is coming out this week.

@meismyles
Copy link
Author

@demerino Ok great thanks 👍

@demerino
Copy link
Member

This issue should be fixed (and we've added some analytics to track when the issue occurs).

https://github.com/braintree/braintree_ios/releases/tag/4.8.2

apascual pushed a commit to apascual/braintree_ios that referenced this issue Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants