-
Notifications
You must be signed in to change notification settings - Fork 308
Description
Braintree SDK Version
6.35.0 and above
Environment
Production
Xcode Version
Xcode 16.4.0
OS Version & Device
Seems to span multiple iOS versions and devices (including most recent iOS 18.6.2 and iPhone 16 Pro)
Integration type
Swfit Package Manager
Development Processor
Apple Silicon (M-series chips)
Describe the bug
Summary
Our crash reporting system started reporting app crashes in the first version where we upgraded the Braintree iOS SDK from 6.34.0 to 6.35.0. We're on 6.37.0 now and the issue is still occurring.
We haven't made any code changes in our payments code that integrates with the Braintree SDK for months, so long before when this started happening.
The crash does not consistently happen, and it occurs at various points in the user journey, so there appears to be a race or timing issue of some sort involved. However, it has affected over a thousand clients in the past month.
Crash info
The crash report is consistent however: a segmentation fault when calling BTWebAuthenticationSession.start(...)
. The crash consistently reports as occurring on line 43 of BTWebAuthenticationSession.swift, inside the main-queue closure that invokes sessionDidAppear(self.currentSession?.start() ?? false)
.
FWIW, I can see there were some code changes in BTWebAuthenticationSession.swift starting in SDK version 6.35.0, which is the version we started experiencing this crash.
Here is an example screenshot of the crash stack trace:

To reproduce
I have tried to reproduce this on my local device but can't so far. However, like I mentioned, we have crash reports from a thousand+ users.
Expected behavior
The SDK doesn't cause a crash in our app.
Screenshots
No response