-
Notifications
You must be signed in to change notification settings - Fork 220
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
Auth0 crashes due to swift task continuation misuse #827
Comments
Hi @erichoracek, thanks for raising this. Would you happen to have any additional contextual information on this issue? For example, in this instance, it happened when the login button was rapidly tapped twice while the app window was not active yet. |
Hi @Widcket, we don't have a lot of information since we can't reproduce these crashes, but both of these appear to about 5-10 seconds after a |
Unfortunately, without more information, there's not much we can do. I'm no longer the maintainer of this library, so I cannot dedicate more time to look into this. |
We are in the same situation—we're unable to reproduce this locally. Since the crash is clear about the cause I'd assume it should be possible to make a fix by storing some state locally and checking it to ensure the continuation is invoked once, even if we don't know the root cause or have a repro case. |
I think I managed to reproduce it: trim.877E1D84-FB87-422F-9B26-4DA1C45A1316.MOVIf this is is the same crash (please check in your crash reports) then it's due to a race condition because of the two login transactions happening at the same time. |
The above happens when tapping two of the login buttons at the same time (e.g. Google login and email/password login) logging in in one of the browser modals, and then very quickly pressing cancel on the second as soon as the first is dismissed. As a race condition, it doesn't happen all the time, and is hard to get just right. |
It shouldn't be possible to open two browser modals at the same time, though. |
Checklist
Description
We have seen two crashes in the Auth0 SDK with
SWIFT TASK CONTINUATION MISUSE
.These crashes occur on the order of 1-20 times per day in our app in production, as reported by Sentry.
Here are the two relevant stack traces:
Crash 1: Auth0WebAuth.swift:175
Crash 2: OAuth2Grant.swift:91
Reproduction
These crashes are not easily reproducible, we have only discovered them via production crash logs.
Additional context
No response
Auth0.swift version
2.5.0
Platform
iOS, iPadOS
Platform version(s)
iOS 16-17
Xcode version
15.1
Package manager
Swift Package Manager
The text was updated successfully, but these errors were encountered: