oppia / oppia

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

Cannot read properties of null (reading 'getItem') #16004

Open kevintab95 opened 2 years ago

kevintab95 commented 2 years ago

This error occurred recently in production

TypeError: Cannot read properties of null (reading 'getItem')
    at bootstrap:148:31
    at bootstrap:147:6
    at new e (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.8fbc3b92702ff9e3a94c.bundle.js:1966:2940)
    at n.e (bootstrap:108:49)
    at loadChildren (build/webpack_bundles/lightweight_oppia_root.ce0e54dcdbcc2ac7a176.bundle.js:1:124883)
    at tn.loadModuleFactory (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.8fbc3b92702ff9e3a94c.bundle.js:2261:688)
    at tn.load (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.8fbc3b92702ff9e3a94c.bundle.js:2261:265)
    at t.project (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.8fbc3b92702ff9e3a94c.bundle.js:2198:4440)
    at t._tryNext (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.8fbc3b92702ff9e3a94c.bundle.js:3565:4515)
    at t._next (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.8fbc3b92702ff9e3a94c.bundle.js:3565:4417)
    at <anonymous>:1:1

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

The error seems to be occuring when localStorage.getItem('direction') is executed. It looks like localStorage is null in a scenario.

kevintab95 commented 1 year ago

This still occurs. Latest logs:

TypeError: Cannot read properties of null (reading 'getItem')
    at bootstrap:148:39
    at bootstrap:147:6
    at new e (build/webpack_bundles/vendors~lightweight_oppia_root~oppia_root.0109fe13033e063c3ce2.bundle.js:2689:2940)
    at n.e (bootstrap:108:49)
    at loadChildren (build/webpack_bundles/oppia_root.d698cb94d1931cc02d1b.bundle.js:311:245276)
    at <anonymous>:1:1
kevintab95 commented 1 year ago

This occurred 10+ times in 30 days.

kevintab95 commented 1 year ago

This occurred 1 time in 11 days.

kevintab95 commented 1 year ago

Occurred 1 time in 5 days.

kevintab95 commented 11 months ago

Occurred 1 time in 2+ weeks.

kevintab95 commented 8 months ago

Occurs 1 time in 1 day.

kevintab95 commented 8 months ago

Occurred 2 times since 3.3.5 went live.

kevintab95 commented 6 months ago

Occurred 8 times in 12 days in 3.3.7.