adyen-android icon indicating copy to clipboard operation
adyen-android copied to clipboard

Failed to initialize Drop-in

Open sewerk opened this issue 2 years ago • 31 comments

Describe the bug Crash is happening when retuning to our app most probably after processing 3DS on bank/browser app Version 4.4.0

To Reproduce Exact steps are unknown

Smartphone (please complete the following information):

  • Device: Alcatel 3L and Xiaomi POCO X3 Pro
  • OS: Android 8.1.0 and Android 11

Additional context We start DropIn flow by DropIn.startPayment(fragment, launcher, paymentMethodsApiResponse, dropInConfiguration)

result:

Fatal Exception: java.lang.RuntimeException: Unable to start activity 
Caused by kf.c: Failed to initialize Drop-in, did you manually launch DropInActivity?
       at com.adyen.checkout.dropin.ui.DropInViewModel.getStateValueOrFail(DropInViewModel.kt:119)
       at com.adyen.checkout.dropin.ui.DropInViewModel.<init>(DropInViewModel.kt:64)
       at com.adyen.checkout.dropin.ui.DropInViewModelFactory.create(DropInViewModelFactory.kt:24)
       at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:69)
       at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:169)
       at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:139)
       at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:44)
       at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:31)
       at com.adyen.checkout.dropin.ui.DropInActivity.<clinit>(DropInActivity.kt:89)
       at com.adyen.checkout.dropin.ui.DropInActivity.onCreate(DropInActivity.kt:176)

sewerk avatar Jun 01 '22 16:06 sewerk

Thank you for reaching out! This has most likely been fixed in version 4.5.0 of the SDK. Could you try updating it?

OscarSpruit avatar Jun 02 '22 08:06 OscarSpruit

I managed to reproduce the crash on test env with version 4.6.1 by following steps:

  1. Use 3DS 1 cart to pay (in e.g. 5212 3456 7890 1234)
  2. Verification page opened as custom tabs open in external browser by using "three dots - more" button
  3. Complete 3DS verification and complete the transaction
  4. Application will complete the transaction but web verification page is still available
  5. Again complete the 3DS verification within browser
  6. After redirect to the app (integrating Adyen SDK) we get this crash

sewerk avatar Jun 02 '22 10:06 sewerk

Interesting 🤔 Thank you for the reproduction path. We will take a look at this and come back to you when we have something

OscarSpruit avatar Jun 02 '22 11:06 OscarSpruit

Hello. 👋 Any news on this one? I also managed to reproduce it on version 4.6.1. Thank you.

heitorcolangelo avatar Jul 04 '22 14:07 heitorcolangelo

Hey @heitorcolangelo, how often do you/your users have this problem? We assumed this is an edge case that doesn't occur often. But if this happens a lot for you we can change to priority of this fix

OscarSpruit avatar Jul 06 '22 12:07 OscarSpruit

Hey @OscarSpruit, thanks for the reply. We had 5 occurrences in 5 different users in the last 30 days. It is indeed not urgent, I'm asking more to know if you have plans to work on this soon. Cheers!

heitorcolangelo avatar Jul 06 '22 13:07 heitorcolangelo

We do plan to fix this, but I don't think the fix will be released on the short term. I'll update this issue once I know more

OscarSpruit avatar Jul 06 '22 20:07 OscarSpruit

Hello, we are also seeing this, and it's not an edge case - I can reliably reproduce it, and it's happening to several users in production.

I haven't fully investigated yet, but it always fails on the following setup:

  • Honor 10 running Android 10
  • Default browser set to Firefox
  • A payment method that requires opening another app to confirm, including:
    • Finnish bank Nordea (which requiring confirmation through their Nordea ID app)
    • MobilePay

Opening a link such as adyencheckout://<app_id>?redirectResult= when the app isn't running crashes it, I'm assuming because there isn't a payment active.

Feels like the plugin should allow our app to handle the case? Is there a way for us to catch the exception?


Edit: the drop-in logs this before crashing:

attachBaseContext
onCreate - null
showPreselectedDialog
handleIntent: action - null
Unable to find action

tomgilder avatar Jul 22 '22 12:07 tomgilder

hi @tomgilder thanks for reaching out. Can you explain a bit more the steps you take to reproduce the issue reliably? I'm specifically interested in where do you launch the link from and how do you ensure that the app is not running.

jreij avatar Jul 25 '22 08:07 jreij

Hi @jreij. My team is also facing this crash. We have managed to debug it and believe we have found the source of the problem.

To start, here is how we are reproducing (on version 4.7.1):

  1. (Optional) Disable your default browser's Custom Tabs support
  2. Launch your App
  3. Start a checkout with a redirect type of payment (we used iDeal)
  4. When at the webview, open the kebab menu and launch in Chrome (see image 1). Then, kill your App
  5. Still in the browser, finish the payment
  6. The DropInActivity is launched and crashes

Here is the crash stack trace:

    java.lang.RuntimeException: Unable to start activity ComponentInfo{{our_package}/com.adyen.checkout.dropin.ui.DropInActivity}: com.adyen.checkout.core.exception.CheckoutException: Failed to initialize Drop-in, did you manually launch DropInActivity?
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7839)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
     Caused by: com.adyen.checkout.core.exception.CheckoutException: Failed to initialize Drop-in, did you manually launch DropInActivity?
        at com.adyen.checkout.dropin.ui.viewmodel.DropInViewModel.getStateValueOrFail(DropInViewModel.kt:117)
        at com.adyen.checkout.dropin.ui.viewmodel.DropInViewModel.<init>(DropInViewModel.kt:62)
        at com.adyen.checkout.dropin.ui.viewmodel.DropInViewModelFactory.create(DropInViewModelFactory.kt:22)
        at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:97)
        at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:87)
        at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187)
        at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153)
        at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:53)
        at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35)
        at com.adyen.checkout.dropin.ui.DropInActivity.getDropInViewModel(DropInActivity.kt:93)
        at com.adyen.checkout.dropin.ui.DropInActivity.onCreate(DropInActivity.kt:175)
        at android.app.Activity.performCreate(Activity.java:8051)
        at android.app.Activity.performCreate(Activity.java:8031)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at android.app.ActivityThread.main(ActivityThread.java:7839) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 

Here is what we've found from our debugging:

  1. Finishing payment in the browser launches an intent with scheme adyencheckout.
  2. Since the Adyen SDK declares an intent-filter for handling this scheme and there is no existing DropInActivity, the system creates a DropInActivity.
  3. This created activity will be in the form of an intent with an empty extra bundle
  4. In DropInActivity.onCreate, the DropInViewModel is created
  5. On initialisation, the DropInViewModel attempts to read the configuration from SavedStateHandle. When DropInActivity is initialised via the Adyen SDK, the SavedStateHandle will be populated with default arguments which come from the DropInActivity intent. Since the DropInActivity in this case has been initialised by the android system, those intent extras do not exist. So the SavedStateHandle will have no value for the configuration and the Adyen SDK throws a CheckoutException
  6. Since there is no handling for a CheckoutException, the app crashes

If our diagnosis of the crash is correct then a potential fix might be to detect when the system has launched DropInActivity vs when it's been launched by the SDK (checking for intent extras would be one way to detect). If it's been launched by the system, the DropInActivity could perhaps launch an intent for our apps to optionally handle. Then our apps could reinitialise the DropInComponent again with the Adyen SDK if needed.

ryancfogarty avatar Aug 12 '22 14:08 ryancfogarty

Hi @rfogar2 thanks a lot for the detailed investigation! This behaviour you described is exactly what we also believe is happening. Usually this won't happen if the system decides to kill the app in the background because we can recover the state using SaveStateHandle. The problem is that if the user decides to manually close the app there isn't much we can do really to make sure the payment process goes through.

So the immediate "fix" for this issue would probably be to not throw an exception and cause a crash but perhaps logging an error instead and closing DropInActivity gracefully.

DropInActivity could perhaps launch an intent for our apps to optionally handle

That's a very good idea but it's not a quick fix indeed, it needs a certain level of effort from our side as well as some additional implementation on your side. We'll make sure to analyse it more internally and try to come up with the best solution.

jreij avatar Aug 12 '22 15:08 jreij

@jreij Thanks for the quick response. Looking forward to seeing what fix you come up with!

ryancfogarty avatar Aug 15 '22 08:08 ryancfogarty

Hi @jreij , any updates on this? We are seeing ~300 crashes a week and would love to be able to recover from it more gracefully.

ryancfogarty avatar Sep 14 '22 10:09 ryancfogarty

Hi @rfogar2 , for the short term all we can do is suppress the crash and log an error instead, but I don't think that would help you much since you can simply ignore this specific crash right?

As for a proper solution I don't think we can work on that in the short term, as we are working on a big update that will change much of the internal flow, so it will have to be done after this update.

But anyway, looking at the numbers, 300 crashes a week seems quite a lot for the scenario we analysed, it's not very common that a user will open the page in Chrome instead of custom tabs, kill the app, go back to Chrome and then finish the payment, I wonder if we missed something :thinking: Or is your user base perhaps huge that 300 is a small number?

jreij avatar Sep 14 '22 12:09 jreij

@jreij it doesn't always require the user to open it in Chrome; for example it happens if the user has Firefox set as their default browser.

tomgilder avatar Sep 15 '22 10:09 tomgilder

Hi @jreij I think i have the same issue, my stack trace is the same as the ones above but for me the crash happens 100% on the test environment after confirming an Ideal payment. I am using version 4.7.1

Unable to start activity ComponentInfo{com.hoogvliet.android.app/com.adyen.checkout.dropin.ui.DropInActivity}: com.adyen.checkout.core.exception.CheckoutException: Failed to initialize Drop-in, did you manually launch DropInActivity?
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3114)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3257)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1948)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7050)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
     Caused by: com.adyen.checkout.core.exception.CheckoutException: Failed to initialize Drop-in, did you manually launch DropInActivity?
        at com.adyen.checkout.dropin.ui.viewmodel.DropInViewModel.getStateValueOrFail(DropInViewModel.kt:117)
        at com.adyen.checkout.dropin.ui.viewmodel.DropInViewModel.<init>(DropInViewModel.kt:62)
        at com.adyen.checkout.dropin.ui.viewmodel.DropInViewModelFactory.create(DropInViewModelFactory.kt:22)
        at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:69)
        at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:185)
        at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.java:150)
        at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:54)
        at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:41)
        at com.adyen.checkout.dropin.ui.DropInActivity.getDropInViewModel(DropInActivity.kt:93)
        at com.adyen.checkout.dropin.ui.DropInActivity.onCreate(DropInActivity.kt:175)
        at android.app.Activity.performCreate(Activity.java:7327)
        at android.app.Activity.performCreate(Activity.java:7318)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3094)

ionutgh avatar Sep 19 '22 07:09 ionutgh

Hi @ionutgh , are you able to reproduce it 100% of the time without killing the main app during the ideal redirect?

Can you please share some info about your environment? For example:

  • Device model
  • Emulator or real device?
  • OS version
  • Browser type and version
  • Redirect opening in custom tabs or in separate browser window?
  • is Don't keep activities turned on in developer options?

jreij avatar Sep 19 '22 09:09 jreij

Hi @jreij , yes, i am able to reproduce this 100% on the test environment using the Ideal payment type. Here is the info you requested: Device Model: Samsung galaxy s8 - SM-G950F(real device) Android 9 The redirect seems to be opening in a chrome custom tab - the chrome version on the device is 105.0.5195.136 The Don't keep activities option is not turned on

ionutgh avatar Sep 19 '22 10:09 ionutgh

Thanks @ionutgh , does this also happen on other devices?

jreij avatar Sep 19 '22 12:09 jreij

Hi @jreij , it also happens on a pixel5_api32 emulator. It doesn't seem that in my case the DropInActivity is destroyed, if i don't confirm the payment and just close the webpage, i am being returned to the app with the dropin dialog visible on screen. It just seems that DropinViewModel's saveState is somehow lost. I am thinking, as a workaround, to try to handle the redirect url myself and just start the dropinactivity manually, creating the intent again. Adding the initial data to the intent would be pretty straightforward, i am not sure about how to pass the data from the redirect url to this new DropinActivity intent.

ionutgh avatar Sep 20 '22 06:09 ionutgh

@ionutgh I don't think we need a workaround for your case, this shouldn't happen 100% of the time no matter what. Let's get some more info to figure out what's happening. Can you enable extensive logs by calling com.adyen.checkout.core.log.Logger.setLogcatLevel(Log.VERBOSE) in your application class and filter your logs by CO. to see the checkout logs only and send them here?

jreij avatar Sep 20 '22 07:09 jreij

Hey @jreij , here are the logs:

2022-09-20 11:10:34.094 CO.KotlinBase com.hoogvliet.android.app V Running Kotlin 2022-09-20 11:10:34.127 CO.DropIn com.hoogvliet.android.app D startPayment from Fragment 2022-09-20 11:10:34.131 CO.DropInPrefs com.hoogvliet.android.app V setShopperLocale: en_US 2022-09-20 11:10:34.131 CO.DropInPrefs com.hoogvliet.android.app D Storing shopper locale tag: en-US 2022-09-20 11:10:34.268 CO.DropInActivityKt com.hoogvliet.android.app D attachBaseContext 2022-09-20 11:10:34.268 CO.DropInPrefs com.hoogvliet.android.app V getShopperLocale 2022-09-20 11:10:34.275 CO.DropInPrefs com.hoogvliet.android.app D Fetching shopper locale tag: en-US 2022-09-20 11:10:34.276 CO.DropInPrefs com.hoogvliet.android.app D Parsed locale: en_US 2022-09-20 11:10:34.342 CO.DropInActivityKt com.hoogvliet.android.app D onCreate - null 2022-09-20 11:10:34.405 CO.DropInActivityKt com.hoogvliet.android.app D showComponentDialog 2022-09-20 11:10:34.430 CO.DropInActivityKt com.hoogvliet.android.app D handleIntent: action - null 2022-09-20 11:10:34.434 CO.DropInActivityKt com.hoogvliet.android.app E Unable to find action 2022-09-20 11:10:34.435 CO.DropInActivityKt com.hoogvliet.android.app D sendAnalyticsEvent 2022-09-20 11:10:34.466 CO.DropInActivityKt com.hoogvliet.android.app V onStart 2022-09-20 11:10:34.528 CO.Generic...ogFragment com.hoogvliet.android.app D onViewCreated 2022-09-20 11:10:34.572 CO.IssuerL...cyclerView com.hoogvliet.android.app V onChanged 2022-09-20 11:10:34.587 CO.DropInServiceKt com.hoogvliet.android.app D bindService - DropInActivity 2022-09-20 11:10:34.607 CO.DropInActivityKt com.hoogvliet.android.app V onResume 2022-09-20 11:10:34.708 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1121, small 2022-09-20 11:10:34.722 CO.LogoConnectionKt com.hoogvliet.android.app V call - 2015018506 2022-09-20 11:10:34.728 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1154, small 2022-09-20 11:10:34.731 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1522057642 2022-09-20 11:10:34.735 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1153, small 2022-09-20 11:10:34.748 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1392974923 2022-09-20 11:10:34.762 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1152, small 2022-09-20 11:10:34.775 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1263892204 2022-09-20 11:10:34.796 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1163, small 2022-09-20 11:10:34.804 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1151, small 2022-09-20 11:10:34.807 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1099571916 2022-09-20 11:10:34.830 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1134809485 2022-09-20 11:10:34.830 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1162, small 2022-09-20 11:10:34.833 CO.LogoConnectionKt com.hoogvliet.android.app V call - 970489197 2022-09-20 11:10:34.847 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1161, small 2022-09-20 11:10:34.872 CO.LogoConnectionKt com.hoogvliet.android.app V call - 841406478 2022-09-20 11:10:34.909 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1160, small 2022-09-20 11:10:34.913 CO.LogoConnectionKt com.hoogvliet.android.app V call - 712323759 2022-09-20 11:10:34.932 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1159, small 2022-09-20 11:10:34.942 CO.LogoConnectionKt com.hoogvliet.android.app V call - -2127496059 2022-09-20 11:10:34.946 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1158, small 2022-09-20 11:10:34.955 CO.LogoConnectionKt com.hoogvliet.android.app V call - 2038388518 2022-09-20 11:10:34.965 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1157, small 2022-09-20 11:10:34.974 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1909305799 2022-09-20 11:10:34.980 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1156, small 2022-09-20 11:10:34.996 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1780223080 2022-09-20 11:10:35.030 CO.LogoApi com.hoogvliet.android.app V getLogo - ideal, 1155, small 2022-09-20 11:10:35.056 CO.LogoConnectionKt com.hoogvliet.android.app V call - 1651140361 2022-09-20 11:10:35.261 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.356 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.368 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.399 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.400 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.403 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.413 CO.DropInServiceKt com.hoogvliet.android.app D onCreate 2022-09-20 11:10:35.415 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.422 CO.DropInServiceKt com.hoogvliet.android.app D onBind 2022-09-20 11:10:35.440 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.523 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.529 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.533 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.536 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.556 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.569 CO.LogoConnectionTask com.hoogvliet.android.app E Execution failed for logo - https://checkoutshopper-test.adyen.com/checkoutshopper/images/logos/small/ideal/1163-xxhdpi.png 2022-09-20 11:10:35.619 CO.AnalyticsDispatcher com.hoogvliet.android.app V Sending analytic event. 2022-09-20 11:10:35.669 CO.DropInActivityKt com.hoogvliet.android.app D onServiceConnected 2022-09-20 11:10:35.734 CO.LogoConnectionTask com.hoogvliet.android.app V done 2022-09-20 11:10:35.850 CO.AnalyticsDispatcher com.hoogvliet.android.app V Sending analytic event. 2022-09-20 11:10:40.217 CO.Clickab...lerAdapter com.hoogvliet.android.app D click 2022-09-20 11:10:40.217 CO.IssuerL...cyclerView com.hoogvliet.android.app D onItemClicked - 0 2022-09-20 11:10:40.220 CO.BasePaymentComponent com.hoogvliet.android.app V inputDataChanged 2022-09-20 11:10:40.221 CO.BasePaymentComponent com.hoogvliet.android.app D notifyStateChanged with OutputData 2022-09-20 11:10:40.223 CO.BasePaymentComponent com.hoogvliet.android.app D notifyStateChanged 2022-09-20 11:10:40.280 CO.Compone...gViewModel com.hoogvliet.android.app V componentStateChanged - componentState.isInputValid: true - componentState.isReady: true - confirmationRequired: false 2022-09-20 11:10:40.281 CO.BaseCom...ogFragment com.hoogvliet.android.app V state: PAYMENT_READY 2022-09-20 11:10:40.282 CO.DropInActivityKt com.hoogvliet.android.app D requestPaymentsCall 2022-09-20 11:10:40.284 CO.DropInViewModelKt com.hoogvliet.android.app D Payment amount set: Amount(EUR, 7698) 2022-09-20 11:10:40.284 CO.DropInServiceKt com.hoogvliet.android.app D requestPaymentsCall 2022-09-20 11:10:40.304 CO.Compone...gViewModel com.hoogvliet.android.app V paymentStarted 2022-09-20 11:10:40.306 CO.BaseCom...ogFragment com.hoogvliet.android.app V state: IDLE 2022-09-20 11:10:42.037 CO.DropInServiceKt com.hoogvliet.android.app D dispatching DropInServiceResult 2022-09-20 11:10:42.048 CO.DropInActivityKt com.hoogvliet.android.app D handleDropInServiceResult - Action 2022-09-20 11:10:42.050 CO.ActionHandler com.hoogvliet.android.app D handleAction - redirect 2022-09-20 11:10:42.160 CO.ActionHandler com.hoogvliet.android.app D handleAction - loaded a new component - RedirectComponent 2022-09-20 11:10:42.163 CO.RedirectDelegateKt com.hoogvliet.android.app D makeRedirect - https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=X3XtfGC7%21H4sIAAAAAAAAAI1U%2FW%2BiMBj%2BX0jcLzcQKKKYmAURnW5Tx01vu5gsFar0hqVXipsu%2B9%2BvRbk53X0kTaDv%2B7xfT5%2F2VeklOaJwiTqQQ6X5qswZJJGXRkhpKjhCMFHOFfRCMUOZy4XN1E1T1R3VNO4MvSmWZX3RzaauCxyOBKA3NhyvbekdtwH8tt0GpvCsEAtjSLgbhmlOZJ7LNF2uE4x4e%2BqNbgSEoUgUCfkYblaI8LIfuNoFvCphzhgi4UYE%2B5NARKyh6F1p1m3HeTtXIMVTxDKcEqVpN%2BSeJjiEXBj6ZJEWuaINItdYjMg2ck%2FgSo5ZmNUfcA1VkURN9gBRoMynGHUNaLryJup8RlAYo%2FApzbknZiQoER6XRCwVfPzX6CUkQAskR5SpdQPUTVADwp0yvMQEJuOMHiK8y%2BEA3NjWwGpfD68akmYKkwBlecKPoJc342MoQz9zlHE3irCkCCa%2FCf%2FIm7anY3rMxXvbfcLRkhUR2jtldkM5OYQy2fAfxDNEEeRqSlSOV0gQK8ALmGToD1X5hu4Y8b2r0eTusecP%2FaDvKW8yFc8ZmTB5KDHnNGvOqrNqeWBZnFKKmMoFFVrRjhamqxP%2Fu2GvzqDIerGkOGp9KvgMJULLKGpLtRwoJXvCZC8ems%2B1tak1dMO2HAdYhgl0YFoa8R4C9Oxug95o6E%2Bia7Z1vn9zbn1r4D4Go20QL%2B4b83u8ztfubsDdvTke8XikmNJZtWhjVu1nWY7YWFz7C8FPqwiqALdidsX6OzengAPLB3YqoCv5qYDOKUMV06YZ9cM4lbITkGOFVswacOXNLn4MwzSKnxqwi%2B9tvxvgyR24TWpib7a70Hlm29SZP48HnZcniemIGpy9FA3IeNN4tKb9IXgIN1%2BFC4WfVD3bvTatuq05zln54LR2z82hkgo6yql3ikpXWlxebA3urr8m9C8ejV9dkmUBZgUAAA%3D%3Dfex4pG9cTD72u5QF0yT5aoMxYZTP0vw9uhVS0gfXPUs%3D 2022-09-20 11:10:45.463 CO.DropInActivityKt com.hoogvliet.android.app V onStop 2022-09-20 11:10:45.493 CO.DropInServiceKt com.hoogvliet.android.app D unbindService - DropInActivity 2022-09-20 11:10:45.550 CO.DropInActivityKt com.hoogvliet.android.app D onSaveInstanceState 2022-09-20 11:10:45.600 CO.DropInServiceKt com.hoogvliet.android.app D onUnbind 2022-09-20 11:10:45.603 CO.DropInServiceKt com.hoogvliet.android.app D onDestroy 2022-09-20 11:10:58.223 CO.DropInActivityKt com.hoogvliet.android.app D attachBaseContext 2022-09-20 11:10:58.226 CO.DropInPrefs com.hoogvliet.android.app V getShopperLocale 2022-09-20 11:10:58.231 CO.DropInPrefs com.hoogvliet.android.app D Fetching shopper locale tag: en-US 2022-09-20 11:10:58.233 CO.DropInPrefs com.hoogvliet.android.app D Parsed locale: en_US 2022-09-20 11:10:58.354 CO.DropInActivityKt com.hoogvliet.android.app D onCreate - null 2022-09-20 11:10:58.420 CO.DropInViewModelKt com.hoogvliet.android.app E Failed to initialize bundle from SavedStateHandle

ionutgh avatar Sep 20 '22 08:09 ionutgh

Thanks, can you share your manifest as well? Do you have any flags set like singleTask, singleTop, singleInstance, etc? It seems like your app is destroying DropInActivity when the ideal web page deep links back to it.

jreij avatar Sep 20 '22 08:09 jreij

@jreij here is the whole manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.nakko.hoogvliet.android">

    <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <!-- GMaps -->

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- App (GPlay location), GMaps -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- GMaps -->
    <uses-permission android:name="android.permission.INTERNET" /> <!-- App, GMaps -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <application>

        <uses-library android:name="org.apache.http.legacy" android:required="false" />

        <activity
            android:name="com.nakko.hoogvliet.android.activity.SplashScreenActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:theme="@style/AppTheme"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.nakko.hoogvliet.android.activity.DeepLinkHandlerActivity"
            android:exported="true"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv"
            android:noHistory="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="hv" />
                <data android:scheme="hvacc" />
                <data android:scheme="hoogvliet" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.WebViewActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.SplashScreenActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.SplashScreenActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.NotificareWebViewActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.TutorialActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv"
            android:windowSoftInputMode="adjustNothing"/>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:exported="false"
            android:label="@string/app_name"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv"
            android:windowSoftInputMode="adjustNothing"/>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ProductFullImageActivity"
            android:exported="false"
            android:theme="@style/TransparentActivity"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.CustomerCardActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/customer_card_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
            <meta-data android:name="android.app.searchable"
                android:resource="@xml/searchable_location"/>
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.PrivacyPolicyActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/privacy_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.TermsAndConditionsActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/terms_and_conditions_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.RecallDetailsActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/recall_details_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.CustomerServiceActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/customer_service_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
            <meta-data android:name="android.app.searchable"
                android:resource="@xml/searchable_location"/>
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.SelectLocationActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/locations_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
            <meta-data android:name="android.app.searchable"
                android:resource="@xml/searchable_location"/>
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.AddAddressActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/add_address_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.SelectLocationActivity"
            android:windowSoftInputMode="stateVisible"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.SelectLocationActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.AddBasketActivity"
            android:exported="false"
            android:label="@string/location_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.SelectTimeslotActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/add_address_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.AddBasketActivity"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.AddBasketActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ViewBasketActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/add_address_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ViewShoppingListActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/add_address_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ViewBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ViewBasketActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ConfirmBasketActivity"
            android:exported="true"
            android:theme="@style/AppTheme"
            android:label="@string/basket_confirm_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ViewBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTask"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ViewBasketActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.BuyMoreActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/basket_confirm_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ViewBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTask"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ViewBasketActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.OutOfStockActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/basket_confirm_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ViewBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTask"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ViewBasketActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.SelectPaymentMethodActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/basket_confirm_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ConfirmBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTask"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ConfirmBasketActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ViewOldOrderActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/old_orders_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ViewInspirationalListActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/inspiration_list_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.ViewWishListActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/wish_list_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.HomeActivity" />
        </activity>
        <activity
            android:name="com.nakko.hoogvliet.android.activity.AdyenPrepayActivity"
            android:exported="false"
            android:theme="@style/AppTheme"
            android:label="@string/basket_prepay_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ConfirmBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ConfirmBasketActivity" />
        </activity>


        <!-- This will be the notification UI activity -->
        <activity
            android:name="re.notifica.ui.NotificationActivity"
            android:exported="false"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.HomeActivity"
            android:hardwareAccelerated="true"
            android:theme="@style/AppTheme.Translucent">
        </activity>

        <!-- If you are using the loyalty add-on -->
        <activity
            android:name="re.notifica.ui.PassbookActivity"
            android:exported="true"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:hardwareAccelerated="true">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:host="push.notifica.re"
                    android:pathPrefix="/pass/forapplication/{notificareAppId}"
                    android:scheme="https" />
            </intent-filter>
        </activity>

        <service android:name="com.nakko.hoogvliet.android.receiver.HVFirebaseMessagingService"
            android:exported="false"
            android:label="Notificare Push Service">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
            </intent-filter>
        </service>

        <service android:name=".adyen.HoogvlietDropInService" android:exported="false"/>
        <service android:name=".AdyenDropInService" android:exported="false"/>

        <receiver android:name="com.nakko.hoogvliet.android.receiver.NotificareIntentReceiver" android:exported="false" />

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="xxxxxxxxxxxxxxxxx"/>
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version"/>

        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="xxxxxxxxxxxxxxxxxx" />

    </application>
</manifest>

The parent activity for the fragment that launches DropIn is ConfirmBasketActivity:

<activity
            android:name="com.nakko.hoogvliet.android.activity.ConfirmBasketActivity"
            android:exported="true"
            android:theme="@style/AppTheme"
            android:label="@string/basket_confirm_title"
            android:configChanges="orientation"
            android:screenOrientation="portrait"
            android:parentActivityName="com.nakko.hoogvliet.android.activity.ViewBasketActivity"
            android:windowSoftInputMode="stateHidden"
            android:launchMode="singleTask"
            android:taskAffinity="com.nakko.hoogvliet.android.taskAffinity.hv">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.nakko.hoogvliet.android.activity.ViewBasketActivity" />
        </activity>

indeed it uses singleTask LE: I have removed the flag from this activity but the issue still remains

ionutgh avatar Sep 20 '22 09:09 ionutgh

@ionutgh you are using android:taskAffinity on every activity you have, I am not entirely sure how this will affect DropInActivity but from the docs:

The task that the activity has an affinity for. Activities with the same affinity conceptually belong to the same task (to the same "application" from the user's perspective).

So since we cannot set your taskAffinity in our DropInActivity, I suspect that the system might be destroying it, causing this issue. Can you remove this attribute from all activities? It's exactly the same in all of them anyway and the docs mention:

By default, all activities in an application have the same affinity

jreij avatar Sep 20 '22 10:09 jreij

@jreij Thank you, i was able to actually just add the same android:taskAffinity to the DropInActivity in my manifest and now it seems to be working.

ionutgh avatar Sep 20 '22 12:09 ionutgh

For the moment we will gracefully handle this issue by suppressing the crash and logging an error, this will roll out in the next release 4.8.0.

As mentioned earlier, so far we thought of 2 ways this issue could happen:

  • After the redirect happens, the user decides to manually kill the app, then goes back to the browser and completes the payment, with the condition that the redirect is not launched in custom tabs but in an external browser. This scenario should not be common at all and we consider it an edge case.
  • After the payment is finished, the payment page is still in the browser and did not close (for whatever reason) and the user went back and confirmed the payment again, in this case gracefully ignoring the redirect is the better approach to avoid double payments.

In all cases it is very tricky to deal with this issue as we have no way of retrieving any of the previous state that drop-in was in, when the redirect was launched. We are looking into multiple solutions, none of which are simple or straightforward, so we don't expect this issue to have a full solution any time soon. Sorry for the inconvenience, we'll make sure to update this ticket once we have anything new.

jreij avatar Sep 22 '22 14:09 jreij

Hey @jreij , We are facing this issue in our live application in some android devices.

AdyenSDK version : 4.8.0 backend : “adyen/php-api-library”: “^4.2",

In testing environment with testing cards we are able to pass 3DS (with the same code base both backend and android)and make payment or save cards

but in production we are getting error while adding 3DS credit cards btw We are facing this issue in only Android

Can you help us to solve this issue? Any suggestions?

What we tried so far;

  1. The original issue happened in version 4.4.0
  2. Then we upgraded to 4.8.0
  3. Now we are testing in 4.12.0 but it isn't fixed yet.

Error log:

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rightcab.eighttwentycabs/com.adyen.checkout.dropin.ui.DropInActivity}: com.adyen.checkout.core.exception.CheckoutException: Failed to initialize Drop-in, did you manually launch DropInActivity?
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4169)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8757)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by com.adyen.checkout.core.exception.CheckoutException: Failed to initialize Drop-in, did you manually launch DropInActivity?
       at com.adyen.checkout.dropin.ui.DropInViewModel.getStateValueOrFail(DropInViewModel.kt:119)
       at com.adyen.checkout.dropin.ui.DropInViewModel.getDropInConfiguration(DropInViewModel.kt:64)
       at com.adyen.checkout.dropin.ui.DropInViewModel.<init>(DropInViewModel.kt:64)
       at com.adyen.checkout.dropin.ui.DropInViewModelFactory.create(DropInViewModelFactory.kt:24)
       at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:97)
       at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:87)
       at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187)
       at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153)
       at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:53)
       at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35)
       at com.adyen.checkout.dropin.ui.DropInActivity.<clinit>(DropInActivity.kt:89)
       at com.adyen.checkout.dropin.ui.DropInActivity.getDropInViewModel(DropInActivity.kt:89)
       at com.adyen.checkout.dropin.ui.DropInActivity.onCreate(DropInActivity.kt:176)
       at android.app.Activity.performCreate(Activity.java:8591)
       at android.app.Activity.performCreate(Activity.java:8570)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4150)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4325)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8757)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

onatcipli avatar Jul 07 '23 15:07 onatcipli

Hi @onatcipli, thanks for reaching out. I have a few follow up questions:

  • Can you update to the latest version and share the exception logs? (even if they look similar to the ones you shared)
  • When exactly does this happen during the payment process?
  • Do you have any more info on how to reproduce this issue? Any specific device? Which test card? Native 3DS2 or 3DS? Any extra info would be helpful!

jreij avatar Jul 10 '23 12:07 jreij

Hi @jreij,

We upgraded the Adyen SDK to latest which is 4.12.1 and still getting the issue.

it is happening after 3DS verification step after we enter verification code and return to app.

I couldn't find any specific device for that I think it is usual.

And it is not happening with the Test Cards its only happening in Production with real credit cards.

com.adyen.checkout.adyen3ds2.exception.Authentication3DS2Exception: Protocol Error -
transactionID: 76f92995-05a7-4722-becb-ebddfd562b12
errorCode: 201
errorDescription: Required Data Element Missing.
errorDetails: Invalid JSON for MessageResponse. No value for threeDSServerTransID
Screenshot 2023-07-12 at 17 27 38

and also our backend Adyen SDK version is lower than the recommended We are working on that to upgrade it too. Do you recommend that it could be related or not with the BE Adyen SDK version?

I will keep you updated about the process and in the mean time Do you have any solution to by pass or fix?

onatcipli avatar Jul 12 '23 14:07 onatcipli