Crash report: `SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.`
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
URL
swap state
{
"INPUT": {
"currencyId": null
},
"OUTPUT": {
"currencyId": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"independentField": "OUTPUT",
"typedValue": "216.247",
"recipient": null
}
Error
SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
Stacktrace
Error: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
at t.getCachedUrl (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:984273)
at https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:985202
at Fs (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1393435)
at t.unstable_runWithPriority (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1411214)
at Gi (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1333754)
at Rs (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1392896)
at https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1392807
at L (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1410273)
at MessagePort.k.port1.onmessage (https://app.uniswap.org/static/js/35.d35d34a0.chunk.js:2:1408995)
Device data
{
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "95.0.4638.54",
"major": "95"
},
"engine": {
"name": "Blink",
"version": "95.0.4638.54"
},
"os": {
"name": "Mac OS",
"version": "10.15.5"
},
"device": {},
"cpu": {}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash from the reported swap URL and inspect the minified stack entry at static/js/35.d35d34a0.chunk.js, especially getCachedUrl. Trace how the application accesses localStorage when browser access is denied; done means the swap page no longer crashes in that condition and the reported error is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100