Closed MaryBurshtyn closed 1 year ago
Hey @MaryBurshtyn, thanks for sharing this information. If possible, would you mind sharing the code for your logBraze
function? If I understand this correctly, it seems to be freezing inside that function when you call the Embrace function.
Where are you observing the freeze to occur in your debugging? If you set some breakpoints, does the runtime stop at the Embrace line?
Hi @MaryBurshtyn,
Could you try wrapping the body of your logBraze
method in a DispatchQueue.main.async { ... }
expression?
Our SDK initialization is synchronous and blocks the calling thread until fully initialized. It seems that Embrace itself may have some internal logic leading to a deadlock when logs are emitted by the SDK during its initialization.
Wrapping your custom log code in a DispatchQueue.main.async { ... }
expression will ensure that the SDK is fully initialized before Embrace tries to process the logs.
Since this issue is several months old and we have described suggestions for possible workarounds, I will close this ticket as stale. If you continue to run into issues about this topic, feel free to open a ticket with support@braze.com.
Thanks!
Platform
iOS
Platform Version
macOS 12 / macOS 13
Braze SDK Version
6.3.0
Xcode Version
14.2/14.3
Computer Processor
Intel
Repro Rate
100%
Steps To Reproduce
Setup Braze:
In case if
logBraze
function save logs locally on the device it works perfectly fine. But iflogBraze
function sends logs to Embrace app freezes. Freezing happens only if Embrace logging performed from print function in other cases Embrace log work fine too.Expected Behavior
App should not freeze while Embrace logging from set print function.
Actual Incorrect Behavior
App freezes on Braze init function.
Verbose Logs
Additional Information
Also happens on M1 processor.