amplify-js
amplify-js copied to clipboard
Cognito bug on Safari 15.0 - QuotaExceededError: The quota has been exceeded.
Discussed in https://github.com/aws-amplify/amplify-js/discussions/8986
Originally posted by chengjiaapraamcos October 4, 2021 This happened on the latest Safari 15.0 on both Mac system and IOS system.
Seems like sometimes the localstorage stopped working sometimes, and it could be solved by refreshing the page etc.
Anyone can help?
Discussed in #8986
Originally posted by chengjiaapraamcos October 4, 2021 This happened on the latest Safari 15.0 on both Mac system and IOS system.
Seems like sometimes the localstorage stopped working sometimes, and it could be solved by refreshing the page etc.
Anyone can help?
I experienced the same.
Any updates? Experienced the same.
I am also having a few users of our application reporting this issue, the are getting the error: "The quota has been exceeded" when trying to login using aplify/cognito. This is preventing users from being able to log into our app from their iphones
I will edit/add to this as I learn more and debug.
EDIT: Our aws support tier is pretty high, I am creating a support ticket for this issue internally with our AWS account. I will continue to update as I can here to see if any progress is made on that front.
I got this same error, only for it to work on Chrome Incognito.
We also have users experiencing this error. I have personally seen it in both Mac OS Safari and Mac OS Chrome, as well as iOS Safari.
Some of our clients are also facing this issue, it happened to us a few months back but hardly to reproduce. Does anyone know how to trigger it. @JakeRuth, have you by any chance come with any sort of solution for this issue internally?
I also had this error. Client browser is safari and refresh token has expired.
We're seeing the same issue. It seems to be related to calls to window.localStorage.setItem failing because local storage has exceeded its maximum size.
I've encountered this issue as well. Only once though.
I've experienced the same, Any updates ?
Seeing this as well. Would be great to get a fix asap as this is preventing users from logging in.
This happens on Safari 15+ (MacOS, IOS) and all browsers on IOS 15. Guess it's a bug from Safari but could anyone report this issue to Safari team? It's affecting not only Cognito but also the whole Localstorage.
Just reported this issue to Apple, hope it can help.
Also seeing this on a number of projects that use Cognito.
If anyone has a link to an issue being tracked by the Webkit/Safari team that would be really helpful
Had the same in my Ionic application as well. I updated @aws-amplify/auth to 4.3.18 and now it works. No quota errors anymore.
Had the same in my Ionic application as well. I updated @aws-amplify/auth to 4.3.18 and now it works. No quota errors anymore.
@yyberi mate. Where do you update the @aws-amplify/auth package? I only installed @aws-amplify and @aws-amplify/react-ui in my React application.
@yyberi mate. Where do you update the @aws-amplify/auth package? I only installed @aws-amplify and @aws-amplify/react-ui in my React application.
@KalvinWei I use only cognito and aws api so I have installed only @aws-amplify/auth and @aws-amplify/api packages. Not the complete @aws-amplify. => https://www.npmjs.com/package/@aws-amplify/auth
@yyberi Cheers, mate. Then I assume the problem is the auth module in @aws-amplify is not updated. Hope Amplify staff can notice this.
I'm not so sure that it's a fix on the amplify side ... I'm seeing this with other third-party libraries (Segment's analytics.js), as well as my own localstorage calls. Could it be that it's hard to reproduce, which is why you haven't seen it since upgrading? Or possibly the new amplify version falls back to in-memory storage instead of using localstorage?
Had the same in my Ionic application as well. I updated @aws-amplify/auth to 4.3.18 and now it works. No quota errors anymore.
After upgrading to 4.3.19 my tester is still getting the issue on Safari.
I'm experiencing this in my cordova app on iOS 15.1, which uses Safari. I can swipe the app away and try again and it works. If I swipe away again it will not work. There's no way to tell if it will work or not. When I connect my ipad to my laptop and I go to the safari dev tools network tab, I can copy the curl command. The curl command works.
We've also been getting this in our Ionic app, currently running on aws-amplify v4.0.3. I'll try updating our package to the latest version (4.3.11), but as others have suggested the library itself doesn't appear up to date.
Just reported this issue to Apple, hope it can help.
@chengjiaapraamcos Is there a bug number? Would be good to upvote this if it's an Apple bug
Having the same issue, haven't updated my amplify app at all, but users just started reporting this to me this week.
Having the same issue, haven't updated my amplify app at all, but users just started reporting this to me this week.
Exactly, used to work just fine. Then 15.1 came along. I'm almost not surprised, Safari on iOS has weird media issues too. I don't think anyone cares about Safari iOS.
I get this issue too. If I refresh the login page it then normally lets me login
Not sure if this is relevant? https://stackoverflow.com/questions/42467908/quotaexceedederror-dom-exception-22-the-quota-has-been-exceeded-on-safari-in
Not sure if this is relevant? https://stackoverflow.com/questions/42467908/quotaexceedederror-dom-exception-22-the-quota-has-been-exceeded-on-safari-in
I saw that but it's 4 years old and this issue isn't just happening in incognito. The root cause (localstorage not being available) is likely still the root cause and maybe setting to incognito can help reliably reproduce but these seemingly random failures just started happening (and resolve on refresh)
I concur with @ahurlburt. The users it is affecting within my app are certainly not using incognito mode regularly. Similarly, it also resolves on refresh, however, that's only useful within a browser—in a WebView wrapped app, the user is less able to just refresh and we are having to advise complete shutdown and restart of the app.
just had this happen yesterday on iOS Safari, not in incognito mode, using the <Authenticator/> component. While trying to debug using Firefox on Mac at least one time saw in the Console > Network tab that it normally makes 5 POST requests to https://cognito-idp.us-east-1.amazonaws.com/ when authenticating in under 1 second, and twice it made 8 POST requests. This seems like a lot. Right now when it does 5 it's doing:
POST AuthFlow | "USER_SRP_AUTH" POST ChallengeName: PASSWORD_VERIFIER POST AccessToken: "eyJraWQiO..." POST AccessToken: "eyJraWQiO..." POST AccessToken: "eyJraWQiO..."
It seems the last 2 POST requests are kinda redundant.