Created attachment 1717569 [details] broken UI Created attachment 1717569 [details] broken UI Description of problem: Creating duplicate namespace breaks the UI. The issue only occurs in a dev environment (and not in production env). In both cases, however, the console log shows: - a 409 conflict for HTTP POST - Unhandled promise rejection error Steps: 1. Login to the OCP console UI 2. In Adminitrator perspective, navigate to Administration -> Namespaces page. 3. Create a namespace that already exists in the system. Actual Results: Shows the error: "namespaces <duplicate namespace> already exists" but the UI breaks with following call stack : rejectionHandler vendors~main-f992bf47c06fae930750.js:230383:21 Version-Release number of selected component (if applicable): 4.6 How reproducible: Always
This is the overlay from the Webpack dev server on an unhandled promise rejection. You'd only ever see this in development mode, but we should probably handled the failed promise. I thought we found all the dialogs in https://github.com/openshift/console/pull/6048, but we might have missed one.
Yeah, I saw that this was dev mode only. I asked Harish to update the description to add that distinction. We do still get a console error about an uncaught promise rejection, so I thought this might be a good low severity bug for Harish to look into.
Yeah, I think it's something we want to address. Better to explicitly handle failed promises even if it's not a user-visible bug.
Steps: 1. Pull latest console code, follow steps in https://github.com/openshift/console#build-everything and https://github.com/openshift/console#openshift-no-authentication, bridge to a 4.7 cluster 2. visit OCP console UI at localhost:9000 3. In Adminitrator perspective, navigate to Administration -> Namespaces page. 4. Create a namespace that already exists in the system, we can see js errors in browser console POST http://localhost:9000/api/kubernetes/api/v1/namespaces 409 (Conflict) coFetch @ co-fetch.js:112 (anonymous) @ co-fetch.js:151 (anonymous) @ ui.ts:413 push../public/co-fetch.js.__awaiter @ ui.ts:413 coFetchCommon @ co-fetch.js:147 coFetchJSON @ co-fetch.js:162 coFetchSendJSON @ co-fetch.js:181 push../public/co-fetch.js.coFetchJSON.post @ co-fetch.js:189 k8sCreate @ resource.js:64 createNamespace @ create-namespace-modal.jsx:54 _submit @ create-namespace-modal.jsx:79 callCallback @ react-dom.development.js:347 invokeGuardedCallbackDev @ react-dom.development.js:397 invokeGuardedCallback @ react-dom.development.js:454 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:468 executeDispatch @ react-dom.development.js:600 executeDispatchesInOrder @ react-dom.development.js:622 executeDispatchesAndRelease @ react-dom.development.js:725 executeDispatchesAndReleaseTopLevel @ react-dom.development.js:733 forEachAccumulated @ react-dom.development.js:707 runEventsInBatch @ react-dom.development.js:750 runExtractedPluginEventsInBatch @ react-dom.development.js:881 handleTopLevel @ react-dom.development.js:5901 batchedEventUpdates @ react-dom.development.js:2344 dispatchEventForPluginEventSystem @ react-dom.development.js:5996 dispatchEvent @ react-dom.development.js:6025 unstable_runWithPriority @ scheduler.development.js:643 runWithPriority$2 @ react-dom.development.js:11305 discreteUpdates$1 @ react-dom.development.js:21672 discreteUpdates @ react-dom.development.js:2359 dispatchDiscreteEvent @ react-dom.development.js:5979 react_devtools_backend.js:2450 Failed to create namespace: namespaces "yapei47" already exists overrideMethod @ react_devtools_backend.js:2450 (anonymous) @ create-namespace-modal.jsx:102 Promise.catch (async) _submit @ create-namespace-modal.jsx:98 callCallback @ react-dom.development.js:347 invokeGuardedCallbackDev @ react-dom.development.js:397 invokeGuardedCallback @ react-dom.development.js:454 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:468 executeDispatch @ react-dom.development.js:600 executeDispatchesInOrder @ react-dom.development.js:622 executeDispatchesAndRelease @ react-dom.development.js:725 executeDispatchesAndReleaseTopLevel @ react-dom.development.js:733 forEachAccumulated @ react-dom.development.js:707 runEventsInBatch @ react-dom.development.js:750 runExtractedPluginEventsInBatch @ react-dom.development.js:881 handleTopLevel @ react-dom.development.js:5901 batchedEventUpdates @ react-dom.development.js:2344 dispatchEventForPluginEventSystem @ react-dom.development.js:5996 dispatchEvent @ react-dom.development.js:6025 unstable_runWithPriority @ scheduler.development.js:643 runWithPriority$2 @ react-dom.development.js:11305 discreteUpdates$1 @ react-dom.development.js:21672 discreteUpdates @ react-dom.development.js:2359 dispatchDiscreteEvent @ react-dom.development.js:5979 But console does not crash, moving to VERIFIED
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.7.0 security, bug fix, and enhancement 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-2020:5633