-
Notifications
You must be signed in to change notification settings - Fork 243
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
App crashes on re-launch #3356
Comments
Hi @PritamDutt can you please provide more details on your app and what you did to help us reproduce. We haven't been encountering this issue so need more information to see what's going on.
|
Hi @fjnoyp, Here is what I could to reproduce the error:
When I debugged the app, I discovered that, code inside amplify-flutter/packages/auth/amplify_auth_cognito/darwin/Classes/HostedUIFlow.swift Line 24 in 19834be
raising error on following line: amplify-flutter/packages/auth/amplify_auth_cognito/darwin/Classes/HostedUIFlow.swift Line 35 in 19834be
I have been successfully able to resolve this by modifying the code to:
if (consumedCallbackURL != callbackURL){
consumedCallbackURL = callbackURL
continuation.resume(returning: queryParameters)
} I hope this will help! |
@PritamDutt - Prior to step 3, are you placing the app into the background or are force closing the app? I want to make sure we understand the repro steps. |
@PritamDutt - can you also please confirm that you are using version 1.1.1 by checking that this is the version on your pubspec.lock file? A similar issue was fixed in 1.1.1. I want to make sure you are not using an earlier version. Thanks. |
To add to the above comments, I believe your error here is related to your other issue. It appears your refreshToken is not working correctly, which might mean that Amplify Auth is expecting you to still be signed in when you aren't. I am unable to replicate any crash on my side. |
@Jordan-Nelson I can confirm that this issue is existing with following versions:
|
It happens irrespective of app going into background or getting closed.. and I can confirm that my change in |
Thanks for the extra information @PritamDutt always helpful as usual. Good to hear you were able to fix this issue on your side. This issue seems related to your other issue. Let's focus our conversation there for now as a fix there should hopefully resolve this one too. |
@fjnoyp This issue is related to hosted ui flow, whereas the suggested TOTP work is being done in the native sign-in flow, which I suspect would solve the problem |
Please confirm you have followed all steps in the iOS setup instructions here. In particular, it's important that you set the minimum SDK version to iOS 13.0 in the Xcode project itself in the two locations. |
Please let us know if you are still facing this issue, @PritamDutt. I will be closing this out if I don't hear back from you. |
Closing as we have not heard from you. Please feel free to reopen if you are still facing this issue. |
Description
Concurrency/CheckedContinuation.swift:164: Fatal error: SWIFT TASK CONTINUATION MISUSE: launchUrl(:callbackURLScheme:preferPrivateSession:) tried to resume its continuation more than once, returning ["nonce": "XXXX", "code": "XXX", "state": "XXX"]!
Concurrency/CheckedContinuation.swift:164: Fatal error: SWIFT TASK CONTINUATION MISUSE: launchUrl(:callbackURLScheme:preferPrivateSession:) tried to resume its continuation more than once, returning ["nonce": "XXXX", "code": "XXX", "state": "XXX"]!
Categories
Steps to Reproduce
No response
Screenshots
No response
Platforms
Flutter Version
3.10.2
Amplify Flutter Version
1.1.1
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: