You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reposting since it's a more serious issue than I thought. Causing several crashes per day on all versions of Android.
Same issue seems to occur at line 244 in StripeSdkModule.kt as well... null check needed here too?
I find it strange because based on visit logs I believe this is occurring without the user even interacting with any Stripe APIs yet, other than StripeProvider wrapping the root of the app.
Looking at line 244 of StripeSdkModule.kt...
(currentActivity as AppCompatActivity).supportFragmentManager.beginTransaction().add(paymentLauncherFragment, "payment_launcher_fragment").commit()
Taking a quick look at the internals of the library, my concern is, is a null check enough, or are null checks really just masking another problem? Should currentActivity ever actually be null in this case if the RN app has to be open for any of these API calls to even occur (as far as I know)?
Since currentActivity is null in the initialize method, if a null check was introduced and initialize was called while currentActivity was indeed null, would the Stripe SDK then be uninitialized in the RN app?
Wish I could get some more info on exactly what is causing it, but this is all I've got.
I'm using stripe-react-native v. 0.6.0, but it was happening in older versions as well.
The text was updated successfully, but these errors were encountered:
goguda
changed the title
![Screenshot_20220408_143750](https://user-images.githubusercontent.com/26887502/162501761-4a17c156-68ae-4c98-9566-c686cf16e3f0.png)
null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity
Apr 9, 2022
Reposting since it's a more serious issue than I thought. Causing several crashes per day on all versions of Android.
Same issue seems to occur at line 244 in StripeSdkModule.kt as well... null check needed here too?
I find it strange because based on visit logs I believe this is occurring without the user even interacting with any Stripe APIs yet, other than StripeProvider wrapping the root of the app.
Looking at line 244 of StripeSdkModule.kt...
(currentActivity as AppCompatActivity).supportFragmentManager.beginTransaction().add(paymentLauncherFragment, "payment_launcher_fragment").commit()
Taking a quick look at the internals of the library, my concern is, is a null check enough, or are null checks really just masking another problem? Should currentActivity ever actually be null in this case if the RN app has to be open for any of these API calls to even occur (as far as I know)?
Since currentActivity is null in the initialize method, if a null check was introduced and initialize was called while currentActivity was indeed null, would the Stripe SDK then be uninitialized in the RN app?
Wish I could get some more info on exactly what is causing it, but this is all I've got.
I'm using stripe-react-native v. 0.6.0, but it was happening in older versions as well.
Originally posted by @goguda in #844 (comment)
The text was updated successfully, but these errors were encountered: