Bug 1967639 - Console whitescreens if user preferences fail to load
Summary: Console whitescreens if user preferences fail to load
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.8.0
Assignee: Sahil Budhwar
QA Contact: spathak@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-03 14:08 UTC by Samuel Padgett
Modified: 2021-07-27 23:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Version: 4.8.0-0.nightly-2021-06-03-055145 Cluster ID: 480fbead-fc49-4aea-b631-619c276061b3 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0
Last Closed: 2021-07-27 23:11:27 UTC
Target Upstream Version:


Attachments (Terms of Use)
Screenshot (815.77 KB, image/png)
2021-06-03 14:08 UTC, Samuel Padgett
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 9153 0 None open Bug 1967639: fixes: console whitescreens if user settings fails to load 2021-06-07 08:27:48 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:11:38 UTC

Description Samuel Padgett 2021-06-03 14:08:55 UTC
Created attachment 1788849 [details]
Screenshot

The entire console currently whitescreens if there is an error getting the user's preferences on console load. This might happen if there is an API server error or due to a backend console bug. We should make sure we have error handling to avoid the whitescreen and fallback to some reasonable behavior when we can't get the preferences.

I was able to reproduce in a development environment by

1. Manually entering a bad config map name in the userUserSettings hook: https://github.com/openshift/console/blob/master/frontend/packages/console-shared/src/hooks/useUserSettings.ts#L64
2. Running `unset BRIDGE_USER_SETTINGS_LOCATION` before starting bridge

See screenshot for the failed network request and console whitescreen. While I've forced the error in this case, it's possible for the request to fail for other reasons, and it shouldn't block users from using console at all.

Comment 3 spathak@redhat.com 2021-06-18 07:14:46 UTC
I've tested it locally by manually passing the wrong name in configMapResource and URL in function, and in function only, I'm not getting a white screen 

Verified on build version: 4.8.0-0.nightly-2021-06-13-101614
Browser: Google Chrome 89

Comment 5 errata-xmlrpc 2021-07-27 23:11:27 UTC
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.8.2 bug fix and security 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.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.