komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

[BUG]: Waiting for komorebi.exe

Open Viciooso opened this issue 2 years ago • 15 comments

Been trying komorebi, first run works well, then

Start-Process 'komorebi.exe' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again

Can't manage to make it work, tried different versions, scoop, winget, none work after the second run.

Running also whkd as the keyboard shortcuts.

Viciooso avatar Apr 02 '24 22:04 Viciooso

What is the output of komorebic check?

LGUG2Z avatar Apr 03 '24 00:04 LGUG2Z

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Viciooso

Looking for configuration files in C:\Users\Viciooso

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\Viciooso\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

Tried passing --config but still getting the same issue:

Start-Process 'komorebi.exe' -ArgumentList '--config="C:\Users\Viciooso\komorebi.json"' -WindowStyle hidden
Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again

Komorebi and whkd was installed with scoop, don't know if that make a difference.

Viciooso avatar Apr 04 '24 09:04 Viciooso

If you run "komorebi.exe" it should log information about the underlying error to the console; can you share that here?

LGUG2Z avatar Apr 04 '24 14:04 LGUG2Z

2024-04-04T14:33:17.748208Z  INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-04-04T14:33:17.771309Z  INFO komorebi: creating window manager from static configuration file: C:\Users\Viciooso\komorebi.json
Error:
   0: A socket operation encountered a dead network. (os error 10050)

Location:
   komorebi\src\static_config.rs:709

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
   2: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

Viciooso avatar Apr 04 '24 14:04 Viciooso

Looks like you are running into the same issue from here: https://github.com/LGUG2Z/komorebi/issues/671, also recently surfaced here: https://github.com/LGUG2Z/komorebi/issues/732

Did you run the komorebic quickstart command when following the guide? This command creates some komorebi system directories that are required to run the program correctly.

LGUG2Z avatar Apr 04 '24 15:04 LGUG2Z

Yeah, as i said in the first comment, when i run komorebic quickstart it works fine, but when i close it, reboot the system and try again to start it with komorebic start --whkd it just says Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again

Viciooso avatar Apr 04 '24 15:04 Viciooso

The only reason for the error that you're seeing is if the $Env:LOCALAPPDATA\komorebi folder doesn't exist.

mkdir "$Env:LOCALAPPDATA\komorebi" -ea 0

If you create the folder manually with this PowerShell command, does it persist after a reboot?

LGUG2Z avatar Apr 04 '24 15:04 LGUG2Z

i am experiencing similar issue on win 10 (installed with scoop). The one on windows 11 installed with winget works fine. i have tried these: quickstart, making sure the komorebi folder exists in appdata. Also i noticed that komorebic quickstart doesn't create the komorebi.json on the home folder.

the error i get:

❯ komorebi.exe
2024-04-04T16:42:36.258519Z  INFO foreground_lock_timeout: komorebi::windows_api: current value of ForegroundLockTimeout is 0
2024-04-04T16:42:36.262649Z  INFO komorebi: creating window manager from static configuration file: C:\Users\asharaf\.config\komorebi\komorebi.json
Error:
   0: The system cannot find the file specified. (os error 2)

Location:
   komorebi\src\static_config.rs:559

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: BaseThreadInitThunk<unknown>
      at <unknown source file>:<unknown line>
   2: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

PowerShell profile environment variables:

$Env:XDG_CONFIG_HOME = "$Env:USERPROFILE\.config"
$Env:KOMOREBI_CONFIG_HOME = "$Env:USERPROFILE\.config\komorebi"
$Env:WHKD_CONFIG_HOME = "$Env:USERPROFILE\.config\whkd"

azinsharaf avatar Apr 04 '24 16:04 azinsharaf

@azinsharaf your error looks like it may be an issue with the location of the applications.yaml file 👀

LGUG2Z avatar Apr 04 '24 16:04 LGUG2Z

oh! yes! not sure why my config had been changed after the upgrade. could be user error. All good now. thanks!

azinsharaf avatar Apr 04 '24 16:04 azinsharaf

Windows Update must have changed something because I'm getting this error now -- where does applications.yaml usually live? $Env:LOCALAPPDATA\komorebi already exists

NireBryce avatar Apr 05 '24 23:04 NireBryce

If you update the file with the komorebic fetch-asc command it will get downloaded to either $Env:USERPROFILE or $Env:KOMOREBI_CONFIG_HOME (if set). For example, when I run it with the custom config dir env var set, I get this output:

❯ komorebic fetch-asc
Latest version of applications.yaml from https://github.com/LGUG2Z/komorebi-application-specific-configuration downloaded

You can add this to your komorebi.json static configuration file like this:

"app_specific_configuration_path": "C:\Users\LGUG2Z\.config\komorebi\applications.yaml"

If you're getting the error that @azinsharaf posted it's worth running fetch-asc and then updating the location of the file in komorebi.json based on the output you get from that command.

LGUG2Z avatar Apr 05 '24 23:04 LGUG2Z

yep that fixed it, weird. The file landed where it was set in the config file though, unless $ENV:USERPROFILE pointed somewhere other than my homedir before windowsUpdate ran.

no idea if the file existed before now, but the windows-update would be the only thing that's changed since last night when komorebi ran fine and this morning when komorebi broke.

NireBryce avatar Apr 05 '24 23:04 NireBryce

been using v1.22 and after multiple stop/starts and config edits, now i'm getting the bug in the OP too

mmikeww avatar Apr 14 '24 03:04 mmikeww

komorebic check output same as Viciooso

komorebi.exe showed a json error missing 'workspaces' item. json looked formatted correctly but i removed a bunch and now it works. maybe spit out that error during komorebic start for better ux

mmikeww avatar Apr 14 '24 10:04 mmikeww

https://github.com/LGUG2Z/komorebi/commit/aff1081ccdb5439e726496a62cd73abc56eafbff

LGUG2Z avatar May 12 '24 18:05 LGUG2Z