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

Lens 5 does not start if shell autostarts tmux #3294

Open
omjadas opened this issue Jul 7, 2021 · 7 comments
Open

Lens 5 does not start if shell autostarts tmux #3294

omjadas opened this issue Jul 7, 2021 · 7 comments
Labels
area/linux bug Something isn't working

Comments

@omjadas
Copy link

omjadas commented Jul 7, 2021

Describe the bug
Lens 5 does not start

To Reproduce
Steps to reproduce the behavior:

  1. Use ZSH with oh my zsh tmux plugin and ZSH_TMUX_AUTOSTART=true
  2. Launch Lens
  3. Lens is stuck on loading window

Expected behavior
Lens will launch

Screenshots
image

Environment (please complete the following information):

  • Lens Version: 5.0.2
  • OS: macOS
  • Installation method: DMG

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 succeeded ✅
info: 🚀 Starting Lens from "/Users/omja/Library/Application Support/Lens"
info: 🐚 Syncing shell environment
error: shellEnv: TypeError: Cannot read property 'split' of undefined
info: 💾 Loading stores
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-user-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-cluster-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-hotbar-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-extensions.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-filesystem-provisioner-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-weblink-store.json
info: 🔌 Starting LensProxy
info: [LENS-PROXY]: Proxy server has started at 127.0.0.1:62668
info: 🔎 Testing LensProxy connection ...
info: ⚡ LensProxy connection OK
info: 🖥️  Starting WindowManager
info: 🧩 Initializing extensions
info: [EXTENSION-DISCOVERY] loading extensions from /Users/omja/Library/Application Support/Lens
info: [EXTENSION-INSTALLER] installing dependencies at /Users/omja/Library/Application Support/Lens
info: [WINDOW-MANAGER]: Loading Main window from url: http://localhost:62668 ...
info: [EXTENSION-INSTALLER] dependencies installed at /Users/omja/Library/Application Support/Lens
info: [EXTENSION-DISCOVERY] watching extension add/remove in /Users/omja/.k8slens/extensions
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/extension-store/lenscloud-lens-extension/auth-token-store.json
error: [EXTENSIONS-LOADER]: can't load main for "lens-telemetry": TypeError: Cannot create a second singleton while creating a first {"extension":{"id":"/Users/omja/Library/Application Support/Lens/node_modules/lens-telemetry/package.json","absolutePath":"/Applications/Lens.app/Contents/Resources/extensions/telemetry/lens-telemetry-5.0.2-latest.20210705.2.tgz","manifestPath":"/Users/omja/Library/Application Support/Lens/node_modules/lens-telemetry/package.json","manifest":{"name":"lens-telemetry","version":"5.0.2-latest.20210705.2","description":"Lens IDE telemetry","main":"dist/main.js","renderer":"dist/renderer.js","lens":{"metadata":{},"styles":[]},"scripts":{"build":"webpack -p && npm pack","dev":"webpack --watch","test":"jest --passWithNoTests --env=jsdom src $@"},"files":["dist/**/*"],"devDependencies":{"@k8slens/extensions":"file:../../src/extensions/npm/extensions","@types/analytics-node":"^3.1.3","@types/node":"^14.14.14","@types/react":"^17.0.0","@types/universal-analytics":"^0.4.4","analytics-node":"^3.4.0-beta.3","conf":"^7.1.2","jest":"^26.6.3","mobx":"^6.3.2","mobx-react":"^7.1.0","node-machine-id":"^1.1.12","react":"^16.13.1","ts-loader":"^8.0.4","typescript":"^4.0.3","universal-analytics":"^0.4.23","webpack":"^4.44.2","webpack-cli":"^3.3.11"}},"isBundled":true,"isEnabled":true,"isCompatible":true}}
error: [EXTENSION]: failed to activate lens-survey@5.0.2-latest.20210705.2: Error: [MobX] No annotations were passed to makeObservable, but no decorated members have been found either
info: [EXTENSION]: enabled lens-license@5.0.2-latest.20210705.2
error: [EXTENSION]: failed to activate lenscloud-lens-extension@5.0.2-latest.20210705.2: Error: Error while obtaining machine id: Error: Command failed: ioreg -rd1 -c IOPlatformExpertDevice
/bin/sh: ioreg: command not found

    at ChildProcess.exithandler (child_process.js:304:12)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:223:5)
    at Pipe.<anonymous> (net.js:664:12)
info: [WINDOW-MANAGER]: Main window loaded
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-user-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-cluster-store.json
info: [CLUSTER-STORE] requesting initial state sync
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-hotbar-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-extensions.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-filesystem-provisioner-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/lens-weblink-store.json
info: [CLUSTER-STORE] start to listen (1)
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/extension-store/lenscloud-lens-extension/auth-token-store.json
info: [STORE]: LOADED from /Users/omja/Library/Application Support/Lens/extension-store/lens-survey/preferences-store.json
info: [EXTENSION]: enabled kube-object-event-status@5.0.2-latest.20210705.2
info: [EXTENSION]: enabled lens-metrics-cluster-feature@5.0.2-latest.20210705.2
info: [EXTENSION]: enabled lens-node-menu@5.0.2-latest.20210705.2
info: [EXTENSION]: enabled lens-pod-menu@5.0.2-latest.20210705.2
error: [EXTENSION]: failed to activate lens-survey@5.0.2-latest.20210705.2: TypeError: Cannot create a second singleton while creating a first
error: [EXTENSION]: failed to activate lenscloud-lens-extension@5.0.2-latest.20210705.2: Error: Error while obtaining machine id: Error: Command failed: ioreg -rd1 -c IOPlatformExpertDevice
/bin/sh: ioreg: command not found

    at ChildProcess.exithandler (child_process.js:304:12)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Socket.<anonymous> (internal/child_process.js:430:11)
    at Socket.emit (events.js:223:5)
    at Pipe.<anonymous> (net.js:664:12)
info: [StorageHelper]: loading finished for /Users/omja/Library/Application Support/Lens/lens-local-storage/app.json
error: Can't find working API for the Kubernetes resource ingresses
info: [StorageHelper]: saving /Users/omja/Library/Application Support/Lens/lens-local-storage/app.json
info: [CLUSTER]: disconnect {"id":"8fd2dbea6c376e032d664b49b09852a1","name":"arn:aws:eks:us-east-1:453793470413:cluster/staging-use1","ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: unbind events {"id":"8fd2dbea6c376e032d664b49b09852a1","name":"arn:aws:eks:us-east-1:453793470413:cluster/staging-use1","ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: disconnect {"id":"c38b5de1f68b8e581300b360b41c0437","name":"arn:aws:eks:ap-southeast-2:453793470413:cluster/staging-apse2","ready":false,"online":false,"accessible":false,"disconnected":true}
info: [CLUSTER]: unbind events {"id":"c38b5de1f68b8e581300b360b41c0437","name":"arn:aws:eks:ap-southeast-2:453793470413:cluster/staging-apse2","ready":false,"online":false,"accessible":false,"disconnected":true}
info: SERVICE:QUIT

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
When ZSH_TMUX_AUTOSTART=false Lens opens properly.

@omjadas omjadas added the bug Something isn't working label Jul 7, 2021
@Nokel81
Copy link
Collaborator

Nokel81 commented Jul 8, 2021

Thank you for reporting this. There seems to be two issues. An error related to shell sync and one related to ioreg not being found.

Have you changed your $PATH to not have /usr/sbin in it?

@Nokel81
Copy link
Collaborator

Nokel81 commented Jul 9, 2021

I have ran ZSH_TMUX_AUTOSTART=true make dev (and it launched fine) but will try it when running a released version.

@omjadas
Copy link
Author

omjadas commented Jul 9, 2021

Just checked my path and can confirm that /usr/sbin is present

@omjadas
Copy link
Author

omjadas commented Jul 9, 2021

I just found this sindresorhus/shell-env#4, not sure what can be done here (apart from perhaps finding a different solution to gather environment variables)

@Nokel81
Copy link
Collaborator

Nokel81 commented Jul 9, 2021

Thanks for finding that. And I realize that I am not running the tmux plugin so that is probably why I didn't run into the issue.

@Nokel81
Copy link
Collaborator

Nokel81 commented Jul 9, 2021

If you run ioreg yourself, do you get output (don't post it if you do).

@omjadas
Copy link
Author

omjadas commented Jul 9, 2021

I do get output when I run ioreg

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

No branches or pull requests

2 participants