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

Failed kubectl binary download crashes terminal #131

Open
soliujing opened this issue Feb 5, 2025 · 6 comments
Open

Failed kubectl binary download crashes terminal #131

soliujing opened this issue Feb 5, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@soliujing
Copy link

Describe the bug
pod-menu extension latest version not compatible with app v0.1.3

To Reproduce
Steps to reproduce the behavior:

  1. Install extension via open the Freelens -> Extensions menu, enter the name @freelensapp/freelens-node-pod-menu as input, and click the Install button. -> latest version 0.1.4
  2. Click on Attach to Pod or Pod Shell icon on selected pod
  3. Seeing new terminal tab opened and crashed immediately
  4. Uninstall and reinstall with @freelensapp/[email protected]
  5. Both Attach to Pod or Pod Shell are working well

Suggestion
Can it be packaged with main app to avoid compatibility issue?

Environment (please complete the following information):

  • Freelens Version: 0.1.3
  • OS: macos
  • Installation method: brew
@soliujing soliujing added the bug Something isn't working label Feb 5, 2025
@robertobandini
Copy link
Member

Hi @soliujing welcome and thanks about your contribute!
I agree with you, I already opened an issue about that, we planned this goal since months ago in our ideal roadmap.
#129
@mariomamo If you want you can also try to work on this goal: install by default the right version of this extension, for example.
What do you think guys?
If anybody can help just tell to us, thanks!

@dex4er
Copy link
Collaborator

dex4er commented Feb 5, 2025

It works for me:

Image Image Image

This is the right question if extension can be packages with main application and nobody knows the answer yet.

@dex4er
Copy link
Collaborator

dex4er commented Feb 5, 2025

Can you run:

rm -rf ~/.freelens/extensions
/Applications/Freelens.app/Contents/MacOS/Freelens

Then send us the logs? I expect something like:

info:    ┏ [EXTENSION-INSTALLER]: installing package for extension "/Users/dex4er/.freelens/extensions/freelensapp--freelens-node-pod-menu" +9s
info:    ┗ [1] { timestamp: '05/02/2025 12:38:59' }
info:    ┏ [EXTENSION-INSTALLER]: installed package for extension "/Users/dex4er/.freelens/extensions/freelensapp--freelens-node-pod-menu" +413ms
info:    ┗ [1] { timestamp: '05/02/2025 12:39:00' }
info:    ┏ [EXTENSION-DISCOVERY] Added extension @freelensapp/freelens-node-pod-menu +0ms
info:    ┗ [1] { timestamp: '05/02/2025 12:39:00' }
info:    ┏ [BASE-STORE]: saving /Users/dex4er/Library/Application Support/Freelens/lens-extensions.json... +1ms
info:    ┗ [1] { timestamp: '05/02/2025 12:39:00' }

Also menu View -> Toggle Developer Tools then Console output might be helpful.

@mariomamo
Copy link
Collaborator

It works for me too.
I just tried uninstalling and reinstalling version 1.0.4, and everything works as reported by dex4er (I'm on windows)

@soliujing
Copy link
Author

error: ┏ [KUBECTL]: Failed to get a lock for 1.24.17 Lock file is already being held +8s
error: ┃ [1] Error: Lock file is already being held
error: ┃ [2] at /Applications/Freelens.app/Contents/Resources/app.asar/node_modules/proper-lockfile/lib/lockfile.js:68:47
error: ┃ [3] at callback (/Applications/Freelens.app/Contents/Resources/app.asar/node_modules/graceful-fs/polyfills.js:306:20)
error: ┃ [4] at FSReqCallback.oncomplete (node:fs:207:5)
error: ┃ [5] {
error: ┃ [6] code: 'ELOCKED',
error: ┃ [7] file: '/Users/jing_liu/Library/Application Support/Freelens/binaries/kubectl/1.24.17',
error: ┃ [8] timestamp: '06/02/2025 00:40:41'
error: ┗ [9] }
info: ┏ [UNIX-SHELL-ENV]: running against /bin/zsh +1ms
info: ┃ [1] {
info: ┃ [2] command: '/Applications/Freelens.app/Contents/MacOS/Freelens' -p '"51357df267484853b8ee8aaf410eed81" + JSON.stringify(process.env) + "51357df267484853b8ee8aaf410eed81"',
info: ┃ [3] shellArgs: [ '-l', '-i' ],
info: ┃ [4] timestamp: '06/02/2025 00:40:41'
info: ┗ [5] }
info: ┏ [SHELL-SESSION]: PTY for bdd360ced12419eb537f3410d13880fe:a8513aed-74b4-47bc-a802-519a8ef20932 is started with PID=16606 +2ms
info: ┗ [1] { timestamp: '06/02/2025 00:40:41' }
info: ┏ [SHELL-SESSION]: shell has exited for bdd360ced12419eb537f3410d13880fe:a8513aed-74b4-47bc-a802-519a8ef20932 closed with exitcode=0 +410ms
info: ┗ [1] { timestamp: '06/02/2025 00:40:42' }
info: ┏ [SHELL-SESSION]: websocket for bdd360ced12419eb537f3410d13880fe:a8513aed-74b4-47bc-a802-519a8ef20932 closed with code=NormalClosure(1000) +1ms
info: ┃ [ 1] {
info: ┃ [ 2] cluster: {
info: ┃ [ 3] id: 'bdd360ced12419eb537f3410d13880fe',
info: ┃ [ 4] name: 'apo-dev',
info: ┃ [ 5] ready: true,
info: ┃ [ 6] online: true,
info: ┃ [ 7] accessible: true,
info: ┃ [ 8] disconnected: false
info: ┃ [ 9] },
info: ┃ [10] timestamp: '06/02/2025 00:40:42'
info: ┗ [11] }

@soliujing
Copy link
Author

ah, i got the issue.

info: ┏ Downloading kubectl 1.24.17 from https://dl.k8s.io/release/v1.24.17/bin/darwin/arm64/kubectl to /Users/jing_liu/Library/Application Support/Freelens/binaries/kubectl/1.24.17/kubectl +10s
info: ┗ [1] { timestamp: '06/02/2025 01:00:31' }
info: ┏ [CLUSTER]: refresh +20s

Due to network issue, the kubectl binary download running longer than expected.
I have closed that window.

However, even if binary download not finished, it will create 1.24.17.lock and won't clear it.
Later it is already locked then system crashed.

@dex4er dex4er changed the title pod-menu extension v0.1.4 not compatible with app v0.1.3 Failed kubectl binary download crashes terminal Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants