Oops… Failed to execute ‘setItem’ on ‘Storage’: Setting the value of ‘browser-tabs-lock-key-auth0.lock.getTokenSilently’ exceeded the quota.
how can this error be fixed?
tyf
April 19, 2022, 12:28am
4
Hey there @jlittle !
While I’m not familiar with this error personally, I did come across the following GH Issue which looks to be related - It sounds like this was looked into at some point, but was not reproducible on our end and thus deemed more environmental as opposed to an issue the the SDK:
opened 08:37PM - 07 May 20 UTC
closed 11:01AM - 17 Jun 20 UTC
### Description
It is possible for the `getTokenSilently()` function to throw… a `QuotaExceededError` when attempting to acquire a lock. This is because `localStorage.setItem()` is called in the `browser-tabs-lock` library [here](https://github.com/supertokens/browser-tabs-lock/blob/master/index.ts#L99), and if this call fails, an error is thrown all the way up through the stack. This can effectively blocks an end-user from silently logging in.
The expected behavior was that if `localStorage` is unavailable for any reason, `getTokenSilently()` would be able to proceed without using a lock, and a user could still silently login.
### Reproduction
1. Fill `localStorage` using the Console on a page which calls `getTokenSilently()`. Something like [this](https://stackoverflow.com/questions/45760110/how-to-fill-javascript-localstorage-to-its-max-capacity-quickly) worked for us
2. Trigger `getTokenSilently()`. For our application, it is called on load, so you can just refresh the tab
3. A `QuotaExceededError` is thrown, and the token is never requested
### Environment
- **Version of this library used:** 1.6.4
- **Other relevant versions (language, server software, OS, browser):** OSX Firefox
- **Other modules/plugins/libraries that might be involved:** [browser-tabs-lock](https://github.com/supertokens/browser-tabs-lock)
Let us know what you think!
1 Like
tyf
Closed
May 4, 2022, 12:29am
5
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.