You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the web authenticator on iOS, if you attempt to display an alert on the page it will cause the thread to crash / lock up, and you will see the following message in the console
[Presentation] Attempt to present <UIAlertController: 0x10fb76200> on <SFAuthenticationViewController: 0x11829c800> (from <SFAuthenticationViewController: 0x11829c800>) whose view is not in the window hierarchy.
I believe this issue could be related to the TaskCompletionSource being set when the SFAuthenticationViewController dismiss is invoked, the VC will be being dismissed whilst I try to present my alert, hence why it does not show.
Steps to Reproduce
Run my reproduction app on iOS
Click login
Press continue (the alert cancel is not affected)
Wait for the web view to pop up
Close the web view
Expected Behavior
An alert is displayed to the user
Actual Behavior
Nothing happens, the code after the display alert does not complete and the thread never finished. The UI at this point has been deadlocked and can only be reset by killing the app.
Description
When using the web authenticator on iOS, if you attempt to display an alert on the page it will cause the thread to crash / lock up, and you will see the following message in the console
I believe this issue could be related to the
TaskCompletionSourcebeing set when theSFAuthenticationViewControllerdismiss is invoked, the VC will be being dismissed whilst I try to present my alert, hence why it does not show.Steps to Reproduce
Expected Behavior
An alert is displayed to the user
Actual Behavior
Nothing happens, the code after the display alert does not complete and the thread never finished. The UI at this point has been deadlocked and can only be reset by killing the app.
deadlock.example.480.mov
Link to public reproduction project repository
https://github.com/Axemasta/MauiRepros/tree/main/src/WebAuthenticatorPresentationIssue
Version with bug
9.0.40 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS Latest
Did you find any workaround?
Adding a 2 second
Task.Delaybefore calling the alert will prevent the deadlock from occuringRelevant log output