amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Cognito bug on Safari 15.0 - QuotaExceededError: The quota has been exceeded.

Open david-mcafee opened this issue 4 years ago • 42 comments

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?

david-mcafee avatar Nov 01 '21 20:11 david-mcafee

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.

KalvinWei avatar Nov 23 '21 21:11 KalvinWei

Any updates? Experienced the same.

alexrogo avatar Nov 30 '21 12:11 alexrogo

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.

JakeRuth avatar Nov 30 '21 18:11 JakeRuth

I got this same error, only for it to work on Chrome Incognito.

adityasrini avatar Dec 02 '21 22:12 adityasrini

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.

nefarioustim avatar Dec 06 '21 04:12 nefarioustim

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?

eltaf-buckitapp avatar Dec 06 '21 06:12 eltaf-buckitapp

I also had this error. Client browser is safari and refresh token has expired.

RNm-dove avatar Dec 08 '21 01:12 RNm-dove

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.

djcolon avatar Dec 08 '21 09:12 djcolon

I've encountered this issue as well. Only once though.

davidattias avatar Dec 10 '21 11:12 davidattias

I've experienced the same, Any updates ?

aadu999 avatar Dec 10 '21 14:12 aadu999

Seeing this as well. Would be great to get a fix asap as this is preventing users from logging in.

silberistgold avatar Dec 13 '21 11:12 silberistgold

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.

ghost avatar Dec 14 '21 00:12 ghost

Just reported this issue to Apple, hope it can help.

ghost avatar Dec 14 '21 00:12 ghost

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

r-moore avatar Dec 14 '21 12:12 r-moore

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 avatar Dec 15 '21 18:12 yyberi

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.

KalvinWei avatar Dec 15 '21 20:12 KalvinWei

@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 avatar Dec 16 '21 10:12 yyberi

@yyberi Cheers, mate. Then I assume the problem is the auth module in @aws-amplify is not updated. Hope Amplify staff can notice this.

KalvinWei avatar Dec 16 '21 19:12 KalvinWei

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?

thomasdashney avatar Dec 16 '21 19:12 thomasdashney

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.

djcolon avatar Dec 17 '21 08:12 djcolon

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.

fetmar avatar Dec 21 '21 19:12 fetmar

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.

angusho1 avatar Dec 22 '21 01:12 angusho1

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

ahurlburt avatar Jan 03 '22 21:01 ahurlburt

Having the same issue, haven't updated my amplify app at all, but users just started reporting this to me this week.

merlindemon avatar Jan 04 '22 16:01 merlindemon

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.

fetmar avatar Jan 04 '22 22:01 fetmar

I get this issue too. If I refresh the login page it then normally lets me login

onevision avatar Jan 11 '22 10:01 onevision

Not sure if this is relevant? https://stackoverflow.com/questions/42467908/quotaexceedederror-dom-exception-22-the-quota-has-been-exceeded-on-safari-in

onevision avatar Jan 11 '22 10:01 onevision

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)

ahurlburt avatar Jan 11 '22 15:01 ahurlburt

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.

nefarioustim avatar Jan 11 '22 22:01 nefarioustim

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.

carl avatar Jan 16 '22 19:01 carl