oppia / oppia

A free, online learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
5.85k stars 4.12k forks source link

Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. #16003

Open kevintab95 opened 2 years ago

kevintab95 commented 2 years ago

This error occurred recently in production

Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
    at u.clearSavedResults (platform-feature.service.ts:203:33)
    at u.<anonymous> (platform-feature.service.ts:175:12)
    at Generator.next (<anonymous>)
    at exploration_player.bbc071556a35876388f4.bundle.js:3159:122247
    at new e (zone.js:913:33)
    at A (exploration_player.bbc071556a35876388f4.bundle.js:3159:121992)
    at u._initialize (exploration_player.bbc071556a35876388f4.bundle.js:3159:122876)
    at u.<anonymous> (platform-feature.service.ts:91:59)

Additional context Add details from the logs, like the page the error occurred on. Make sure to anonymize user data like user IDs, exploration IDs, state names, user names, etc. Replace the personal data with appropriate placeholders.

General instructions There are no specific repro steps available for this bug report. The general procedure to fix server errors should be the following:

kevintab95 commented 2 years ago

This occured in an embedded exploration.

kevintab95 commented 2 years ago

This can happen when the browser blocks cookies and site data: https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document/

kevintab95 commented 1 year ago

This still occurs. Latest occurrence was on July 8.

kevintab95 commented 1 year ago

This occurred 170+ times in 30 days.

kevintab95 commented 1 year ago

This still occurs with the same frequency mentioned above.

kevintab95 commented 1 year ago

Occurred 110 times in 30 days.

kevintab95 commented 1 year ago

Occurred 1 time in 11 days.

kevintab95 commented 1 year ago

https://github.com/oppia/oppia/issues/18887 may be related as it has a very similar stacktrace and occurred around the same time. See screenshot of the code in the linked issue's description.

kevintab95 commented 1 year ago

Occurs 21 times in 5 days.

kevintab95 commented 1 year ago

Occurs 103 times in 13 days.

kevintab95 commented 1 year ago

Occurs 1 time in 11 days.

kevintab95 commented 12 months ago

Occurs 4 times in a day.

seanlip commented 11 months ago

I'm marking this as a good first issue. The aim is to update the logic in platform-feature.service.ts to correctly handle the case when sessionStorage is not available/accessible.

If you would like to claim this issue, please follow the guidance at https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia#choosing-a-good-first-issue and provide an explanation of what your PR will do (with names of files you're changing, what you plan to change in each file, etc.). This should also include a reference or proof that shows that your approach is correct (since we are not the first web app that has run into this issue). If everything looks good, we can assign you to it.

kevintab95 commented 10 months ago

19 occurrences in 13 days.

kevintab95 commented 9 months ago

Occurred 8 times since 3.3.5 went live.

kevintab95 commented 7 months ago

Occurred 1 time in 3.3.7 14 days ago.

lkbhitesh07 commented 1 week ago

Occurred once on the test server as well in 3.4.3.