ramensoftware / windhawk

The customization marketplace for Windows programs: https://windhawk.net/
https://windhawk.net
GNU General Public License v3.0
1.79k stars 56 forks source link

Windhawk won't load when I download it #26

Closed tml-101 closed 1 year ago

tml-101 commented 1 year ago

Hello, I am trying to install Windhawk on a VM (win11 not 22h2) to test it out first before using it on a real machine. When I load it up, it just shows up as black. I've been troubleshooting for the past few hours. If anyone could provide any help, I would really appreciate it!

m417z commented 1 year ago

Hi,

Looks similar to the problem discussed in this thread: https://github.com/ramensoftware/windhawk/discussions/9

Quoting my answer from there, please try this first:

  • Press Ctrl+Alt+Shift+P.
  • Type >Toggle Developer Tools and press enter.
  • Open the Console tab and see whether there are any errors.

If that doesn't work, please try this:

If you have security software like an antivirus, you might want to temporarily turn it off and check whether Windhawk works, perhaps it's being blocked for some reason.

Also, you can try running "C:\Program Files\Windhawk\UI\VSCodium.exe" directly and see whether it works. Windhawk uses VSCodium for the UI, and perhaps there's a problem with it.

tml-101 commented 1 year ago

Hi, I ran VSCodium and it worked. However the app still isn’t working. Is there something I should do next?

tml-101 commented 1 year ago

By the way, I am able to get the “portable” version running, but it’s missing some things that I like to have so I’d prefer to try to get the full version working.

m417z commented 1 year ago

Sorry for the late reply. Windhawk v1.0 was just released, it uses a newer VSCodium version so perhaps it fixes the issue. Please try it.

If not, let's try to see if logs can shed some light. Please run cmd as administrator and run the following command:

set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

Copy the line, paste it into cmd and press Enter. Adjust the paths if needed. Windhawk will launch. Wait for several seconds, close it, copy the logs printed in cmd (Ctrl+A -> Ctrl+C works) and paste them here.

tml-101 commented 1 year ago

No worries! I will try this as soon as I get a chance. Thank you and happy holidays!

On Mon, Dec 26, 2022 at 4:38 AM Michael Maltsev @.***> wrote:

Sorry for the late reply. Windhawk v1.0 was just released, it uses a newer VSCodium version so perhaps it fixes the issue. Please try it.

If not, let's try to see if logs can shed some light. Please run cmd as administrator and run the following command:

set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

Copy the line, paste it into cmd and press Enter. Adjust the paths if needed. Windhawk will launch. Wait for several seconds, close it, copy the logs printed in cmd (Ctrl+A -> Ctrl+C works) and paste them here.

— Reply to this email directly, view it on GitHub https://github.com/ramensoftware/windhawk/issues/26#issuecomment-1365038267, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SEXVR725CMQSXNIIDL5ZTWPFRQ5ANCNFSM6AAAAAASTTLJ44 . You are receiving this because you authored the thread.Message ID: @.***>

-- Gamertag: tml_101

YT: TAKV Gaming

m417z commented 1 year ago

I tried searching for some known issues about VSCode showing a blank screen, and there are several workarounds worth trying. @tml-101 can you please run cmd as admin, and try adding the following switches:

  1. --disable-gpu Complete command:
    set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --disable-gpu --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%
  2. --disable-features=CalculateNativeWinOcclusion Complete command:
    set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --disable-features=CalculateNativeWinOcclusion --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

    For each of the two tests, please see whether Windhawk launches normally. Thanks.

@zamarax could you try that as well please? You reported a similar issue in the past.

tml-101 commented 1 year ago

Hi, It seems like after I reinstalled Windhawk it’s working again. I dont really know why, but it seems to be working now. Sorry for the late reply!

On Thu, Jan 12, 2023 at 3:07 PM Michael Maltsev @.***> wrote:

I tried searching for some known issues about VSCode showing a blank screen, and there are several workarounds worth trying. @tml-101 https://github.com/tml-101 can you please run cmd as admin, and try adding the following switches:

  1. --disable-gpu Complete command:

set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --disable-gpu --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

  1. --disable-features=CalculateNativeWinOcclusion Complete command:

set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --disable-features=CalculateNativeWinOcclusion --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

For each of the two tests, please see whether Windhawk launches normally. Thanks.

@zamarax https://github.com/zamarax could you try that as well please? You reported a similar issue in the past https://github.com/ramensoftware/windhawk/discussions/9.

— Reply to this email directly, view it on GitHub https://github.com/ramensoftware/windhawk/issues/26#issuecomment-1380940056, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4SEXVXFC2DOVRRMDCVMDD3WSBP6XANCNFSM6AAAAAASTTLJ44 . You are receiving this because you were mentioned.Message ID: @.***>

-- Gamertag: tml_101

YT: TAKV Gaming

nickjp5 commented 1 year ago

I have the same issue - Windhawk runs, but window is blank/black. Not running in a VM.

Have tried re-installing and issue persists. Also tried running with the --disable-features=CalculateNativeWinOcclusion and --disable-gpu options - same result.

Console shows

set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --disable-features=CalculateNativeWinOcclusion --disable-gpu --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

Warning: 'disable-features' is not in the list of known options, but still passed to Electron/Chromium.
Warning: 'enable-logging' is not in the list of known options, but still passed to Electron/Chromium.
[main 2023-01-18T22:49:49.082Z] update#ctor - updates are disabled by user preference
[main 2023-01-18T22:49:49.957Z] Starting extension host with pid 8828 (fork() took 13 ms).
[3148:0119/094950.287:INFO:CONSOLE(37)] "%c INFO color: #33f Starting worker process with pid 9624 (type: fileWatcher, window: 1).", source: vscode-file://vscode-app/c:/Program%20Files/Windhawk/UI/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (37)
[3148:0119/094950.375:INFO:CONSOLE(37)] "%c INFO color: #33f WSL is not installed, so could not detect WSL profiles", source: vscode-file://vscode-app/c:/Program%20Files/Windhawk/UI/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js (37)
[3148:0119/094952.948:INFO:CONSOLE(616)] "%c INFO color: #33f [perf] Render performance baseline is 32ms", source: vscode-file://vscode-app/c:/Program%20Files/Windhawk/UI/resources/app/out/vs/workbench/workbench.desktop.main.js (616)
[3148:0119/095000.023:INFO:CONSOLE(616)] "%c  ERR color: #f33 Error while registering log channel file:///c%3A/ProgramData/Windhawk/UIData/user-data/logs/20230119T094948/userDataSync.log Timed out while waiting for file to be created", source: vscode-file://vscode-app/c:/Program%20Files/Windhawk/UI/resources/app/out/vs/workbench/workbench.desktop.main.js (616)

Are there other log files that would be useful? Thanks

m417z commented 1 year ago

@nickjp5 I troubleshooted it with another user a couple of days ago, and we saw that adding --no-sandbox fixed it:

set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --no-sandbox --locale=en --enable-logging=stderr C:\ProgramData\Windhawk\EditorWorkspace && echo Windhawk exited with code %ERRORLEVEL%

I plan on adding it in the next Windhawk version. It would be great if you could confirm that it works for you, too.

I believe that it's related to the last item here, saying that in some scenarios the VSCode/Electron/Chromium sandbox isn't supported when running as administrator.

nickjp5 commented 1 year ago

Brilliant. Windhawk runs and loads sucessfully with --no-sandbox . Thank you!

zamarax commented 1 year ago

I can also confirm that the --no-sandbox command fixed it for me as well.

zamarax commented 1 year ago

Do any of you know a way to set these options on the service? I tried editing the registry and while the service starts it doesn't pass it along.

Here is an example

"C:\Program Files\Windhawk\windhawk.exe" -service set "VSCODE_PORTABLE=C:\ProgramData\Windhawk\UIData" && set "WINDHAWK_UI_PATH=C:\Program Files\Windhawk\UI" && start "" /wait "C:\Program Files\Windhawk\UI\VSCodium.exe" --no-sandbox --locale=en

This is on the image path in registry.

m417z commented 1 year ago

This should be fixed in Windhawk v1.1 which runs VSCodium with the --no-sandbox flag.