Closed davidweissler closed 1 year ago
That's an odd crash — it looks like this is an iPad Air 2, and the Secure Element isn't responding during the [PKPaymentAuthorizationController canMakePaymentsUsingNetworks:]
call, which is causing the app to hang during launch and eventually be killed by the system watchdog.
This sounds like an Apple bug, so I think the only thing we can do is file a Feedback Assistant ticket. How many of these crashes are you seeing? Are you able to reproduce it on your own devices?
In the last release of our app, it looks like there's about 30 devices crashing due to this.
I have tried a lot but have not been able to repro this myself unfortunately. And the crash occurs on varying devices, iPhones and iPads.
Edit to add: I guess I was also curious if other users have seen/reported this issue before, that you're aware of?
Edit to add: I guess I was also curious if other users have seen/reported this issue before, that you're aware of?
I have not, and I can't find any references to similar issues online. 😞
One idea: Could you try dispatching reportAppOpenValue
to run slightly after launch? Here's a wild guess of what might be happening:
StripeAPI.deviceSupportsApplePay
queries [PKPaymentAuthorizationController canMakePaymentsUsingNetworks:]
in PassKit.[PKInAppPaymentService secureElementStatus:]
makes an XPC connection to passd
(the Apple Pay daemon) from the main thread, requesting the status of the secure element.passd
blocks the XPC response while waiting for your app to finish launching. (I'm not sure why this would happen. Maybe PassKit would usually do some initialization with passd
in a background thread at app launch, but it's racing with UIApplication.didFinishLaunchingWithOptions:
on the main thread, which is why only some devices are crashing?)[PKInAppPaymentService secureElementStatus:]
. So passd
never responds to the XPC request, and your app hangs until Frontboard kills the process.@davidme-stripe thanks for the suggestion! I was trying to see if some other code we might have been doing would cause the blocked thread. It might be a few weeks to test adding a delay in production, so let me know if it's ok to keep this issue open for a little bit and I can post an update here.
@davidweissler closing this out for as stale, feel free to re-open if needed.
@davidweissler Hi,Have you solved this problem? I also encountered the same problem
Summary
We're seeing crashes when calling
StripeAPI.deviceSupportsApplePay()
Code to reproduce
The code is just a series of calls that ends with a call to
StripeAPI.deviceSupportsApplePay()
iOS version
15.3.1 (19D52)
Installation method
SPM
SDK version
22.3.0
Other information
Example crash log
stripe_crash.txt