-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
UnexpectedSignInInterruptionException during sign-in affecting a subset of users after upgrade to Amplify v6 #13182
Comments
This exception happens usually when there is a Will your end-users always be authenticated into one domain ? Or is this domain changing based on some scenarios ? |
@israx Thank you for the response. I checked the logs, all the users are attempting to sign-in on:
This doesn't differ in any way from successful logins. We don't use any other domains and there are no dynamic scenarios. |
Hi @MarekBodingerBA Do you have any data from the logs that what browsers were these users using? |
@HuiSF Nothing suspicious from my side, I extracted the related fields from the logs:
|
Thanks @MarekBodingerBA and yes I don't see anything that is abnormal. When you are saying you were not able to reproduce this issue, did you try to login using the credentials of a real user who was not able to login? There could be something that causes the library token parsing logic to fail while retrieving authentication tokens from the cookie store (per
|
@HuiSF hi. I'm also one of the maintainers of this project, filling in some of the data requested:
edit: today we're not relying too much on this extra attribute, it helped us with user migration some time ago - so if there's a chance this will help the issue, we can just turn this trigger off - in fact, I'll do it right away to collect some data on this
|
Thank you @mpinter for the extra context here. We'll try to reproduce this on our side then, but if you find a way to more reliably reproduce then let us know! CC: @MarekBodingerBA |
@mpinter and @MarekBodingerBA, are either one of you able to join us on a call to demo/reproduce the behavior (if possible) and allow us to review your Cognito setup? So far, we have been unable to reproduce the issue so far (using the publicly available code that's been provided. We'd also like to know the following, but can cover this in a call if you would prefer:
** Please do not share any email addresses of the customers publicly on this GitHub issue |
@cwomack would be happy to jump on a call (and thank's a lot for being involved in this). We can likely arrange with both of us with @MarekBodingerBA , probably Tuesday the earliest as Monday is still easter holiday, or later in the week if preferred. So far:
|
Updated info - we've tried changing the pw and logging into the We've added the user agent info to our production logs, if we catch a new instance of the issue we'll be able to provide those. |
@mpinter, thanks for the update. Let us know if you're able to catch the new instance of this. As for a call to review/connect, could you reach out to me on our Discord server and send me a DM with your email? Want to keep it off the public issue here. Have the same alias/handle there as here on Github, @cwomack. |
@cwomack We were able to contact some of the users that it's happening to and with high certainty we can tell that it is device specific issue (however the user agents don't differ from successfully sign-ins), the same people were able to sign-in on a different device. Also, it seems that these are not new users, so we think some residual cookies / local storage values can interfere with login, so we are now testing this approach: We will inform you if it worked. |
@MarekBodingerBA Have you been able to validate this approach or are you still seeing this issue? |
@erinleigh90 (Un)fortunately we haven't had any occurrences of the error since 5th March (with couple of thousands successful sign-ins). We deployed this on 8th March, so we cannot evaluate. |
We haven't had the exception since then, I am closing the issue. |
We are experiencing the same issue. I believe it may be related to the mismatch in the cookie store between Amplify v5 and v6. Our working hypothesis is that for users that were signed in during the upgrade to v6, there may be a mismatch in amplify's expectations that does not refresh the state correctly. After clearing the cookies manually, we are able to sign in with a user account that was affected by the switch. |
We're getting bitten by this exact behavior currently...we're totally stuck. Unclear what a fix may be. |
I am reopening the issue, we've had an occurrence on May 10th, we also have a log where user cookies has been removed, but the user didn't try to sign in again unfortunately, so we cannot really say if it helped or not. |
@yp717, @armenr, @MarekBodingerBA, @mpinter We'll look into this further and try to reproduce. Do any of you have a minimal sample repo where this is easily reproduced in a Next.js app? We've tried to reproduce with the repo/samples originally provided in this issue, but didn't have any luck on our side. |
I've just ran into the I ran into these issue while settings op playwright testing for my NextJs application. The very basic sign-in test succeeds on chromium and firefox browser, but fails for the webkit browser. I'm running the most recent version of amplify: 6.3.2. |
Before opening, please confirm:
JavaScript Framework
React, Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Other
Environment information
Describe the bug
After update to Amplify V6, part of our userbase started reporting being not able to sign in. In the logs we've found that our users are getting
UnexpectedSignInInterruptionException
(150 instances in two weeks since the update, with thousands of active users).amplify-js/packages/auth/src/providers/cognito/utils/dispatchSignedInHubEvent.ts
Line 30 in 0ddaa3c
It was not possible to Google any instance of anyone getting the same error, also there are no issues mentioning this either. The provided remedy in the
recoverySuggestion
is to "ensure cookies can be correctly set from your server". I suspect that if our server wouldn't be able to set cookies correctly, it would happen in 100% cases, therefore I think it is a bug.After trying on 10s of users, we were not able to reproduce the issue ourselves, however our project is completely open source which makes it easy to share the code:
Amplify config: https://github.com/bratislava/konto.bratislava.sk/blob/ba71f78deed6202541dec776efeddc239be3766e/next/frontend/utils/amplifyConfig.ts
Login sequence: https://github.com/bratislava/konto.bratislava.sk/blob/ba71f78deed6202541dec776efeddc239be3766e/next/pages/prihlasenie.tsx#L36
Environmental variables: https://github.com/bratislava/konto.bratislava.sk/blob/ba71f78deed6202541dec776efeddc239be3766e/next/.env.bratiska-cli-build.prod
package.json:
https://github.com/bratislava/konto.bratislava.sk/blob/ba71f78deed6202541dec776efeddc239be3766e/next/package.json
Amplify config before the update: https://github.com/bratislava/konto.bratislava.sk/blob/f9e2ec6c0f57b0fb8ff871b0d3490d58f6ac6acf/next/frontend/utils/amplify.ts
Login sequence before the update:
https://github.com/bratislava/konto.bratislava.sk/blob/f9e2ec6c0f57b0fb8ff871b0d3490d58f6ac6acf/next/pages/prihlasenie.tsx#L43
Thank you.
Expected behavior
The authentication process should successfully complete without any errors, allowing users access to their accounts without any interruptions or discrepancies in the sign-in flow.
Reproduction steps
As the issue has not been reproducible on our end despite attempts with tens of users, we're unable to provide specific steps that consistently trigger the
UnexpectedSignInInterruptionException
. Below are the general steps a user would follow, which for some results in the error:Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: