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

Crash when adding a card #1426

Closed
odedharth opened this issue Oct 25, 2019 · 3 comments · Fixed by #1427
Closed

Crash when adding a card #1426

odedharth opened this issue Oct 25, 2019 · 3 comments · Fixed by #1427
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@odedharth
Copy link

Summary

The app crashes when clicking on "Add Card". It seems to happen with certain shipping addresses.

Code to reproduce

See in this video:
https://www.dropbox.com/s/5uofsjvpqoc11rf/stripe%20bug.MP4?dl=0

iOS version

iOS 13

Installation method

Cocoapods

SDK version

14.0.0

Other information

The crash error is:
Fatal Exception: NSInternalInconsistencyException
Requested the number of rows for section (1) which is out of bounds

And it crashes on line 401 and 410 in STPAddCardViewController.
Line 401:
NSInteger rowsInSection = [self.tableView numberOfRowsInSection:STPPaymentCardBillingAddressSection];

Line 410:
NSInteger rowsInSection = [self.tableView numberOfRowsInSection:STPPaymentCardBillingAddressSection];

@davidme-stripe
Copy link
Contributor

davidme-stripe commented Oct 25, 2019

I can't reproduce this myself, but I have a guess as to what's causing it. Can you try using my branch for #1427?

In your Podfile, set pod 'Stripe', :git => 'https://github.com/stripe/stripe-ios.git', :branch => 'davidme/fix-ios13-tableviewdata', then run pod install.

@davidme-stripe
Copy link
Contributor

I just realized you're on version 14.0, getting to the latest version might take some migration work. Maybe you can try doing this in your local copy of Stripe: https://github.com/stripe/stripe-ios/pull/1427/files

@davidme-stripe davidme-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Oct 25, 2019
@odedharth
Copy link
Author

@davidme-stripe yes, this solved it, thanks for the quick reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants