Repository: redpanda-data/console

Issue #891: Cannot read properties of undefined (reading 'find')
Created: 2023-10-18T14:55:50Z
Trying to push the create topic button on the UI after getting connected to an AWS MSK broker:
Type:
TypeError
Message:
Cannot read properties of undefined (reading 'find')
Stack (Decoded):
find (components/pages/topics/Topic.List.tsx:402:13)
tryGetBrokerConfig (components/pages/topics/Topic.List.tsx:490:42)
call (../node_modules/mobx/src/core/derivation.ts:183:23)
trackDerivedFunction (../node_modules/mobx/src/core/computedvalue.ts:250:18)
computeValue_ (../node_modules/mobx/src/core/computedvalue.ts:218:30)
trackAndCompute (../node_modules/mobx/src/core/computedvalue.ts:183:25)
get (../node_modules/mobx/src/types/observableobject.ts:121:38)
getObservablePropValue_ (../node_modules/mobx/src/types/observableobject.ts:701:35)
key (../node_modules/mobx/src/types/observableobject.ts:182:28)
get_ (../node_modules/mobx/src/types/dynamicobject.ts:30:30)
Stack (Raw):
TypeError: Cannot read properties of undefined (reading 'find')
at tryGetBrokerConfig (http://localhost:8081/static/js/506.8f55509e.chunk.js:1:462585)
at get partitions (http://localhost:8081/static/js/506.8f55509e.chunk.js:1:464066)
at trackDerivedFunction (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:820842)
at ComputedValue.computeValue_ (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:818655)
at ComputedValue.trackAndCompute (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:818435)
at ComputedValue.get (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:817582)
at ObservableObjectAdministration.getObservablePropValue_ (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:852995)
at Object.get (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:858585)
at ObservableObjectAdministration.get_ (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:853647)
at Object.get (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:834536)
Components:
at CreateTopicModalContent (http://localhost:8081/static/js/506.8f55509e.chunk.js:1:322301)
at div
at div
at http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:339964
at div
at http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:340115
at DomWrapper (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:1027048)
at http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:1030135
at http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:341717
at div
at div
at Dialog (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:342672)
at http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:337544
at DialogWrap (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:344934)
at NoFormStyle (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:284641)
at NoCompactStyle (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:459017)
at Modal (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:346003)
at observerComponent (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:791987)
at div
at section
at http://localhost:8081/static/js/910.aa630b19.chunk.js:2:12610
at ChakraComponent (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:222225)
at Section (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:490220)
at Section
at div
at http://localhost:8081/static/js/910.aa630b19.chunk.js:2:12610
at ChakraComponent (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:222225)
at http://localhost:8081/static/js/550.374d74ba.chunk.js:2:197006
at div
at VisualElementHandler (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:308040)
at MotionComponent (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:308912)
at PageContent (http://localhost:8081/static/js/506.8f55509e.chunk.js:1:24248)
at TopicList (http://localhost:8081/static/js/506.8f55509e.chunk.js:1:462071)
at Route (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:103400)
at Switch (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:104474)
at PresenceChild (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:299730)
at AnimatePresence (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:300619)
at RouteView
at ErrorDisplay (http://localhost:8081/static/js/733.f66b3d16.chunk.js:1:24098)
at div
at observerComponent (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:791987)
at main
at http://localhost:8081/static/js/910.aa630b19.chunk.js:2:12610
at ChakraComponent (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:222225)
at Container2 (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:205300)
at div
at http://localhost:8081/static/js/910.aa630b19.chunk.js:2:12610
at ChakraComponent (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:222225)
at Grid2 (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:193348)
at Switch (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:104474)
at RequireAuth (http://localhost:8081/static/js/733.f66b3d16.chunk.js:1:39593)
at ErrorBoundary (http://localhost:8081/static/js/733.f66b3d16.chunk.js:1:746)
at EnvironmentProvider (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:65951)
at ColorModeProvider (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:62534)
at ThemeProvider (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:13006)
at ThemeProvider (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:60417)
at ChakraProvider (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:66548)
at ChakraProvider2 (http://localhost:8081/static/js/550.374d74ba.chunk.js:2:81845)
at Router (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:100260)
at BrowserRouter (http://localhost:8081/static/js/910.aa630b19.chunk.js:2:94756)
at observerComponent (http://localhost:8081/static/js/178.f9517ba1.chunk.js:2:791987)

Environment:
NODE_ENV        : production
GIT_SHA         : 1db8cedf2d9d8ac087961476cf9e885ad5e1118a
GIT_REF         : master
BUILD_TIMESTAMP : 1694701166
PLATFORM_VERSION: v23.2
BUILT_FROM_PUSH : false
Location:
Protocol: http:
Path    : /topics
Search  :
Hash    :

Duplicate issue #1359: Create topic button results in client crash if user is not allowed to view some kafka topics
Created: 2024-08-05T12:15:38Z
I connected redpanda console to a kafka cluster. I can see some topics based on cluster ACL.
But when i press on the button to create a topic the client is crashing. Log error can be found below. In the docker redpanda console container i see a lot of errors about not being able to read broker config or some topic (which is correct i don't have access to that with my certs). But i think this shouldnt crash the page.
Using the POST on  http://localhost:8080/api/topics to create a topic works fine.
Bug can be reproduced on  image tag v2.7.0 (latest) and v2.6.1 (what i tested)
`
Type:
TypeError
Message:
Cannot read properties of undefined (reading 'find')
Stack (Decoded):
find (components/pages/topics/Topic.List.tsx:435:13)
tryGetBrokerConfig (components/pages/topics/Topic.List.tsx:521:42)
call (../node_modules/mobx/src/core/derivation.ts:183:23)
trackDerivedFunction (../node_modules/mobx/src/core/computedvalue.ts:250:18)
computeValue_ (../node_modules/mobx/src/core/computedvalue.ts:218:30)
trackAndCompute (../node_modules/mobx/src/core/computedvalue.ts:183:25)
get (../node_modules/mobx/src/types/observableobject.ts:122:38)
getObservablePropValue_ (../node_modules/mobx/src/types/observableobject.ts:706:35)
key (../node_modules/mobx/src/types/observableobject.ts:183:28)
get_ (../node_modules/mobx/src/types/dynamicobject.ts:30:30)
Stack (Raw):
TypeError: Cannot read properties of undefined (reading 'find')
at tryGetBrokerConfig (http://localhost:8080/static/js/4280.caf35915.chunk.js:1:668347)
at get partitions (http://localhost:8080/static/js/4280.caf35915.chunk.js:1:669847)
at trackDerivedFunction (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:105612)
at ComputedValue.computeValue_ (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:103425)
at ComputedValue.trackAndCompute (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:103205)
at ComputedValue.get (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:102352)
at ObservableObjectAdministration.getObservablePropValue_ (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:137558)
at Object.get (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:143208)
at ObservableObjectAdministration.get_ (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:138210)
at Object.get (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:119124)
Components:
at CreateTopicModalContent (http://localhost:8080/static/js/4280.caf35915.chunk.js:1:529151)
at div
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:379428
at section
at VisualElementHandler (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:557990)
at MotionComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:558862)
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:140921
at div
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:369747
at div
at FocusLockUI (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:315592)
at FocusLockUICombination
at FocusLock (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:330047)
at ModalFocusScope (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:378643)
at http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:141238
at DefaultPortal (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:391396)
at Portal
at PresenceChild (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:549680)
at AnimatePresence (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:550569)
at Modal (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:369002)
at observerComponent (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:76637)
at div
at section
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at Section (http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:264803)
at Section
at div
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:346490
at div
at VisualElementHandler (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:557990)
at MotionComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:558862)
at PageContent (http://localhost:8080/static/js/4280.caf35915.chunk.js:1:7938)
at TopicList (http://localhost:8080/static/js/4280.caf35915.chunk.js:1:667839)
at Route (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:165427)
at Switch (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:166501)
at PresenceChild (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:549680)
at AnimatePresence (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:550569)
at RouteView
at observerComponent (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:76637)
at div
at observerComponent (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:76637)
at main
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at Container2 (http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:131977)
at div
at http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:12611
at ChakraComponent (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:453784)
at Grid2 (http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:123777)
at Switch (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:166501)
at RequireAuth (http://localhost:8080/static/js/9439.50b439a6.chunk.js:1:37403)
at ErrorBoundary (http://localhost:8080/static/js/9439.50b439a6.chunk.js:1:1216)
at EnvironmentProvider (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:403055)
at ColorModeProvider (http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:45978)
at ThemeProvider (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:13007)
at ThemeProvider (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:457395)
at ChakraProvider (http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:49054)
at ChakraProvider2 (http://localhost:8080/static/js/3388.0bf0fdf9.chunk.js:2:49689)
at Router (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:162287)
at BrowserRouter (http://localhost:8080/static/js/4503.5256a2d8.chunk.js:2:156749)
at observerComponent (http://localhost:8080/static/js/9249.9b198061.chunk.js:2:76637)

Environment:
NODE_ENV        : production
GIT_SHA         : 42e56574aa1ff618083a3199ea869242b110fb59
GIT_REF         : master
BUILD_TIMESTAMP : 1720621253
PLATFORM_VERSION: v24.1
BUILT_FROM_PUSH : false
Location:
Protocol: http:
Path    : /topics
Search  :
Hash    :
`

Closing comment (2024-08-26T08:59:18Z): Probably duplicate of: #891