Skip to content

Troubleshooting

Alexey Golub edited this page Nov 5, 2021 · 2 revisions

Error: Failed to obtain process handle

Sometimes, when trying to run a command, you may find the following exception thrown:

InvalidOperationException:
Failed to obtain the handle when starting a process.
This could mean that the target executable doesn't exist or that execute permission is missing.

This is evident of the fact that internally a call to Process.Start() has returned false, which signifies that .NET could not obtain the handle to the process you tried to start. The reasons, however, can vary.

Here are some potential causes:

  1. Executable file doesn't exist (Windows 10)

https://github.com/Tyrrrz/CliWrap/issues/73#issuecomment-647479841

  1. Executable signed with a hardened runtime (macOS)

https://github.com/Tyrrrz/CliWrap/issues/73#issuecomment-647497509

  1. Execution permission is missing (Linux)

https://github.com/Tyrrrz/YoutubeExplode.Converter/issues/25#issuecomment-641251677

Clone this wiki locally