Tipsi-stripe: paymentRequestWithCardForm on iOS with 9.0.0 throwing exception

Created on 30 Mar 2021  路  11Comments  路  Source: tipsi/tipsi-stripe

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

Most helpful comment

As a workaround, provide a complete theme.

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

All 11 comments

same issue is happening with me

As a workaround, provide a complete theme.

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

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

@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.

@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 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.

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

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.

I am still getting the same error, Image nill

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.

Getting same issue

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

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

xCode 12.5

Was this page helpful?
0 / 5 - 0 ratings