Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

paymentRequestWithCardForm on iOS with 9.0.0 throwing exception #746

Closed
jonasblumer opened this issue Mar 30, 2021 · 13 comments
Closed

paymentRequestWithCardForm on iOS with 9.0.0 throwing exception #746

jonasblumer opened this issue Mar 30, 2021 · 13 comments

Comments

@jonasblumer
Copy link

jonasblumer commented Mar 30, 2021

Before I have submitted the issue

[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I've read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide

The problem

Since update 9.0.0 ios can't call paymentRequestWithCardForm. Works with tipsi-stripe to 8.0.2, and pod 'Stripe', '19.0.1'

Environment

  • tipsi-stripe version: 9.0.0
  • Last tipsi-stripe version where the issue was not reproduced (if applicable):
  • iOS or Android: iOS
  • OS version: 14.4
  • React-Native version: 0.63.2

Exception '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' was thrown while invoking paymentRequestWithCardForm on target StripeModule

Screenshots, GIFs (Must to have)

image

Code To Reproduce Issue (Good To Have)

Just default example code will create this issue

@tarandeepmatharu
Copy link

same issue is happening with me

@nicholasmarais1158
Copy link

As a workaround, provide a complete theme.

stripe.paymentRequestWithCardForm({
    theme: {
        primaryBackgroundColor: 'white',
        secondaryBackgroundColor: 'white',
        primaryForegroundColor: 'black',
        secondaryForegroundColor: 'black',
        accentColor:'blue',
        errorColor:'red',
    },
});

@minhas-tech
Copy link

@nicholasmarais1158 After adding this error is not showing up, but IOS app crashes without any error. I am using latest xcode 12.5

@nicholasmarais1158
Copy link

@nicholasmarais1158 After adding this error is not showing up, but IOS app crashes without any error. I am using latest xcode 12.5

@minhas-tech If you don't provide a theme to stripe.paymentRequestWithCardForm() do you get the error stated in this issue? If not, the problem you're facing is potentially not related.

@minhas-tech
Copy link

@nicholasmarais1158 After adding this error is not showing up, but IOS app crashes without any error. I am using latest xcode 12.5

@minhas-tech If you don't provide a theme to stripe.paymentRequestWithCardForm() do you get the error stated in this issue? If not, the problem you're facing is potentially not related.

Yes If I don't provide a theme, I got error as mentioned above. But when I provide the theme. IOS app crash when calling this function. And that crash didn't give any error. Just a silent crash.

@nicholasmarais1158
Copy link

@nicholasmarais1158 After adding this error is not showing up, but IOS app crashes without any error. I am using latest xcode 12.5

@minhas-tech If you don't provide a theme to stripe.paymentRequestWithCardForm() do you get the error stated in this issue? If not, the problem you're facing is potentially not related.

Yes If I don't provide a theme, I got error as mentioned above. But when I provide the theme. IOS app crash when calling this function. And that crash didn't give any error. Just a silent crash.

To not get any error at all is very peculiar.

Please could you make sure you've done a fresh npm install (or yarn), fresh pod install, cleaned and rebuild your xCode project and restarted your packager. Then try again.

If the problem persists, please share some code and details of your setup.

@minhas-tech
Copy link

Screenshot 2021-05-06 at 3 05 00 PM

I got this error, that's why my app is crashing, it's due to nil image. This issue has been solved in stripe 21.4 but tipsi still dependent on 21.3.1 . Any suggestion?

Screenshot 2021-05-06 at 2 56 06 PM

@nicholasmarais1158
Copy link

Great. So your issue is not strictly related to this issue.

You should be able to run pod update Stripe to update the dependency. This will override and update the version locked in your Podfile.lock. tipsi-stripe "supports" Stripe versions >= 21.3.1 according to it's podspec.

@minhas-tech
Copy link

I am still getting the same error, Image nill

@nicholasmarais1158
Copy link

I am still getting the same error, Image nill

Assuming you were able to update Stripe to v21.4, this suggests that this version does not fix your issue.

I would consider raising a new issue for this (if there isn't one already). I imagine the image is dependent on the type of payment method you're testing with, so try to include as much info as possible when you raise the issue.

@LukhiKartik
Copy link

LukhiKartik commented Jul 29, 2021

Getting same issue

package.json
"tipsi-stripe": "9.1.4"

Podfile
pod 'Stripe', '>= 21.5.1'
platform :ios, '11.0'

xCode 12.5

@john-harding
Copy link

The issue for me was that requiredBillingAddressFields in options was set to zip. Stripe version 21.3.1 and above (maybe earlier versions too) changed zip to postalCode. However tipsi-stripe throws an error if you try to use postalCode instead of zip. You'll have to edit node_modules/tipsi-stripe/src/utils/types.js by replacing zip with postalCode until this is fixed in tipsi-stripe.

@fbartho
Copy link
Collaborator

fbartho commented Jun 20, 2023

Closing this ticket, so that new users don't think this project is still active.

Stripe does not want you using this, and you will find pain if you do; Please migrate to the official @stripe/stripe-react-native package, for your user's safety, and your developer's sanity!

See more:

@fbartho fbartho closed this as completed Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants