lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.55k stars 1.47k forks source link

Stacktrace when clicking on node or pod #7851

Open salyh opened 1 year ago

salyh commented 1 year ago

Describe the bug When clicking on sever resources (like a kubernetes node or pod) I get

Component stack:

    at p (/Users/xxx/.k8slens/extensions/kubescape--lens-extension/dist/renderer.js:1:34062)
    at Details
    at div
    at div
    at div
    at NonInjectedAnimate (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:46115:13)
    at NonInjectedDrawer (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:62741:9)
    at observerComponent (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:376129:16)
    at ObserverComponent (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:376177:23)
    at c (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:663807:673)
    at observerComponent (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:376129:16)
    at ObserverComponent (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:376177:23)
    at observerComponent (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:376129:16)
    at https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:663828:1641
    at ThemeProvider (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:241171:24)
    at https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:41213:28
    at Router (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:605525:30)
    at https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:41213:28
    at observerComponent (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:376129:16)
Error stack:

TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at t.getResourceIdByUid (/Users/xxx/.k8slens/extensions/kubescape--lens-extension/dist/renderer.js:1:38702)
    at p.render (/Users/xxx/.k8slens/extensions/kubescape--lens-extension/dist/renderer.js:1:34217)
    at qi (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604074:188)
    at pi (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604073:173)
    at ck (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604156:427)
    at bk (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604137:347)
    at ak (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604137:278)
    at Tj (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604137:138)
    at Lj (https://a34e58e739efff0912c0c6938df9870a.lens.app:62495/build/lens.js?43a381c2abfe92c49385:604130:163)

Expected behavior No stacktrace - detailed information about the selected resource like pod or node

Environment (please complete the following information):

Additional context Happens only for one of my k8s clusters, all others work well. The not working k8s cluster is a RKE2 cluster on 1.25.9+rke2r1

Nokel81 commented 1 year ago

Looks like an error from @kubescape/lens-extension

ComputermanjRevealData commented 1 year ago

I am getting the same error

patrickmanzo commented 9 months ago

It is exactly the problem mentioned by @Nokel81, I have tested right now after disabled the extension @kubescape/lens-extension and it works really well!”