Console relies on writing to localStorage on login. This can fail (usually because there is no more space), and console just white screens in this case. We should try to catch errors and show a message. (We should also see if it's possible to continue without needing localStorage.)
We've seen this happen on different occasions in Firefox on Linux. If another website stores a large amount of data in localStorage, it prevents other websites from using it. For instance, we've seen Slack store hundreds of megabytes in localStorage, exhausting the quota.
I assume that this occurs when console is trying to write the 'bridge/api-discovery-resources' key with its resources into the localStorage.
Think that a simple solution is to dont catch the resource since they are also in the store?
Thinking about a general solution here, cause ideally we should not store anything in the localStorage, if we wanna avoid this kind of behaviour.
I don't think that's the problem because it's surrounded by a try/catch. It's likely somewhere else. I believe it's happening here:
The "document.body is null" error appears to be happening when we try to add an error message to the page.
visit console in Firefox, current fix is stop loading console if we meet `DOMException: The quota has been exceeded` error. We show message: localStorage must be enabled:The quota has been exceeded on the page when console loads failed
per comment in fix PR this is working as intended, in a following up PR we may consider continue even after the error.
Verified on 4.7.0-0.nightly-2021-02-02-164630
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.