rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
6.02k stars 285 forks source link

No kubernetes versions displayed after factory reset on windows #7615

Open AndiBoegelein opened 1 month ago

AndiBoegelein commented 1 month ago

Actual Behavior

After a factory reset on first startup of rancher desktop or under Preferences -> Kubernetes there are no kubernetes Versions displayed.

image

Steps to Reproduce

Factory Reset RD Restart RD Try to select kubernetes version

Result

No kubernetes versions are displayed

Expected Behavior

Display all working/available kubernetes versions as it was before factory reset

Additional Information

I attached most of the logs that have any information in them. Relevant logs seem to be background.log with the hint that the request to https://desktop.version.rancher.io/v1/checkupgrade failed, Also important to note is the wsl setup for certificates in the wsl-exec.log wsl-init.log background.log rancher-desktop-guestagent.log wsl-exec.log buildkitd.log vm-switch.log network-setup.log

Rancher Desktop Version

1.16.0

Rancher Desktop K8s Version

deactivated because no version is offered

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

Windows

Operating System / Build Version

Windows 10 Enterprise

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

None

Windows User Only

I am using a coporate proxy with authentication to access certain internet resources

mook-as commented 1 month ago

Hmm, the logs say:

FetchError: request to https://update.k3s.io/v1-release/channels failed, reason: self signed certificate in certificate chain

Are you using any proxies (or possibly corporate transparent proxies)? Though we should have code to deal with that…

angolding commented 1 month ago

I am running into this issue and I am behind a proxy

2024-10-10T19:42:50.574Z: k3sHelper.initialize failed:  FetchError: request to https://update.k3s.io/v1-release/channels failed, reason: unable to get local issuer certificate
    at ClientRequest.<anonymous> (/Applications/Rancher Desktop.app/Contents/Resources/app.asar/node_modules/node-fetch/lib/index.js:1501:11)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}
AndiBoegelein commented 1 month ago

Hmm, the logs say:

FetchError: request to https://update.k3s.io/v1-release/channels failed, reason: self signed certificate in certificate chain

Are you using any proxies (or possibly corporate transparent proxies)? Though we should have code to deal with that…

Yes I am behind a corporate proxy. I already used the RD Feature to enable proxy use (with authentication) but it does not seem to have any effect on loading kubernetes versions.

mook-as commented 1 month ago

Right, the proxy settings are for the VM once that's up; but the issue currently is that things being fetched from the host (via JavaScript) isn't picking up the host CA certificates for some reason. We'll need to look at that code again.

AndiBoegelein commented 1 month ago

Right, the proxy settings are for the VM once that's up; but the issue currently is that things being fetched from the host (via JavaScript) isn't picking up the host CA certificates for some reason. We'll need to look at that code again.

Hi @mook-as thanks for giving the outlook of this working in a future version. Just FYI I remebered that I used an older version before I used factory reset. In this older version everything seemed to work fine. To test this I just installed the older version (1.12.3) and tested if it would still work. Lo and behold it is working with the older version without changing anything else (system wise): image

Maybe this will help you identify the bug comparing the code to an older version.