Bug 2084287 - Topology & Add page breaks on 'default' Project -- No Items In Project
Summary: Topology & Add page breaks on 'default' Project -- No Items In Project
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: Christoph Jerolimov
QA Contact: spathak@redhat.com
Depends On:
TreeView+ depends on / blocked
Reported: 2022-05-11 19:26 UTC by Andrew Ballantyne
Modified: 2023-02-07 13:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The UI expects that all ClusterServiceVersion contains a spec.provider definitions, but it is not required from the resource. Consequence: The operator details page crashes when trying to show such a resource. Fix: Add a null check so that ClusterServiceVersion resources without spec.provider works fine. Result: The operator details page doesn't crash anymore for such operators.
Clone Of:
Last Closed: 2023-02-07 13:22:41 UTC
Target Upstream Version:

Attachments (Terms of Use)
ErrorBoundary Error (157.47 KB, image/png)
2022-05-11 19:26 UTC, Andrew Ballantyne
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11544 0 None open Bug 2084287: Fix NPE when consuming CSVs with missing informations 2022-05-23 11:04:44 UTC
Red Hat Product Errata RHSA-2023:0565 0 None None None 2023-02-07 13:22:44 UTC

Description Andrew Ballantyne 2022-05-11 19:26:44 UTC
Created attachment 1878748 [details]
ErrorBoundary Error

Description of problem:
When viewing the 'default' project, I got a lot of errors and crashes of the console.

Navigating to Topology showed an error boundary (the ticket focus) but if you go to +Add page as well, there appears to be no error boundary around this error and it crashes the console UI.

Stack trace:

TypeError: Cannot read properties of undefined (reading 'name')
    at https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/operator-lifecycle-manager/code-refs/utils-chunk-2a3bbcc340971d436ce8.min.js:1:859
    at Array.map (<anonymous>)
    at b (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/operator-lifecycle-manager/code-refs/utils-chunk-2a3bbcc340971d436ce8.min.js:1:718)
    at https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/operator-lifecycle-manager/code-refs/utils-chunk-2a3bbcc340971d436ce8.min.js:1:2404
    at Object.useMemo (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/vendors~main-chunk-e1199ea10741207136a7.min.js:263:64802)
    at Object.t.useMemo (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/vendors~main-chunk-e1199ea10741207136a7.min.js:255:5743)
    at a.a (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/operator-lifecycle-manager/code-refs/utils-chunk-2a3bbcc340971d436ce8.min.js:1:2392)
    at t.a (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/main-chunk-991204a0f90294840d22.min.js:1:717973)
    at na (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/vendors~main-chunk-e1199ea10741207136a7.min.js:263:58879)
    at Hs (https://console-openshift-console.apps.jephilli-4-11-05-11-0633.devcluster.openshift.com/static/vendors~main-chunk-e1199ea10741207136a7.min.js:263:111315)

Comment 1 Andrew Ballantyne 2022-05-11 19:30:30 UTC
Forgot to mention in the description -- there appears to be nothing in the project. I checked the admin list screens for pods, deployments, DCs, Jobs, DS, and RS -- there was nothing in the project.

Comment 2 Christoph Jerolimov 2022-05-23 10:20:03 UTC
/static/operator-lifecycle-manager/code-refs/utils-chunk-3fed9eff372e533c4c16.min.js contains the code of  packages/operator-lifecycle-manager/src/utils/useClusterServiceVersions.tsx

Based on the stack trace (Array.map) and error (Cannot read properties of undefined (reading 'name')) it looks like name is not defined in line 60:

    .map((desc) => {
      const { creationTimestamp } = desc.csv.metadata;
      const uid = `${desc.csv.metadata.uid}-${desc.displayName}`;
      const { description } = desc;
      const provider = desc.csv.spec.provider.name;                  // Crash here

Comment 3 Christoph Jerolimov 2022-05-23 11:01:47 UTC
The cluster contains a CSV that misses the provider.name. Could reproduce this issue with this CSV:

apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
  name: minimal-csv
  namespace: christoph
      - group: A
        kind: A
        name: A
        version: v1
      - kind: B
        name: B
        version: v1
  displayName: My minimal CSV
    strategy: ''

Comment 6 Christoph Jerolimov 2022-06-10 20:15:22 UTC
Verified on 4.11.0-0.nightly-2022-06-10-191219, with the yaml in comment 3 that the topology doesn't crash.

But the OperatorHub tabs 'A' and 'B' shows a catched error. I want to take a look into that error as well.

Oh no! Something went wrong.

Cannot read properties of undefined (reading 'apiGroup')

Comment 8 Christoph Jerolimov 2023-01-26 16:54:16 UTC
The origin issue was fixed in 4.11. I reopened it to fix another part of this issue that is not related to the origin error 'Topology & Add page breaks' but since new tickets needs to be tracked in Jira, I mark this as verified again. See https://bugzilla.redhat.com/show_bug.cgi?id=2084287#c6

I already created a follow-up ticket in Jira: https://issues.redhat.com/browse/OCPBUGS-6689

And we will also backport this fix here and the fix of https://issues.redhat.com/browse/OCPBUGS-6689 as part of https://issues.redhat.com/browse/OCPBUGS-6690 to 4.10 and later to 4.9 and 4.8.

Comment 11 errata-xmlrpc 2023-02-07 13:22:41 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 (Important: OpenShift Container Platform 4.11.26 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.


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