I face the bug in Safari 15.0 (17612.1.26.1.3) on macOS 12.0 Beta (21A5304g) on MacBook Air 2020 (M1). I don't face the bug in Safari 15.0 on iOS 15.0 Beta (19A5307g) on iPhone 12 mini. I don't face the bug in Safari TP 15.0 (16612.1.24.11.7) on macOS 11.5.1 on macBook Pro 15" 2015. I don't face the bug in Safari 13.1.2 on iOS 13.6.1 on iPhone SE (1st gen). Calling ApplePaySession.canMakePayments() holds the main JS thread for 250ms regardless. It takes less than 15ms in other versions of Safari. Calling ApplePaySession.canMakePaymentsWithActiveCard('anyid') holds the main JS thread for 250ms when checking for Apple Pay is disabled in Safari settings. It takes less than 1ms in other versions of Safari (the synchronous part, no the promise resolution time). In order to reproduce, open any HTTPS page and run the following code in the browser console: console.time('canMakePayments'); console.log(ApplePaySession.canMakePayments()); console.timeEnd('canMakePayments'); console.time('canMakePaymentsWithActiveCard promise initialization'); ApplePaySession.canMakePaymentsWithActiveCard('anyid').then(() => { console.timeEnd('canMakePaymentsWithActiveCard promise resolution'); }); console.timeEnd('canMakePaymentsWithActiveCard promise initialization'); console.time('canMakePaymentsWithActiveCard promise resolution'); The "canMakePayments" and "canMakePaymentsWithActiveCard promise initialization" durations are expected to be small (<16ms) in order not to block the browser.
Update: in order to reproduce, disable checking for Apple Pay in Safari settings, open any HTTPS page and run the code from the previous message
I've tried to disable all the Safari extensions, the result is the same.
I face the bug in Safari 14.1 (16611.1.21.161.1) on macOS 11.3.1 on MacBook Pro 2020 (M1) with a couple of debit cards added to the Apple Pay. So the issue can be caused by the hardware, not the software.
<rdar://problem/82108249>