Bug 1703891

Summary: Status page will jump to be empty after when select "all projects" on Firefox
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: aos-bugs, jhadvig, jokerman, mmccomas
Target Milestone: ---Keywords: Regression
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-30 22:06:06 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:
Embargoed:

Description XiaochuanWang 2019-04-29 03:00:01 UTC
Description of problem:
On Status page, select "all projects", page will turns out to be empty with error. It reproduces on Firefox.

Version-Release number of selected component (if applicable):
4.1.0-0.nightly-2019-04-28-064010
image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:21d48d6343f7f44b029b1bbc99af8ed735bea593bf8ef06b84bbab4cc1ba98b5
console commit: io.openshift.build.commit.id=cf8293355b288b2a2835d00aa5ff7c8c4f104445io.openshift.build.commit.url=https://github.com/openshift/console/commit/cf8293355b288b2a2835d00aa5ff7c8c4f104445

How reproducible:
Always

Steps to Reproduce:
1. Go to Status page.
2. Select "all projects" from project switcher list.

Actual results:
TypeError: "e is undefined"
	i https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/main-chunk-b1984c62e6ba10467514.min.js:1:311968
	p https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/main-chunk-b1984c62e6ba10467514.min.js:1:312470
	l https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/main-chunk-b1984c62e6ba10467514.min.js:1:98084
	f https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/main-chunk-b1984c62e6ba10467514.min.js:1:146509
	b https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/main-chunk-b1984c62e6ba10467514.min.js:1:146913
	beginWork https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:50240
	o https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:54824
	a https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:55103
	x https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:58046
	_ https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:57589
	b https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:57426
	m https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:56805
	p https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:56267
	enqueueSetState https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:107:45546
	setState https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:115:1653
	value https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:55:28921
	_onResize https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:55:28121
	__resizeRAF__ https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:67:19984
	__resizeRAF__ https://console-openshift-console.apps.qe-ui-04290831.qe.devcluster.openshift.com/static/vendors~main-chunk-952c2e6c4f24ecc7d0fc.min.js:67:19942


Expected results:
Should not be such empty page.

Additional info:

Comment 1 Jakub Hadvig 2019-04-29 11:01:59 UTC
While looking into this a bit I noticed that following error log messages:

resource-link.jsx:50 resourcePath: no model for "Endpoints"
resource-link.jsx:50 resourcePath: no model for "Machines"

which is a bit odd since we 

Also could reproduce in Chrome, when scrolling down through the events on the Status page

Comment 2 Samuel Padgett 2019-04-29 13:36:23 UTC
It looks like involved object can be empty in some cases, and `ResourceLink` will have a runtime error if `kind` is not defined.

TypeError: ref is undefined
kindForReference k8s.ts:33
modelFor k8s-models.ts:38
resourcePath resource-link.jsx:45
ResourceLink resource-link.jsx:65

Comment 3 Samuel Padgett 2019-04-29 13:51:45 UTC
Digging deeper, `involvedObject` seems to be defined, but it has no `kind` property, which causes the runtime error. Adding a guard to `ResourceLink` to avoid this for events or other contexts.

https://github.com/openshift/console/pull/1504

Comment 4 XiaochuanWang 2019-04-30 09:32:27 UTC
This is not reproduced on 4.1-art-latest-2019-04-29-235412:console 
Console image:
    console.openshift.io/image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f6e707cb19025dee3a58db39eca56be7c351e35ee748c4c01d7a81082321d2bf
Commit:
    io.openshift.build.commit.id=b53117a33ddf82d4ff16fb0cc55fb5062b66bf5c 
    io.openshift.build.commit.url=https://github.com/openshift/console/commit/b53117a33ddf82d4ff16fb0cc55fb5062b66bf5c