lensapp / lens

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

Lens not working over X11 #3463

Closed sudo-sandw1ch closed 3 years ago

sudo-sandw1ch commented 3 years ago

Describe the bug While trying to run Lens over X11, it fails to load and, instead, displays a blank screen.

To Reproduce Steps to reproduce the behavior:

  1. Install lens via snap (from .snap package) on a headless RHEL install
  2. Ensure X11 forwarding is enabled
  3. On remote machine "ssh -Y [server]"
  4. Once in remote machine, run kotena-lens

Expected behavior Kotena lens launches, then renders the application.

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:

$ lens
info: πŸ“Ÿ Setting Lens as protocol client for lens://
info: πŸ“Ÿ Protocol client register failed ❗

(lens:8777): GdkPixbuf-WARNING **: 20:29:40.822: Cannot open pixbuf loader module file '/home/jon/snap/lens/common/.cache/gdk-pixbuf-loaders.cache': No such file or directory

This likely means that your installation is broken.
Try running the command
  gdk-pixbuf-query-loaders > /home/jon/snap/lens/common/.cache/gdk-pixbuf-loaders.cache
to make things work again for the time being.
info: πŸš€ Starting Lens from "/home/jon/snap/lens/x1/.config/Lens"
info: 🐚 Syncing shell environment
info: πŸ’Ύ Loading stores
Running 2.1.0-beta.4 migration for /home/jon/snap/lens/x1/.config/Lens/lens-user-store.json
Running 5.0.0-alpha.3 migration for /home/jon/snap/lens/x1/.config/Lens/lens-user-store.json
Running 5.0.3-beta.1 migration for /home/jon/snap/lens/x1/.config/Lens/lens-user-store.json
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/lens-user-store.json
Running 2.0.0-beta.2 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 2.4.1 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 2.6.0-beta.2 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 2.6.0-beta.3 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 2.7.0-beta.0 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 2.7.0-beta.1 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 3.6.0-beta.1 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Number of clusters to migrate:  0
Running 5.0.0-beta.10 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 5.0.0-beta.13 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 5.1.2-latest.20210719.1 migration for /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Migrating embedded kubeconfig paths
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
Running 5.0.0-alpha.0 migration for /home/jon/snap/lens/x1/.config/Lens/lens-hotbar-store.json
Running 5.0.0-alpha.2 migration for /home/jon/snap/lens/x1/.config/Lens/lens-hotbar-store.json
Running 5.0.0-beta.5 migration for /home/jon/snap/lens/x1/.config/Lens/lens-hotbar-store.json
Running 5.0.0-beta.10 migration for /home/jon/snap/lens/x1/.config/Lens/lens-hotbar-store.json
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/lens-hotbar-store.json
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/lens-extensions.json
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/lens-filesystem-provisioner-store.json
Running 5.0.0-alpha.0 migration for /home/jon/snap/lens/x1/.config/Lens/lens-weblink-store.json
Running 5.0.0-alpha.2 migration for /home/jon/snap/lens/x1/.config/Lens/lens-weblink-store.json
Running 5.0.0-beta.5 migration for /home/jon/snap/lens/x1/.config/Lens/lens-weblink-store.json
Running 5.0.0-beta.10 migration for /home/jon/snap/lens/x1/.config/Lens/lens-weblink-store.json
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/lens-weblink-store.json
info: πŸ”Œ Starting LensProxy
info: [LENS-PROXY]: Proxy server has started at 127.0.0.1:34029
info: πŸ”Ž Testing LensProxy connection ...
info: ⚑ LensProxy connection OK
info: πŸ–₯️  Starting WindowManager
SNAP env is defined, updater is disabled
info: 🧩 Initializing extensions
info: [EXTENSION-DISCOVERY] loading extensions from /home/jon/snap/lens/x1/.config/Lens
info: [WINDOW-MANAGER]:Β Loading Main window from url: http://localhost:34029 ...
info: [EXTENSION-INSTALLER] installing dependencies at /home/jon/snap/lens/x1/.config/Lens
info: [EXTENSION-INSTALLER] dependencies installed at /home/jon/snap/lens/x1/.config/Lens
info: [EXTENSION-DISCOVERY] watching extension add/remove in /home/jon/.k8slens/extensions
Native extraction module not loaded, msgpackr will still run, but with decreased performance. Cannot find module 'msgpackr-extract'
Lens Cloud Extension activated
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/extension-store/lenscloud-lens-extension/auth-token-store.json
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/extension-store/lens-survey/preferences-store.json
telemetry main extension activated
info: [STORE]: LOADED from /home/jon/snap/lens/x1/.config/Lens/extension-store/lens-telemetry/preferences-store.json
info: [EXTENSION]: enabled lens-license@5.1.2-latest.20210719.1
info: [EXTENSION]: enabled lens-survey@5.1.2-latest.20210719.1
info: [EXTENSION]: enabled lens-telemetry@5.1.2-latest.20210719.1
[CLUSTER-CONNECT] cluster proxy started on port 44547
[CLUSTER-CONNECT] cluster proxy is using aes-256-gcm for end-to-end encryption
info: [STORE]: SAVING /home/jon/snap/lens/x1/.config/Lens/lens-filesystem-provisioner-store.json
info: [EXTENSION]: enabled lenscloud-lens-extension@5.1.2-latest.20210719.1
info: [KUBECONFIG-SYNC]: starting requested syncs
info: πŸ“‘ Checking for app updates
info: Checking for update
info: [KUBECONFIG-SYNC]: starting sync of file/folder {"filePath":"/home/jon/snap/lens/x1/.config/Lens/kubeconfigs"}
info: [KUBECONFIG-SYNC]: starting sync of file/folder {"filePath":"/home/jon/.kube"}
error: Error: Error: ENOENT: no such file or directory, open '/var/lib/snapd/snap/lens/x1/resources/app-update.yml'
error: [UPDATE-CHECKER]: failed with an error {"error":"Error: ENOENT: no such file or directory, open '/var/lib/snapd/snap/lens/x1/resources/app-update.yml'"}
info: [STORE]: SAVING /home/jon/snap/lens/x1/.config/Lens/lens-cluster-store.json
info: [WINDOW-MANAGER]: Main window loaded
info: [WINDOW-MANAGER]: Main window has reported that it has loaded

Additional context I have tried this on 2 Linux VMs and WSL2 over ssh, both fail to render.

If I wasn't clear above, a window is displayed... however nothing inside the window is rendered.

jim-docker commented 3 years ago

Can you try this: https://github.com/lensapp/lens/issues/3356#issuecomment-878322566?

I will add this to the documentation somewhere

sudo-sandw1ch commented 3 years ago

I thought I tried that solution yesterday, before posting this! I tried it again and it worked. Thanks!