-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Bug Report: Persistent Backdrop After Cancelling PayPal Payment on Android
Description
When using PayPal payment method through Adyen React Native SDK on Android, if the user closes the PayPal webview, the Adyen SDK displays a modal with "A payment process is still active - Awaiting completion..." and a CANCEL button with a backdrop. When the user dismisses this modal by tapping the backdrop, the backdrop itself persists and blocks all user interactions with the app, making it unusable.
Environment
- Adyen React Native SDK Version:
2.6.1 - React Native Version:
0.78.3 - Platform: Android (primary issue)
- Payment Method: PayPal
- Integration Type: Advanced Flow with
nativeComponent.handle(result.action)
Steps to Reproduce
- Initialize payment with PayPal as the selected payment method on Android device
- Call the payment API which returns an action with a redirect URL
- Call
nativeComponent.handle(result.action)to process the PayPal action - Adyen SDK opens PayPal in a webview/browser
- User closes the PayPal window without completing payment
- Adyen SDK shows a modal: "A payment process is still active" with "Awaiting completion..." and a CANCEL button
- User taps on the backdrop (semi-transparent overlay) to dismiss the modal
- Expected: Modal and backdrop should both disappear completely
- Actual: Modal disappears but backdrop remains, blocking all app interactions
Expected Behavior
When the user dismisses the "A payment process is still active" modal (either by tapping backdrop or CANCEL button), both the modal AND the backdrop should be completely removed, allowing the user to interact with the app normally.
Actual Behavior
- The modal dialog disappears when tapping the backdrop
- The backdrop (semi-transparent overlay) persists on the screen
- The backdrop blocks ALL user interactions with the underlying app
- The app becomes completely unusable until force-closed and restarted
- No React Native callbacks are triggered (
didFailCallback,didCompleteCallback,didProvideCallback)
Code Example
import { AdyenCheckout } from '@adyen/react-native';
// In payment submission callback
const didSubmitCallback = (val, nativeComponent) => {
const params = {
// ... payment parameters
};
PaymentAPIClient.getInstance()
.fetchPayments(params)
.then((result) => {
if (result.action) {
// This triggers the PayPal flow
nativeComponent.handle(result.action);
}
})
.catch((error) => {
// Error handling
});
};
// Error callback - NOT triggered when user closes PayPal
const didFailCallback = (error, nativeComponent) => {
console.log('Error:', error); // This is never called
nativeComponent.hide(true, { message: error.message });
};
<AdyenCheckout
config={configuration}
paymentMethods={paymentMethods}
onSubmit={didSubmitCallback}
onError={didFailCallback}
onComplete={didCompleteCallback}
>
{/* Payment UI */}
</AdyenCheckout>
PayPal opening on Android
Closing PayPal
Modal appearing
Tapping backdrop
Modal disappearing but backdrop remaining and blocking interaction]
Observed Behavior Details
No callbacks triggered: When the user closes the PayPal window, none of the React Native callbacks are invoked:
didFailCallback (onError) - not called
didCompleteCallback (onComplete) - not called
didProvideCallback (onAdditionalDetails) - not called
Native SDK state: The Adyen native SDK appears to be stuck in a waiting state, showing the "Awaiting completion" modal but not properly cleaning up the backdrop when the modal is dismissed.
Backdrop behavior: The backdrop appears to be managed by a separate layer in the native SDK that isn't properly dismissed when the modal is closed.
Android-Specific Context
Looking at the native Android implementation (ActionFragment.kt), the issue appears to be related to how the dialog/action fragment manages its backdrop when dismissed. The backdrop layer is not being properly removed when the dialog is dismissed by tapping outside.
