Open Kevinrob opened 1 year ago
Hello @Kevinrob,
Can you give us a mobile token for that use case?
Are you perhaps using compose?
Also, are you able to record a video of this bug happening? As I am not being able to reproduce on version 3.1.1 I would like to see how it happens. In version 3.1.0 we added a condition that when testing mode is enabled you can record our window.
Thank you!
Mobile Token: 29e841c68570e0ef1821277137f74e8c03335bf07b5ce5f7
Yes, we use Compose.
It's with the version 3.1.1
.
https://github.com/datatrans/android-sdk/assets/4509277/1424c7ce-5963-41b6-b6fb-8e6e1bd291b5
When I try after making the backs, I get errors in logcat:
A transaction with mobileToken '29e841c68570e0ef1821277137f74e8c03335bf07b5ce5f7' is already in progress
Hello @Kevinrob,
I have here an Android SDK sample project in Compose with exactly the same init as yours on that mobile token.
Can you run it and check if the device you are using behaves the same way on this project?
I tried this sample on: Device Pixel 7 Pro (Android 14) Emulator Pixel 6 (Android 13) Emulator Pixel 6 (Android 9) Emulator Pixel 6 (Android 5)
All worked as expected.
Thanks!
I test on a Pixel 7 Pro too.
With the sampleapp, I get the Transaction CANCELLED
message 👍🏻
I don't understand why I don't get it in my application. We start the transaction the same.
Do you have custom logic for cancelling the transaction on back press? Maybe you can add some log to a build that I can try?
Hello @Kevinrob,
I created a version for you to test with logs on our back pressed logic. You can only see these logs in testing mode (isTesting = true
).
The version is "1.0.0-QoQaVersion311".
Two examples of logs with the Android SDK Sample project:
When two payment methods are display and we go back on credit card screen: ch.datatrans.sdksample D/Datatrans: onBackPressed ch.datatrans.sdksample D/Datatrans: onBackPressed: Back or Cancel SDK ch.datatrans.sdksample D/Datatrans: onBackPressed: Back
When only the credit card screen is displayed: ch.datatrans.sdksample D/Datatrans: onBackPressed ch.datatrans.sdksample D/Datatrans: onBackPressed: Back or Cancel SDK ch.datatrans.sdksample D/Datatrans: onBackPressed: Cancel SDK
Thanks!
I think I found the cause of the problem.
android:enableOnBackInvokedCallback=true
in the manifest.
This is from predictive back gesture feature.
If I remove it, it's works.
I get the cancellation callback and I see the 3 logs onBackPressed
.
For the moment we will disable this in our application. But maybe there is something to do in the SDK for supporting this?
Hello @Kevinrob,
I just tried it out too. Yes, that affects our back pressed behaviour.
We will analyse when we can release a fix to support it and will inform you in this ticket whenever it is released.
Thank you again for bringing it up!
Hi @luiscosta, any updates on this?
Hello,
I just tried my Compose Sample App (the same one I sent to you) with Datatrans SDK 3.3.0 and the flag android:enableOnBackInvokedCallback="true"
and it worked fine for me, I receive the cancels and successes.
Do you still see this problem in 3.3.0?
Please let me know.
@Kevinrob, I forgot to tag you on last message, do you still see this problem?
Thanks!
We consider this as fixed. Please report again if the issue persists.
I just tested again to enable enableOnBackInvokedCallback
and the issue is still here.
https://github.com/datatrans/android-sdk/assets/4509277/66aa97b1-7d87-4b95-b395-cd82585e9961
SDK version: 3.6.0
And I can reproduce with your sample project too:
https://github.com/datatrans/android-sdk/assets/4509277/77150acd-1655-4cf5-a8f5-20190b7f27bd
@bacherma can you re-open this issue?
Hello @Kevinrob,
Can you please test this issue on your solution with the version 1.0.0-Qoqa360
?
Please note that you shouldn't use this version on your release because it will be removed later from our JFrog. This version is only for testing purposes.
Thanks!
Hi @luiscosta
Yes, it's working! Thank you! I can't wait to have this fixed in a future release 😊
Hi, We found a bug with the card payment process.
Steps to reproduce:
onTransactionError
noronTransactionCancel
.startTransaction
doesn't work anymore.UPDATE / TL;DR: This is caused by predictive back gesture feature (enableOnBackInvokedCallback)