-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in ConfigurationCallbackStorage After Upgrading to 6.23.2 #1382
Comments
I have a project that is also experiencing this crash. We upgraded from |
So as I mentioned the version that worked for us is the |
Hi @sadaf-behbahani - thank you for raising this to our attention. We are investigating it currently. Please try v6.23.0 for now. Do you have any additional log or stack trace details on the crash? |
Thanks for sharing that stack @dane-thomas-vs - Are you able to share an example of how you have your API and feature client set up in your view? We are hoping to replicate the crash you are seeing in our demo app. |
Sure thing. We have a React Native application, so the SDK is wrapped in a Native Module. When we get the
The |
I have some additional information. I noticed many of our error logs included the "Low Memory" warning. With that knowledge, I was able to reproduce the crash by simulating the memory pressure warning (using iOS simulator) after launching the Apple Pay sheet and approving the payment. Hope that helps! |
Thanks you both for those details, we are working on reproducing the crash and will reach back out with additional information once we have more details to share. |
Hi all. We have replicated this crash and are working on a fix! (DTMOBILES-967 for internal tracking) |
Thank you for looking into it, here is the stack trace :
|
Hey folks - Thanks for your patience. We have an update up in the branch |
Following up here: I did some tests using the PR branch #1385 and I was not able to reproduce the crash when simulating the memory warning. Thank you for your quick action on this issue! Looking forward to the official release. 🎉 |
* Fixes Crash in ConfigurationCallbackStorage After Upgrading to 6.23.2 #1382 * Remove ConfigurationCallbackStorage * Add async/throws get method * Update getConfig() to use async/throws - use task block * Update tests to use async/await methods Signed-off-by: Jax DesMarais-Leder <[email protected]> Co-authored-by: Jax DesMarais-Leder <[email protected]> Co-authored-by: Victoria Park <[email protected]>
The fix for this has been released in version 6.23.3. Please feel free to reopen this issue if you continue to see errors. Thanks again for your patience and reporting this issue to us. |
Braintree SDK Version
6.23.2
Environment
Both
Xcode Version
15.4
OS Version & Device
iOS 17.*
Integration type
Swfit Package Manager
Development Processor
Apple Silicon (M-series chips)
Describe the bug
We encountered a critical issue after upgrading Braintree from version
6.18.2
to6.23.2
. The crash occurs inConfigurationCallbackStorage
atline 16
when attempting to add a completion to the queue. Below is a detailed description of the problem:BraintreeClient
.BraintreeClient
, we instantiate aBTAPIClient
.BTAPIClient
initialization, the methodfetchOrReturnRemoteConfiguration
is called without a completion handler, kicking off the background refresh and adding a completion to the pending completions. In our case, the internet is slow, and we don't get the configuration right away.BTCardClient
from theBTAPIClient
instance.BTApplePayClient
and start the payment process, which will calltokenize
. This again callsfetchOrReturnRemoteConfiguration
, adding a second completion to the pending completions.ConfigurationCallbackStorage
will sync/lock the queue and start invoking the completion blocks:BTApplePayClient.tokenize
, where the crash occurs.Tokenize
callsself.apiClient.post
, and inside thepost
function, it callsfetchOrReturnRemoteConfiguration
.Just a small reminder to ensure that a strong self is not captured inside of a block to avoid potential retain cycles and other issues.
To reproduce
Check the explanation above
Expected behavior
No crash should occur, and the completion handlers should be managed correctly.
Screenshots
No response
The text was updated successfully, but these errors were encountered: