-
Notifications
You must be signed in to change notification settings - Fork 269
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
[Android] 3DSecure confirmation screen closed if app is put in background #355
Comments
@michelleb-stripe can you look into this? |
React Native Android - The previous state of stripe payment screen not getting When app reopens click of app icon after minimize. |
We are facing the same issue. By when we can expect this issue to be resolved? |
@aanalmehta-sa and @vipu-sa and @konstantinmv In your manifest file you will have a single activity that has an intent filter of category:
Can you post the launchMode set on this activity? I believe this might be an issue with a launchMode = singleTask. If you use the defaultLaunch mode it might work. (See related issue: stripe/stripe-android#3290). |
closing due to inactivity, @aanalmehta-sa @vipu-sa @konstantinmv please reopen if above solution didn't work for you |
@arekkubaczkowski I want to draw attention to stripe/stripe-android#3290 also being closed pointing here, while the issue is still real for users like myself. Please reconsider reopening again.
@michelleb-stripe I have this issue and I am using |
I'm having the same issue. To recreate:
The payment errors out with "Failed to retrieve a PaymentSheetResult". However, if you instead resume the app from the Android Task Switcher everything works as expected. My manifest looks like:
I believe you're right that changing the singleTask launch mode will fix but this breaks deep linking for our RN Android app. Would there be another work around? |
Also facing this issue on Android only (same reproduction as @aaronSig), with the following environment :
However, resuming the app with the task switcher working as expected (tested in expo go and standalone build). |
@arekkubaczkowski @michelleb-stripe is there anything new about this issue ? |
@bob-user and @konstantinmv @aaronSig @cristeahub 3DS has a challenge response, so there is no way for us to re-create the webview as it would re-trigger the challenge, the user would reopen the banking app, and have the same problem. As long as the activity with the webview still exists in somewhere in the task stack it should be possible to reopen it. When you relaunch your app in this way, is onNewIntent being called or is it creating a new instance? |
@bob-user and @konstantinmv @aaronSig @cristeahub In order for this to work I believe the StripeBrowserLauncherActivity (in the case of 3DS1) needs to be somewhere on the task stack after the launcher is pressed. However, when I created an application with the launchMode set to "singleTask" the StripeBrowserLauncherActivity is destroyed when clicking the launcher. (I verified this by registering an ActivityLifecycleCallbacks in an Application.onCreate method and logging all lifecycle events). If you can instead use singleTop, and in the onNewIntent method you can check if it is a deep link and do any work you need there? |
@michelleb-stripe I'm using the library in a managed expo app and I'm having trouble ejecting to access native code in order to test. Moreover, I'd like to keep up with the managed workflow so ejecting would only be a matter of debugging in my case. May this be resolved in an other way than accessing native code ? |
Same problem with the following config :
shouldn't this issue be reopened ? |
Same problem here with the following config (managed flow expo app):
Do you have any eta to solve this issue? |
@acomley-stripe @trag-stripe Can you help engage with the expo team on this particular issue? I am happy to help jump in a conversation if needed. |
I am experiencing same issue. If launchMode is not singleTask resuming app from app icon works. However we can not use other launch mode with react-native because it might introduce other issues. Also when returning back to the app from the app switcher works, but if app is resumed from the app icon the 3Ds confirmation view is no more. I have implemented launchMode="singleTop" for now and it seems that this launchMode does resolve the bug. So far I did not notice that this launchMode would impact my app in any negative way. In the long run I think the issue should be resolved on singleTask mode as well |
Same issue here. 3DS process is killed when we resume app from home with appIcon ... |
Same issue with |
Hi, are you making any progress on this? |
The native version of the 3DS2 auth screen is on the roadmap and is the long term fix for this issue, but we're still looking into proper workarounds in the meantime |
Hi @charliecruzan-stripe, any news regarding this issue ? It has always been there for 2 years and no solution is provided. This is an issue affecting the 3DS confirmation on Android and causes unintended cases about payment, it's a bit annoying. A workaround would be appreciable in next release until we get a real fix. |
Unfortunately we're still waiting on a fix in the |
Friendly ping :) |
@charliecruzan-stripe any news ? (Can you give us the issue on stripe-android, thanks ) |
@charliecruzan-stripe We made a quick fixed it on our own. Do you have any news ? |
@tgensol can you please share how you fixed it in your project? |
Hi @ottob, We tried to set up a workaround a few weeks ago. Here's what we have implemented:
The 10sec delays is totally arbitrary for now. Retrieving the intent therefore allows us to prevent some payment errors caused by In practice, this should work because the error occurs on the front end, but on the Stripe side the intent is in the right status if the user has validated the transaction on their bank. This workaround can certainly be improved, but it gives you an idea of what we have tried to prevent this long life error. Don't hesitate to share if you see a way to improved it or even another workaround ;) @charliecruzan-stripe It would be great to have an idea of the progression on this issue or at least to share the Android issue as you mentioned here : #355 (comment) |
Hi, We have an web app but with the users using Android faced this issue. Something that we can do? |
@charliecruzan-stripe @jaynewstrom-stripe @jameswoo-stripe any update on this issue ? |
Hi guys! I think this is an issue that cannot really be solved by the Stripe library itself, as it has to do with the overall architecture of the Android app using it. Luckily, the fix should be quite straight-forward in a simple react-native app! I found it when researching a similar issue in another part of our app where we display a Chrome custom tab in order to perform login authentication: Basically, instead of just having one MainActivity where deeplink support requires you to give the MainActivity a launchMode of "singleTask", you split the application into two activites. One that is responsible for launching the app from the android launcher, and one that is then started by that 'launcher activity' and retains the singleTask launchmode. I think the only thing Stripe can really do about this is to include this information in their documentation somehow, for users who need both deeplink support (for instance via Branch) and the option to use 3D secure via webviews. |
Hi @stianjensen, thank you for this reply! We've implemented it with a few adaptations for React Native while keeping deep links working properly, and it seems to work very well. |
Using singleTask in an Android application for the activity that has an intent-filter on the LAUNCHER, means that any activities running on top of this activity will disappear when the app's icon is pressed again from the launcher. This is a problem, because when confirming a SetupIntent or PaymentIntent, Stripe may need to present a web browser (its own activity) for verification with a customer's bank or similar, and the user may even need to leave this web browser activity temporarily to navigate to their bank's own application. If the user is not careful when navigating back to the original app, and taps the app's icon from the launcher, the app will open to its original activity, and the web browser is gone. Instead, the user will need to navigate back only using Android's app switcher, which will correctly bring you back into the open web browser activity. The change in this commit side-steps this issue by splitting the example application into two acitivites. One that is only responsible for launching the application, and a second activity that actually represents the react native application, and will be started by the first activity, ensuring to only start it once. This fixes stripe#355.
Is there a way to achieve this in Expo managed workflow? or will you provide it as part of Stripe plugin for Expo? |
Here they have been trying to solve similar issue. They forced the web browser to NOT create a new task. Is this what might fix the issue? How can we force it? |
This is still a big issue for us using expo, anyone has a solution? We have many users failing the payment because of this issue. |
Added a note about this in our readme for now. For expo users, you'll need access to native code for this so you might need to use a different Expo workflow that gives you that level of control |
Hi all.
We currently have a bug happening on Android only.
After using
confirmPaymentMethod
on a payment, the 3DS screen is brought up. If instead of confirming / denying the payment on this screen we go into background and then bring the app back to active again, 3DS screen is just dismissed, so the app is stuck.Obviously, at that moment Stripe payment is pending, but there's no way to bring up the payment screen again.
Even if there was, then the process would be repeated - if the user has to go to the bank's app in order to confirm the payment or whatever, the problem would come back and always be present.
Note: this does not happen on iOs.
To Reproduce
Steps to reproduce the behaviour:
hooks.stripe.com
screen with the confirmation gets brought up, go into background.Expected behavior
The expected behaviour would be the same as in iOs, for this screen not to be dismissed until the user does some action upon it.
Desktop (please complete the following information):
OS: MacOs Big Sur 11.2.3
Browser: Chrome
Version: 91.0.4472.77 (Official Build) (x86_64)
Smartphone (please complete the following information):
Device: Honor 9 Lite
Android version: 9
Additional context
Stripe version: 0.1.4
React native version: 0.63.4
Thanks in advance!
The text was updated successfully, but these errors were encountered: