Open magouyaware opened 2 weeks ago
Hi @magouyaware thanks for the report. I'm able to reproduce the issue when extending from android.app.Activity
. We made some assumptions that aren't true in that case.
If there's any possibility to extend from androidx.appcompat.app.AppCompatActivity
instead, the issues should be resolved. That being said, I know that's not possible in all cases.
I'm going to talk with the team to come up with a path forward.
@jaynewstrom-stripe When is the expected fix for this issue?
We don't have an estimate for the fix at this time. I'll update this issue when we have more information.
Do you have any workaround or suggestion until the issue is fixed?
@jaynewstrom-stripe I just took a look at the react native test harness app we use to test our SDK and verified that we are using a subclass of androidx.appcompat.app.AppCompatActivity
Our activity extends ReactActivity
, which I believe is pretty standard for all newish React Native apps. ReactActivity
extends AppCompatActivity
@jaynewstrom-stripe This is a pretty big deal for us and is preventing us from being able to update our React Native SDK to use a newer version of our Android SDK.
Right now, the current version of our React Native SDK is using a version of our Android SDK that is built on Stripe Android v20.25.5... released over a year ago on June 5th, 2023.
We cannot update to a newer version of our Android SDK because it introduces this crash issue, and we have several bug fixes that we cannot address in our RN SDK simply because we are blocked from updating the Olo Pay Android SDK version it uses.
We acknowledge this is a big deal, and we're actively working to fix it. We will post an update when we have more to share.
Summary
This issue is a weird one in that it can be traced back to the Stripe Android SDK but only manifests itself within React Native. The issue at play affects both Stripe's React Native SDK as well as our Olo Pay React Native SDK, both of which are built on top of Stripe's Android SDK.
It appears that CardBrandView was changed in v20.36.0 to be a Composable as part of the
Card Brand Choice
feature. This change affectsCardInputWidget
,CardMultilineWidget
, andCardFormView
and causes many issues in React Native, which doesn't have great support for Jetpack Compose.Updating to v20.36.0 or later caused issues that we had never seen before:
These issues occur in our React Native SDK, which is built on top of our Android SDK, and have been traced back to Stripe's Android SDK implementation, specifically related to using a Composable inside normal views.
Stripe's own React Native SDK is also affected by this, and we have found many issues in Stripe's React Native repo that others have reported that ultimately are due to this Android Composable. Here are few (this is by no means an exhaustive list):
Android version
20.36.0 and newer
Installation method
Gradle
SDK classes
Video
https://github.com/stripe/stripe-android/assets/4357444/f8d1ee08-54ef-424a-b4cb-9ee64f1fd51d
https://github.com/stripe/stripe-android/assets/4357444/35475b2e-b53c-460b-a0fd-6188f5b9b40a
Crash Stacktrace