redpanda-data / redpanda-data/console

Create topic button results in client crash if user is not allowed to view some kafka topics

Open
#1,359 3 comments 0 reactions 1 assignee View on GitHub

@jvorcak is already working on this.

Since Sep 10, 2024.

bug frontend
Dominant language
TypeScript
Stars
4.3k
Forks
432
Avg merge
3d 6h
Merged PRs (30d)
40

Description

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 :

`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.