PayPal SDK Buttons: unhandled_error [Error: Window closed]
See original GitHub issuePayPal Smart Button: unhandled error when popup closed before it loads

paypal.version
: 5.0.117- Chrome: Version: 80.0.3987.162
- Cannot provide a public URL (yet)
- Error always occurs
- Also occurs in https://developer.paypal.com/demo/checkout
Code snippet:
paypal.Buttons({
style: {
layout: 'vertical',
color: 'gold',
shape: 'pill',
label: 'paypal'
},
env: 'sandbox',
client: {
sandbox,
production
},
locale: 'en_GB',
createBillingAgreement: onPaypalCreateBillingAgreement,
onApprove: onPaypalApprovedPayment,
onCancel: onPaymentCancelled,
onError: onPaymentError
}).render('#braintree-paypal-cta');
Where onPaypalCreateBillingAgreement
simply does paypalCheckoutInstance.createPayment({ flow: 'vault', enableShippingAddress: false })
Steps to reproduce
- Click on PayPal Smart Button
- Close the popup before loader stops
Affected browsers
- Chrome
- Safari
- Firefox
- Edge
- IE
- Chrome Mobile/Tablet
- Safari Mobile/Tablet
- Web View / Safari ViewController
- Other
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:28 (11 by maintainers)
Top Results From Across the Web
Handle Errors - PayPal Developer
Buyer checkout error. If an error prevents buyer checkout, alert the user that an error has occurred with the buttons using the onError...
Read more >In My Paypal Server Side Integration, The Payment Popup ...
The button calls PayPal Orders API to set up a transaction. ... unhandled error[Bug] New window closes We have been getting mixed results ......
Read more >Paypal Checkout window closes immediately in WKWebView ...
It was wroking fine but suddenly the Paypal buttons starts working strangely as I click paypal button it opens checkout page and suddenly...
Read more >Clicking on Paypal button quickly opens/closes external ...
Problem When you enable Paypal within the Commerce Braintree module and then ... Then an external Paypal window quickly opens and closes ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any news on this? We’re experiencing the same issue.
Hi @cusero – sorry, the discussion got a little sidetracked on an unrelated issue. I’ll take a look at the problem you initially reported. Thanks.