Bug 1796619 - react warning updating state of an unmounted component due to rbac checks
Summary: react warning updating state of an unmounted component due to rbac checks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.4.0
Assignee: cvogt
QA Contact: spathak@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-30 19:20 UTC by cvogt
Modified: 2020-05-04 11:28 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:28:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
no react warning updating state of an unmounted component due to rbac checks-1 (144.65 KB, image/png)
2020-03-06 23:31 UTC, spathak@redhat.com
no flags Details
react warning updating state of an unmounted component due to rbac checks-2 (306.17 KB, image/png)
2020-03-06 23:32 UTC, spathak@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 4066 0 None closed Bug 1796619: useSafetyFirst in rbac useAccessReview hook 2020-04-21 22:14:24 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:28:48 UTC

Description cvogt 2020-01-30 19:20:46 UTC
Description of problem:
We should be using the `useSafetyFirst` hook for react state whenever there is asynchronous update to state.
When querying rbac rules, it's possible that the user loads a part of the UI that requests rbac checks and then navigates away before the rbac check completes. As a result we get warnings in the console

How reproducible:
Reproducible on a slower connection or with dev tools enabled to toggle the network. Navigate to a place in the UI (must be first visit) such as the topology and select a node to open the side bar. Upon loading of the sidebar, immediately navigate away and wait for the rbac network request to complete.

Comment 2 spathak@redhat.com 2020-03-06 23:31:26 UTC
Created attachment 1668228 [details]
no react warning updating state of an unmounted component due to rbac checks-1

Comment 3 spathak@redhat.com 2020-03-06 23:32:07 UTC
Created attachment 1668229 [details]
react warning updating state of an unmounted component due to rbac checks-2

Comment 4 spathak@redhat.com 2020-03-06 23:33:24 UTC
Verified on build : 4.4.0-0.ci-2020-03-06-174627
Chrome browser: 76.0.3809.132

Comment 6 errata-xmlrpc 2020-05-04 11:28:24 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:0581


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