#huwmartin-gpay-reactnative

1 messages ยท Page 1 of 1 (latest)

hushed urchin
formal trellis
#

Thanks for creating the thread @hushed urchin ๐Ÿ™‚

hushed urchin
#

Hi ๐Ÿ‘‹ apologies for the delay. My react native is a bit rusty, so please bear with me while I consult with my colleagues.

burnt galleon
#

this is causing a fatal native exception when calling initGooglePay
what's the full error and stack trace?

formal trellis
#

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'
rare mountain
#

Thanks for the info. Looking in to it

burnt galleon
#

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

formal trellis
burnt galleon
#

oh interesting

#

seems like a mistake to me

formal trellis
#

Might have been duplicated from the Android integration guides

burnt galleon
#

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

formal trellis
#

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 ๐Ÿ™‚

rare mountain
#

Good idea. Still looking in to what might be the cause of the exception...

formal trellis
#

Is that relevant for React Native, too?

#

Ideally we'd just like to use the stripe-react-native lib

rare mountain
#

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?

dark umbra
#

@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

formal trellis
#

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 ๐Ÿ™‚

dark umbra
formal trellis
#

Thanks for looking into it, appreciate it ๐Ÿ‘