#huwmartin-gpay-reactnative
1 messages ยท Page 1 of 1 (latest)
Hi ๐ apologies for the delay. My react native is a bit rusty, so please bear with me while I consult with my colleagues.
this is causing a fatal native exception when calling initGooglePay
what's the full error and stack trace?
Hi @burnt galleon , shared here #dev-help message
We're using stripe-react-native v0.2.3 with the following in our app build.gradle
implementation 'com.google.android.gms:play-services-wallet:18.1.3'
implementation 'com.stripe:stripe-android:18.1.0'
Thanks for the info. Looking in to it
I'm curious why you have stripe-android as a dependency as well?
it's part of the stripe-react-native SDK, you don't need an explicit dependency on it as well
Hi, that was added based on this https://stripe.com/docs/payments/save-and-reuse?platform=react-native&ui=payment-sheet#react-native-google-pay from React Native integration guides
Might have been duplicated from the Android integration guides
maybe try removing it then rebuilding/testing again and see if it changes anything? But yeah that seems like a mistake where the same docs content got used in multiple places, indeed
Shall try that now
Yeah the same error persists
I guess any issues with duplicate declarations of the dependency in our app and the stripe-react-native SDK would have manifested at build time anyway(?) Whereas this is a runtime crash
But doesn't seem to make a difference either way so I won't include it explicitly in our deps ๐
Good idea. Still looking in to what might be the cause of the exception...
If you are integrating this for the first time, it is recommended that you use the GooglePayLauncher https://stripe.com/docs/google-pay#instantiate
Is that relevant for React Native, too?
Ideally we'd just like to use the stripe-react-native lib
I've been following https://github.com/stripe/stripe-react-native/blob/master/docs/GooglePay.md
Apologies, slight confusion on my part. initGooglePay is still fine for RN.
A few debugging questions:
What is your version of stripe-android?
Where is this happening: simulator or device?
Can you breakpoint on initGooglePay() and step through and see what line of code this crashes internally in the SDK?
@formal trellis ^
We're a bit confused internally unfortunately. We think it also might help if you try a simple new project with a simple repro where you do this call and nothing else. It'd help understand if there's a runtime error or some build/conflict in your current app that would maybe cache some setting incorrectly
What is your version of stripe-android?
Looks like it is 18.1.0 as a dependency of stripe-react native
Where is this happening: simulator or device?
Both, you can only really test Google Pay on a device afaik but same happens in the simulator when navigating to the screen where I initalise Google Pay in an useEffect
@dark umbra yeah happy to spend some time on this tomorrow and try to answer your question about where this crashes internally in the SDK too ๐
You might have to report this on the github repo https://github.com/stripe/stripe-react-native afterwards but we're happy to try and debug this first once you have a bit more details and a simple repro
Thanks for looking into it, appreciate it ๐