lensapp / lens

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

Lens crash on start in pop 21.04 #3564

Open mathus13 opened 3 years ago

mathus13 commented 3 years ago

Describe the bug Lens crash on startup using deb or appimage installer

To Reproduce Steps to reproduce the behavior:

Expected behavior Lens UI opens, allowing the user to add clusters

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:

info: 📟 Setting Lens as protocol client for lens://
info: 📟 Protocol client register failed ❗
info: 🚀 Starting Lens from "/home/s_barratt/.config/Lens"
info: 🐚 Syncing shell environment
info: 💾 Loading stores
info: [STORE]: LOADED from /home/s_barratt/.config/Lens/lens-user-store.json
info: [STORE]: LOADED from /home/s_barratt/.config/Lens/lens-cluster-store.json
info: [STORE]: LOADED from /home/s_barratt/.config/Lens/lens-hotbar-store.json
info: [STORE]: LOADED from /home/s_barratt/.config/Lens/lens-extensions.json
info: [STORE]: LOADED from /home/s_barratt/.config/Lens/lens-filesystem-provisioner-store.json
info: [STORE]: LOADED from /home/s_barratt/.config/Lens/lens-weblink-store.json
info: 🔌 Starting LensProxy
info: [LENS-PROXY]: Proxy server has started at 127.0.0.1:45721
info: 🔎 Testing LensProxy connection ...
error: 🛑 LensProxy: failed connection test: RequestError: Error: connect ECONNREFUSED ::1:45721
info: 🖥️  Starting WindowManager
APPIMAGE env is not defined, current application is not an AppImage
info: 🧩 Initializing extensions
info: [EXTENSION-DISCOVERY] loading extensions from /home/s_barratt/.config/Lens

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.

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: {cert}
    server: https://{cluster}.sk1.us-east-1.eks.amazonaws.com
  name: arn:aws:eks:us-east-1:{acct}:cluster/pre-prod
contexts:
- context:
    cluster: arn:aws:eks:us-east-1:{acct}:cluster/pre-prod
    user: arn:aws:eks:us-east-1:{acct}:cluster/pre-prod
  name: arn:aws:eks:us-east-1:{acct}:cluster/pre-prod
current-context: arn:aws:eks:us-east-1:{acct}:cluster/pre-prod
kind: Config
preferences: {}
users:
- name: arn:aws:eks:us-east-1:{acct}:cluster/pre-prod
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - --region
      - us-east-1
      - eks
      - get-token
      - --cluster-name
      - pre-prod
      command: aws

Additional context snap install starts, but gives an error of not being able to connect to LensProxy when attempting to connect to any cluster

msa0311 commented 3 years ago

thanks for reporting this! Is your machine configured to use IPv6? We are trying to listen to IPv4 addresses only as of now...

mathus13 commented 3 years ago

My machine is configured for both ipv4 and ipv6. When I disable ipv6, it gives the same error, but with the loopback address

mathus13 commented 3 years ago

@msa0311 just installed the latest 20210908 release and have a more detailed error:

s_barratt@efi-76-l03:~/code/caves-validator$ lens
info:    ▪ 📟 Setting Lens as protocol client for lens:// +0ms
info:    ▪ 📟 Protocol client register failed ❗ +9ms
info:    ▪ 🚀 Starting Lens from "/opt/Lens/lens" +97ms
info:    ▪ 🐚 Syncing shell environment +1ms
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
info:    ▪ 💾 Loading stores +68ms
info:    ▪ [KS]: LOADED from /home/s_barratt/.config/Lens/lens-user-store.json +19ms
info:    ▪ [GA]: LOADED from /home/s_barratt/.config/Lens/lens-cluster-store.json +3ms
info:    ▪ [UU]: LOADED from /home/s_barratt/.config/Lens/lens-hotbar-store.json +2ms
info:    ▪ [YT]: LOADED from /home/s_barratt/.config/Lens/lens-extensions.json +1ms
info:    ▪ [QC]: LOADED from /home/s_barratt/.config/Lens/lens-filesystem-provisioner-store.json +1ms
info:    ▪ [EI]: LOADED from /home/s_barratt/.config/Lens/lens-weblink-store.json +2ms
info:    ▪ 🔌 Starting LensProxy +11ms
info:    ▪ [LENS-PROXY]: Proxy server has started at 127.0.0.1:46509 +3ms
info:    ▪ 🔎 Testing LensProxy connection ... +1ms
error:   ▪ 🛑 LensProxy: failed connection test: RequestError: Error: connect ECONNREFUSED ::1:46509 +160ms
info:    ▪ 🖥️  Starting WindowManager +4ms
APPIMAGE env is not defined, current application is not an AppImage
info:    ▪ 🧩 Initializing extensions +38ms
info:    ▪ [EXTENSION-DISCOVERY] loading extensions from /home/s_barratt/.config/Lens +0ms
error:   ┏ Loading main window failed +38ms
error:   ┃ [ 1] {
error:   ┃ [ 2]   error: Error: ERR_FAILED (-2) loading 'static://splash.html'
error:   ┃ [ 3]       at rejectAndCleanup (electron/js2c/browser_init.js:217:1457)
error:   ┃ [ 4]       at Object.stopLoadingListener (electron/js2c/browser_init.js:217:1832)
error:   ┃ [ 5]       at Object.emit (events.js:315:20)
error:   ┃ [ 6]       at Object.EventEmitter.emit (domain.js:467:12)
error:   ┃ [ 7]       at Object.emitter.emit (/opt/Lens/resources/app.asar/node_modules/@sentry/electron/dist/main/integrations/electron.js:63:25) {
error:   ┃ [ 8]     errno: -2,
error:   ┃ [ 9]     code: 'ERR_FAILED',
error:   ┃ [10]     url: 'static://splash.html'
error:   ┃ [11]   }
error:   ┗ [12] }
Nokel81 commented 2 years ago

I believe this is an issue with your /etc/hosts file. Do you have docker installed? Does the info in #3913 help?

excalq commented 1 year ago

A similar issue for me was caused by /etc/hosts not having 127.0.0.1 localhost, but using 127.0.0.1 for various dev site domains (which I changed to 127.0.0.N (N > 1).