-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initGooglePay have the same init error that INIT_PAYMENTSHEET had #844
Comments
Please include your version of |
Hi @charliecruzan-stripe, actually the app uses version 0.2.4 |
thanks :) fix incoming, it's extremely helpful that you included the crash logs in your issue report 👏 |
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...
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? It also doesn't seem to be happening to every user, but I am having a few Android users per day trigger this error on my side in production. I cannot seem to reproduce it myself, sadly. It seems to happen across a wide range of Android devices. All my errors have interestingly happened on Android 10, 11 or 12: 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. |
Describe the bug
Hi Guys, I have multiple errors (+80 daily) in my production app using Stripe, when I call
initGooglePay
at the launch in my app, I have this error:java.lang.NullPointerException: null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity
I think is the same error that the
INIT_PAYMENTSHEET
have in old versions: #783This is the full log:
apparently, the error doesn't always occur, it seems to be random.
To Reproduce
Steps to reproduce the behavior:
N/A, I don't have instructions to reproduce this :(
Expected behavior
A clear and concise description of what you expected to happen.
Not have this crash.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Stripe RN version: 0.2.4
RN Version: 0.66
The text was updated successfully, but these errors were encountered: