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 canStart is false a warning is printed to the console because the continuation is never called. SWIFT TASK CONTINUATION MISUSE: showHostedUI(url:callbackScheme:inPrivate:presentationAnchor:) leaked its continuation!
This is caused by the change in #3466 to only start the session if canStart is true. The resulting behavior is that the web UI is never presented and the continuation is never called. If the session is not started, the continuation must be called
The canStart variable was only temporarily false (due to an animation) and if we waited a short amount of time it would resolve within half a second. We therefore fixed it by adding a wait and then checking canStart again after a short pause. We check several times and then time out after a few seconds. We either start the session or else call the continuation with an error. This way the continuation is always called and the app is never left hanging.
Steps To Reproduce
Steps to reproduce the behavior:1. Call the `Amplify.Auth.signInWithWebUI` method and successfully sign in
2.Without restarting the app call `Amplify.Auth.signOut()` (which will never return)
Expected behavior
If the session will not be started an error should be returned that says canStart is false (In our case this was because the presentation anchor was not yet presented)
Amplify Framework Version
2.28.0
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5.9
CLI version
n/a
Xcode version
15.0
Relevant log output
SWIFT TASK CONTINUATION MISUSE: showHostedUI(url:callbackScheme:inPrivate:presentationAnchor:) leaked its continuation!
Is this a regression?
No
Regression additional context
No response
Platforms
iOS
OS Version
iOS 17.4.1
Device
iPhone SE (2nd Generation)
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When
canStart
is false a warning is printed to the console because the continuation is never called.SWIFT TASK CONTINUATION MISUSE: showHostedUI(url:callbackScheme:inPrivate:presentationAnchor:) leaked its continuation!
This is caused by the change in #3466 to only start the session if
canStart
is true. The resulting behavior is that the web UI is never presented and the continuation is never called. If the session is not started, the continuation must be calledThe
canStart
variable was only temporarily false (due to an animation) and if we waited a short amount of time it would resolve within half a second. We therefore fixed it by adding a wait and then checking canStart again after a short pause. We check several times and then time out after a few seconds. We either start the session or else call the continuation with an error. This way the continuation is always called and the app is never left hanging.Steps To Reproduce
Expected behavior
If the session will not be started an error should be returned that says
canStart
is false (In our case this was because the presentation anchor was not yet presented)Amplify Framework Version
2.28.0
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
5.9
CLI version
n/a
Xcode version
15.0
Relevant log output
SWIFT TASK CONTINUATION MISUSE: showHostedUI(url:callbackScheme:inPrivate:presentationAnchor:) leaked its continuation!
Is this a regression?
No
Regression additional context
No response
Platforms
iOS
OS Version
iOS 17.4.1
Device
iPhone SE (2nd Generation)
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: