[BUG]: The operation was canceled by the user #480

Closed
opened 2026-01-05 14:50:59 +01:00 by adam · 4 comments
Owner

Originally created by @rknobbe on GitHub (Oct 2, 2024).

Describe the bug
komorebic start fails to start

To Reproduce
Steps to reproduce the behavior:

  1. run 'komorebic start'
  2. see 3 error messages (...The operation was canceled by the user...)

Expected behavior
Komorebic starts komorebi without error message

Operating System

OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.19045 N/A Build 19045

Screenshots and Videos
Add screenshots and videos to help explain your problem.

>komorebi --version
komorebi 0.1.29
tag:v0.1.29
commit_hash:818ac340
build_time:2024-09-28 01:48:31 +00:00
build_env:rustc 1.81.0 (eeb90cda1 2024-09-04),stable-x86_64-pc-windows-msvc

>komorebic start
Error: Start-Process : This command cannot be run due to the error: The operation was canceled by the user.
At line:1 char:1
+ Start-Process 'komorebi.exe' -WindowStyle hidden
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand


Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Error: Start-Process : This command cannot be run due to the error: The operation was canceled by the user.
At line:1 char:1
+ Start-Process 'komorebi.exe' -WindowStyle hidden
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand


Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again
Error: Start-Process : This command cannot be run due to the error: The operation was canceled by the user.
At line:1 char:1
+ Start-Process 'komorebi.exe' -WindowStyle hidden
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand


Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again

Running komorebi.exe directly for detailed error output


komorebic check Output
Provide the output of komorebic check

For example:

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

Looking for configuration files in C:\Users\me

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

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

Additional context
Add any other context about the problem here.

In particular, if you have any other AHK scripts or software running that handle any aspect of window management or manipulation

Originally created by @rknobbe on GitHub (Oct 2, 2024). **Describe the bug** komorebic start fails to start **To Reproduce** Steps to reproduce the behavior: 1. run 'komorebic start' 2. see 3 error messages (...The operation was canceled by the user...) **Expected behavior** Komorebic starts komorebi without error message **Operating System** ``` OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.19045 N/A Build 19045 ``` **Screenshots and Videos** Add screenshots and videos to help explain your problem. ``` >komorebi --version komorebi 0.1.29 tag:v0.1.29 commit_hash:818ac340 build_time:2024-09-28 01:48:31 +00:00 build_env:rustc 1.81.0 (eeb90cda1 2024-09-04),stable-x86_64-pc-windows-msvc >komorebic start Error: Start-Process : This command cannot be run due to the error: The operation was canceled by the user. At line:1 char:1 + Start-Process 'komorebi.exe' -WindowStyle hidden + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Error: Start-Process : This command cannot be run due to the error: The operation was canceled by the user. At line:1 char:1 + Start-Process 'komorebi.exe' -WindowStyle hidden + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Error: Start-Process : This command cannot be run due to the error: The operation was canceled by the user. At line:1 char:1 + Start-Process 'komorebi.exe' -WindowStyle hidden + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand Waiting for komorebi.exe to start...komorebi.exe did not start... Trying again Running komorebi.exe directly for detailed error output ``` **`komorebic check` Output** Provide the output of `komorebic check` For example: ``` No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\me Looking for configuration files in C:\Users\me Found komorebi.json; this file can be passed to the start command with the --config flag Found C:\Users\me\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag ``` **Additional context** Add any other context about the problem here. In particular, if you have any other AHK scripts or software running that handle any aspect of window management or manipulation
adam added the bug label 2026-01-05 14:50:59 +01:00
adam closed this issue 2026-01-05 14:50:59 +01:00
Author
Owner

@rknobbe commented on GitHub (Oct 2, 2024):

komorebi does actually get launched after the 3 errors, after some delay.

@rknobbe commented on GitHub (Oct 2, 2024): komorebi does actually get launched after the 3 errors, after some delay.
Author
Owner

@LGUG2Z commented on GitHub (Oct 2, 2024):

It looks like this is an environment problem: https://stackoverflow.com/questions/5800628/the-operation-was-canceled-by-the-user-exception-from-hresult-0x800704c7

My guess based on some quick Googling is that "security" prompts that would otherwise get shown if the processes were run in the foreground do not get shown when they are run in the background, and this eventually returns the not-very-helpful error you received.

Unless there is any new information to the contrary imo this is an issue that should be raised on the PowerShell repo.

@LGUG2Z commented on GitHub (Oct 2, 2024): It looks like this is an environment problem: https://stackoverflow.com/questions/5800628/the-operation-was-canceled-by-the-user-exception-from-hresult-0x800704c7 My guess based on some quick Googling is that "security" prompts that would otherwise get shown if the processes were run in the foreground do not get shown when they are run in the background, and this eventually returns the not-very-helpful error you received. Unless there is any new information to the contrary imo this is an issue that should be raised on the PowerShell repo.
Author
Owner

@rknobbe commented on GitHub (Oct 2, 2024):

This sounds like the problem, I'm not running as admin (and can't) and the binary isn't signed.

@rknobbe commented on GitHub (Oct 2, 2024): This sounds like the problem, I'm not running as admin (and can't) and the binary isn't signed.
Author
Owner

@rknobbe commented on GitHub (Oct 10, 2024):

Update: I was able to eliminate this problem by following the steps described here

In short, go to properties of komorebi.exe in the installed directory (in my case, %USERPROFILE%\bin ), and set "Unblock". Komorebic start works properly now.

@rknobbe commented on GitHub (Oct 10, 2024): Update: I was able to eliminate this problem by following the steps described [here](https://stackoverflow.com/questions/48946680/how-to-avoid-the-windows-defender-smartscreen-prevented-an-unrecognized-app-fro) In short, go to properties of komorebi.exe in the installed directory (in my case, %USERPROFILE%\bin ), and set "Unblock". `Komorebic start` works properly now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#480