Created attachment 1762036 [details] Screen shot Created attachment 1762036 [details] Screen shot Created attachment 1762036 [details] Screen shot Description of problem: The FilterToolbar component references 'props.rowFilters.reduce' without using optional chaining or a null check. This can break if 'null' is passed into that prop. Version-Release number of selected component (if applicable): 4.6 How reproducible: Always Steps to Reproduce: 1. Create crd, csv, and cr-instance from this gist: https://gist.github.com/TheRealJon/3680c8a573bde88a974588e269230562 2. Visit Operators > Installed Operators > Mock Operator 3. On the details page, click the All Instances tab Actual results: An uncaught exception is thrown and the page shows "Oh no! Something went wrong." Expected results: A list page with the one operand instance should be shown. Additional info: ProvidedAPIsPage component passes 'null' to rowFilters prop of MultiListPage component if there is one or less provided APIs. This breaks in FilterToolbar component, which doesn't use optional chaining or any null check on the rowFilters prop before referencing rowFilters. This isn't reproduced in 4.7+ because we improved the filtering of provided APIS, and the All Instances tab is not rendered when only one API is provided. Browser console output: Uncaught error TypeError: Cannot read property 'reduce' of null at FilterToolbar_ (main-c2916049073ccd2dbd6d.js:90028) at renderWithHooks (vendors~main-96a1f70a31716de9da69.js:373407) at mountIndeterminateComponent (vendors~main-96a1f70a31716de9da69.js:375641) at beginWork$1 (vendors~main-96a1f70a31716de9da69.js:376785) at HTMLUnknownElement.callCallback (vendors~main-96a1f70a31716de9da69.js:358646) at Object.invokeGuardedCallbackDev (vendors~main-96a1f70a31716de9da69.js:358696) at invokeGuardedCallback (vendors~main-96a1f70a31716de9da69.js:358753) at beginWork$$1 (vendors~main-96a1f70a31716de9da69.js:381516) at performUnitOfWork (vendors~main-96a1f70a31716de9da69.js:380507) at workLoopSync (vendors~main-96a1f70a31716de9da69.js:380484) The above error occurred in the <FilterToolbar_> component: in FilterToolbar_ (created by ConnectFunction) in ConnectFunction (created by Context.Consumer) in FilterToolbar (created by ListPageWrapper_) in div (created by ListPageWrapper_) in ListPageWrapper_ (created by MultiListPage) in Unknown in Unknown (created by ConnectFunction) in ConnectFunction (created by Firehose) in Firehose (created by ConnectFunction) in ConnectFunction (created by MultiListPage) in div (created by ConnectedFireMan) in ConnectedFireMan (created by ConnectFunction) in ConnectFunction in ConnectFunction (created by MultiListPage) in MultiListPage in Unknown (created by ConnectFunction) in ConnectFunction (created by Context.Consumer) in Route in Switch in div (created by Data) in Data (created by StatusBox) in StatusBox in div in Unknown in Unknown in Unknown in Unknown (created by ConnectFunction) in ConnectFunction (created by Firehose) in Firehose (created by ConnectFunction) in ConnectFunction in Unknown (created by DetailsPage) in ErrorBoundary (created by DetailsPage) in DetailsPage (created by ClusterServiceVersionsDetailsPage) in ClusterServiceVersionsDetailsPage (created by AsyncComponent) in AsyncComponent in Unknown (created by ConnectFunction) in ConnectFunction (created by Context.Consumer) in Route (created by AppContents_) in Switch (created by AppContents_) in div (created by AppContents_) in div (created by AppContents_) in section (created by PageSection) in PageSection (created by AppContents_) in AppContents_ (created by ConnectFunction) in ConnectFunction (created by App_) in div (created by DrawerContent) in div (created by DrawerMain) in DrawerMain (created by DrawerContent) in DrawerContent (created by NotificationDrawer) in div (created by Drawer) in Drawer (created by NotificationDrawer) in NotificationDrawer (created by ConnectedNotificationDrawer_) in ConnectedNotificationDrawer_ (created by ConnectFunction) in ConnectFunction (created by App_) in main (created by Page) in div (created by Page) in Page (created by App_) in div (created by DrawerContentBody) in DrawerContentBody (created by QuickStartDrawer) in div (created by DrawerContent) in div (created by DrawerMain) in DrawerMain (created by DrawerContent) in DrawerContent (created by QuickStartDrawer) in div (created by Drawer) in Drawer (created by QuickStartDrawer) in QuickStartDrawer (created by ConnectFunction) in ConnectFunction (created by App_) in EnhancedProvider (created by App_) in DetectPerspective (created by ConnectFunction) in ConnectFunction (created by App_) in App_ (created by ConnectFunction) in ConnectFunction (created by Context.Consumer) in Route in Switch in Router in Provider
Since the All Instances tab is not rendered when only one API is provided on ocp 4.8, so the bug doesn't exist on ocp 4.8 cluster, and also checked on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-03-17-160945 which contains the update from the pr, there is no other issue found.
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