Bug 1967639

Summary: Console whitescreens if user preferences fail to load
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Dev ConsoleAssignee: Sahil Budhwar <sbudhwar>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.8CC: aos-bugs, nmukherj, sbudhwar, spathak
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
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 Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
Screenshot none

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

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.