lensapp / lens

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

can not open lens5 #3244

Closed justingkao closed 3 years ago

justingkao commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

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:

Your logs go here...
```info: πŸ“Ÿ Setting Lens as protocol client for lens://
info: πŸ“Ÿ Protocol client register succeeded βœ…
info: πŸš€ Starting Lens from "C:\Users\xxxx\AppData\Roaming\Lens"
info: 🐚 Syncing shell environment
info: πŸ’Ύ Loading stores
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\Lens\lens-user-store.json
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\Lens\lens-cluster-store.json
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\Lens\lens-hotbar-store.json
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\Lens\lens-extensions.json
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\Lens\lens-filesystem-provisioner-store.json
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\Lens\lens-weblink-store.json
info: πŸ”Œ Starting LensProxy
info: [LENS-PROXY]: Proxy server has started at 127.0.0.1:60772
info: πŸ”Ž Testing LensProxy connection ...
info: ⚑ LensProxy connection OK
info: πŸ–₯️  Starting WindowManager
info: 🧩 Initializing extensions
info: [EXTENSION-DISCOVERY] loading extensions from C:\Users\xxx\AppData\Roaming\Lens
info: [EXTENSION-INSTALLER] installing dependencies at C:\Users\xxx\AppData\Roaming\Lens
info: [WINDOW-MANAGER]:Β Loading Main window from url: http://localhost:60772 ...
info: [EXTENSION-INSTALLER] dependencies installed at C:\Users\xxx\AppData\Roaming\Lens
info: [EXTENSION-DISCOVERY] watching extension add/remove in C:\Users\xxxx\.k8slens\extensions
info: [STORE]: LOADED from C:\Users\xxx\AppData\Roaming\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":"C:\\Users\\xxx\\AppData\\Roaming\\Lens\\node_modules\\lens-telemetry\\package.json","absolutePath":"C:\\Users\\xxx\\AppData\\Local\\Programs\\Lens\\resources\\extensions\\telemetry\\lens-telemetry-5.0.0-latest.20210629.3.tgz","manifestPath":"C:\\Users\\xxx\\AppData\\Roaming\\Lens\\node_modules\\lens-telemetry\\package.json","manifest":{"name":"lens-telemetry","version":"5.0.0-latest.20210629.3","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.0-latest.20210629.3: Error: [MobX] No annotations were passed to makeObservable, but no decorated members have been found either
info: [EXTENSION]: enabled lens-license@5.0.0-latest.20210629.3
error: [EXTENSION]: failed to activate lenscloud-lens-extension@5.0.0-latest.20210629.3: Error: Error while obtaining machine id: Error: Command failed: %windir%\System32\REG.exe QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography /v MachineGuid
ERROR: Registry editing has been disabled by your administrator.

    at ChildProcess.exithandler (child_process.js:304:12)
    at ChildProcess.emit (events.js:223:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)

**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**
Add any other context about the problem here.
justingkao commented 3 years ago

Why does lens5 need to read/write reg

nevalla commented 3 years ago

Why does lens5 need to read/write reg

It seems that one library (node-machine-id) that Lens uses, reads unique machineId from registry on Windows. Despite the library claims:

And No elevated rights required

We need to fix this, at least so that it catches that error.