lensapp / lens

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

Lens App can not connect to some clusters (RangeError: Maximum call stack size exceeded) #8110

Open vlasashk opened 4 days ago

vlasashk commented 4 days ago

Describe the bug Unable to connect to some clusters (in UI keeps loading without any indication of a problem, in logs reports an error)

To Reproduce Steps to reproduce the behavior:

  1. Open Lens
  2. Click on 'Local Kuberconfigs'
  3. Click cluster to connect to

Expected behavior Successfully connect to cluster and show cluster info or in case of error show error in UI

Screenshots

exmpl

Environment (please complete the following information):

Logs: When you run the application executable from command line you will see some logging output. Please paste them here:

...
(node:28179) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
(Use `Lens --trace-warnings ...` to show where the warning was created)
debug:   ┏ [INTERNAL-PROXY]: [JSON-API] request POST https://127.0.0.1:61053/api-kube/apis/authorization.k8s.io/v1/selfsubjectaccessreviews +87ms
...(here configs data)
(node:28179) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. MaxListeners is 10. Use events.setMaxListeners() to increase limit
Error occurred in handler for 'activate-cluster': RangeError: Maximum call stack size exceeded
    at /Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:461:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:485:41
    at async /Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:664:35
    at async /Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:729:29
    at async _ensure (/Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:804:31)
    at async Object.ensure (/Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:822:23)
    at async /Applications/Lens.app/Contents/Resources/app.asar/node_modules/@lensapp/cluster-manager-main/dist/index.js:1123:5
    at async WebContents.<anonymous> (node:electron/js2c/browser_init:2:83654)

Kubeconfig: Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.

your kubeconfig here

Additional context configs are fine since I'm able to connect to all clusters without any issues via kubectl

clrothmann commented 18 hours ago

Thank you for your feedback @vlasashk. To further investigate your issue in more detail, could you please provide the following information: What happens when you manually disconnect and reconnect during this state? -> Right-click on your cluster in the left-hand Navigator, click the corresponding entry in the context menu, and then click on the cluster again. I will pass your issue along with your log excerpts to the corresponding team. Looking forward to your response!