Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
iosifbel opened this issue Aug 5, 2024 · 3 comments
Assignees
Labels
bug Something isn't working frontend

Comments

@iosifbel
Copy link

iosifbel commented Aug 5, 2024

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 :

`

@weeco
Copy link
Contributor

weeco commented Aug 5, 2024

I assume that Console doesn't have the permissions to retrieve broker configs. These are retrieved as part of the Create Topic dialogue to find and display the default configurations for your new topic. It shouldn't be required though.

If you grant the Console user the appropriate permissions the problem should be gone though. I'll keep this issue and flag it as a bug.

@weeco weeco added bug Something isn't working frontend labels Aug 5, 2024
@iosifbel
Copy link
Author

iosifbel commented Aug 5, 2024

i use TLS to authenticate with our kafka cluster. It is true that my certificates don't allow me to get broker information, though i can get a lot of other useful information like most of the topics and their specific configs. But also, this shouldn't be required to create a new topic. Thanks for answering so quickly

@weeco
Copy link
Contributor

weeco commented Aug 26, 2024

Probably duplicate of: #891

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend
Projects
None yet
Development

No branches or pull requests

3 participants