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

Rancher Desktop fails to render UI on windows #5132

Closed
IsaSih opened this issue Jul 7, 2023 · 5 comments
Closed

Rancher Desktop fails to render UI on windows #5132

IsaSih opened this issue Jul 7, 2023 · 5 comments
Assignees
Labels
kind/bug Something isn't working priority/0 Work needs to go into the next release or force a patch
Milestone

Comments

@IsaSih
Copy link
Contributor

IsaSih commented Jul 7, 2023

Actual Behavior

Rancher Desktop starts without rendering the UI

Steps to Reproduce

  1. Fresh install Rancher Desktop with build from https://github.com/rancher-sandbox/rancher-desktop/actions/runs/5490505444
  2. Install RD for all users
  3. Start Rancher Desktop

Remarks:
There was a remaining incomplete deployment profile with no keys. Path is HKEY_CURRENT_USER\Software\Rancher Desktop\Profile

Result

Rancher Desktop is not rendering the UI in the main window. From the wsl logs, it seems it's stuck in starting the gest-agent.
From the logs:

From integrations.log:

2023-07-07T23:04:27.495Z: Failed to readlink/rm $HOME/.docker/cli-plugins/docker-compose c [Error]: C:\Windows\system32\wsl.exe exited with code 1
    at ChildProcess.<anonymous> (C:\Program Files\Rancher Desktop\resources\app.asar\dist\app\background.js:1:14952)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  command: [
    'C:\\Windows\\system32\\wsl.exe',
    '--distribution',
    'Ubuntu',
    '--exec',
    '/bin/sh',
    '-c',
    'readlink -f "$HOME/.docker/cli-plugins/docker-compose"'
  ],
  stdout: '',
  code: 1,
  [Symbol(child-process.command)]: 'C:\\Windows\\system32\\wsl.exe --distribution Ubuntu --exec /bin/sh -c readlink -f "$HOME/.docker/cli-plugins/docker-compose"'
}
2023-07-07T23:05:58.386Z: Failed to readlink/rm $HOME/.docker/cli-plugins/docker-buildx c [Error]: C:\Windows\system32\wsl.exe exited with code 1
    at ChildProcess.<anonymous> (C:\Program Files\Rancher Desktop\resources\app.asar\dist\app\background.js:1:14952)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  command: [
    'C:\\Windows\\system32\\wsl.exe',
    '--distribution',
    'Ubuntu',
    '--exec',
    '/bin/sh',
    '-c',
    'readlink -f "$HOME/.docker/cli-plugins/docker-buildx"'
  ],
  stdout: '',
  code: 1,
  [Symbol(child-process.command)]: 'C:\\Windows\\system32\\wsl.exe --distribution Ubuntu --exec /bin/sh -c readlink -f "$HOME/.docker/cli-plugins/docker-buildx"'
}

From diagnostics.log:

ERROR checking WSL_FROM_STORE {
  e: c [Error]: C:\Windows\System32\wsl.exe exited with code 4294967295
      at ChildProcess.<anonymous> (C:\Program Files\Rancher Desktop\resources\app.asar\dist\app\background.js:1:14952)
      at ChildProcess.emit (node:events:527:28)
      at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
    command: [ 'C:\\Windows\\System32\\wsl.exe', '--version' ],
    stdout: 'Invalid command line option: --version\r\r\n' 

wsl-exec.log:

2023-07-07T23:05:00.780Z: Running: wsl.exe --distribution rancher-desktop --exec /sbin/rc-update --update

 * /etc/fstab does not exist

background.log:

2023-07-07T23:04:25.990Z: Stopping background process Win32 socket proxy (pid <none>).
2023-07-07T23:04:26.999Z: Launching background process Win32 socket proxy.
2023-07-07T23:04:27.048Z: Launching background process Vtunnel Host Process.
2023-07-07T23:04:28.993Z: Stopping background process host-resolver vsock host (pid <none>).
2023-07-07T23:04:28.993Z: Stopping background process host-switch.exe (pid <none>).
2023-07-07T23:04:33.573Z: Launching background process host-resolver vsock host.
2023-07-07T23:04:43.661Z: Background process host-resolver vsock host (pid 7584) exited with status 1 signal null
2023-07-07T23:04:44.675Z: Launching background process host-resolver vsock host.

Full logs:
wsl-init.zip

Expected Behavior

Got an error during the installation process. First-run dialog did not show up. Main Window UI is not rendering, nor the Preferences dialog is being open.

Additional Information

No response

Rancher Desktop Version

1.9.1.233

Rancher Desktop K8s Version

n/a

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

Windows

Operating System / Build Version

Windows 11

What CPU architecture are you using?

x64

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

None

Windows User Only

No response

@IsaSih IsaSih added kind/bug Something isn't working platform/windows labels Jul 7, 2023
@IsaSih IsaSih added this to the 1.10 milestone Jul 8, 2023
@IsaSih IsaSih added the priority/1 Work should be fixed for next release label Jul 8, 2023
@jandubois
Copy link
Member

Same thing happens on macOS for latest CI build from main. Application runs, and I can use docker and kubectl, but the UI is just an empty white window.

@jandubois jandubois added priority/0 Work needs to go into the next release or force a patch and removed priority/1 Work should be fixed for next release labels Jul 8, 2023
@rak-phillip
Copy link
Contributor

It looks like some change came in recently that is attempting to invoke node apis from the renderer process. This is the output of the developer console when I run the build listed above in Windows 11 with the chrome remote debugger attached

node:internal/fs/utils:345 Uncaught Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Rancher Desktop\script_logs'
    at mkdirSync (node:fs:1349:3)
    at e.mkdirSync (node:electron/js2c/asar_bundle:5:12607)
    at 110 (4321208.js:1:3134)
    at f (8b4e9cb.js:1:577)
    at 71 (4321208.js:1:811857)
    at f (8b4e9cb.js:1:577)
    at 138 (4321208.js:1:8832)
    at f (8b4e9cb.js:1:577)
    at 460 (4321208.js:1:200359)
    at f (8b4e9cb.js:1:577)

@jandubois
Copy link
Member

I only see this referenced in fb82c32, and only in the fallback branch when Rancher Desktop cannot locate rdctl, a condition that was supposed to be impossible in a packaged build.

If I'm correct in my understanding, then this perfectly illustrates why I objected to having fallback code in the application that only exist for the benefit of the build process.

I believe #5127 is going to fix this, but am not 100% sure. @ericpromislow and @adamkpickering , please confirm!

@adamkpickering
Copy link
Member

The primary issue here is that Rancher Desktop cannot find rdctl. This results in trying to create script_logs in a place the user doesn't have the right permissions for, which is the secondary issue. I am investigating further - perhaps I had the wrong idea about where rdctl is on Windows.

@ericpromislow
Copy link
Contributor

Fixed by #5161 - dup of error #5157 (which was given in terms of the underlying cause. This issue reported the symptom.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/0 Work needs to go into the next release or force a patch
Projects
None yet
Development

No branches or pull requests

5 participants