Bug 1840445 - Console crashed on "CouchbaseCluster" details view - TypeError: (n || []).map is not a function
Summary: Console crashed on "CouchbaseCluster" details view - TypeError: (n || []).map...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.4.z
Assignee: Jon Jackson
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On: 1840446
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-27 00:00 UTC by tony.wu
Modified: 2020-07-06 14:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The CouchbaseCluster resource 'status.conditions' property is not an array. Consequence: A runtime error was occurring on the details page for these resources because it was assumed that this property was an array. Fix: Update logic on the details page to ensure that the 'status.conditions' property is an array before trying to access Array.prototype properties. Result: If a resource's 'status.conditions' property is not an array, the Conditions section on the details page will just be omitted now.
Clone Of:
: 1840446 (view as bug list)
Environment:
Last Closed: 2020-06-17 22:26:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
1_CouchbaseCluster_list_view.png (274.88 KB, image/png)
2020-05-27 00:00 UTC, tony.wu
no flags Details
2_CouchbaseCluster_details_view_crashed.png (382.40 KB, image/png)
2020-05-27 00:01 UTC, tony.wu
no flags Details
3_Component_Trace.txt (619 bytes, text/plain)
2020-05-27 00:01 UTC, tony.wu
no flags Details
4_Stack_Trace.txt (1.70 KB, text/plain)
2020-05-27 00:01 UTC, tony.wu
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 5631 0 None closed [release-4.4] Bug 1840445: Fix conditions table runtime error on operand details page 2020-07-06 14:52:27 UTC
Red Hat Product Errata RHBA-2020:2445 0 None None None 2020-06-17 22:27:01 UTC

Description tony.wu 2020-05-27 00:00:53 UTC
Created attachment 1692468 [details]
1_CouchbaseCluster_list_view.png

Description of problem:
Console crashed on "CouchbaseCluster" details view - 
TypeError: (n || []).map is not a function


Version-Release number of selected component (if applicable):
OCP 4.4.5
OCP 4.5


How reproducible:
100%


Steps to Reproduce:
1. Install "Couchbase" Operator to "default" namespace from "OperatorHub" view

2. Create a Secret in "default" namespace using "Key/Value Secret" with:
name: cb-example-auth
key1: username
value1: username
key2: password
value2: password

3. Go to "Installed Operators" view, create "CouchbaseCluster" in "default" namespace

4. Wait until "CouchbaseCluster" reach to "Running" state

5. Click on CouchbaseCluster to details view


Actual results:
Console crashed on "CouchbaseCluster" details view - 
TypeError: (n || []).map is not a function


Expected results:
See "CouchbaseCluster" to details view


Additional info:
See in attachments:
1_CouchbaseCluster_list_view.png
2_CouchbaseCluster_details_view_crashed.png
3_Component_Trace.txt
4_Stack_Trace.txt

Comment 1 tony.wu 2020-05-27 00:01:17 UTC
Created attachment 1692469 [details]
2_CouchbaseCluster_details_view_crashed.png

Comment 2 tony.wu 2020-05-27 00:01:29 UTC
Created attachment 1692470 [details]
3_Component_Trace.txt

Comment 3 tony.wu 2020-05-27 00:01:40 UTC
Created attachment 1692471 [details]
4_Stack_Trace.txt

Comment 7 Yadan Pei 2020-06-04 03:29:21 UTC
Follow steps in `Steps to Reproduce`

1. Install "Couchbase" Operator to "default" namespace from "OperatorHub" view

2. Create a Secret in "default" namespace using "Key/Value Secret" with:
name: cb-example-auth
key1: username
value1: username
key2: password
value2: password

3. Go to "Installed Operators" view, create "CouchbaseCluster" in "default" namespace

4. Wait until "CouchbaseCluster" reports a final status, in my verifying it is Failed status

5. Click on CouchbaseCluster to details view, console didn't crash and details info are shown correctly

Verified on 4.4.0-0.nightly-2020-06-02-202425

Comment 9 errata-xmlrpc 2020-06-17 22:26:36 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, 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/RHBA-2020:2445


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