question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled exception: An error occurred trying to start process 'bash' with working directory '/app'. No such file or directory

See original GitHub issue

Describe the bug I am trying to get Terminal.GUI based app to run on docker. Host is Ubuntu 20.04 under WSL, and target is Alpine Linux. I get error about bash, which I assume is not required with Alpine Linux.

The error is:

Unhandled exception. System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'bash' with working directory '/app'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Terminal.Gui.BashRunner.Run(String commandLine, Boolean output, String inputText, Boolean runCurses)
   at Terminal.Gui.CursesDriver.Is_WSL_Platform()
   at Terminal.Gui.CursesDriver.Init(Action terminalResized)
   at Terminal.Gui.Application.Init(Func`1 topLevelFactory, ConsoleDriver driver, IMainLoopDriver mainLoopDriver)
   at Terminal.Gui.Application.Init(ConsoleDriver driver, IMainLoopDriver mainLoopDriver)
   at WhisperDragonCLI.Program.Main(String[] args) in /source/Program.cs:line 42
Aborted

To Reproduce

  1. Clone repo https://github.com/mcraiha/WhisperDragonCLI
  2. Run docker build .
  3. Run docker image ls and get the image id
  4. Run docker run -it IMAGEID
  5. Try to execute the binary with ./WhisperDragon_CLI

Expected behavior No crash / errors

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
mcraihacommented, Sep 25, 2022

Thank you very much.

1reaction
mcraihacommented, Sep 24, 2022

If you mean the reproduction steps, they are the same as in my first post (the repo has been updated with newer .csproj file).

Read more comments on GitHub >

github_iconTop Results From Across the Web

An error occurred trying to start process '/usr/bin/bash' with ...
Here is my current workflow with which I am having trouble getting it work. I think the problem relies in defining working directories...
Read more >
An error occurred trying to start process 'bash' with working ...
Unhandled exception: An error occurred trying to start process 'bash' with working directory '/app'. No such file or directory #1815.
Read more >
.net6 System.Diagnostics.Process.Start error - Microsoft Q&A
ComponentModel.Win32Exception:“An error occurred trying to start process 'https://gitee.com/yhuse/SunnyUI' with working directory 'E:\Projects.
Read more >
Troubleshooting Tips for GitHub Actions Workflows
So try bumping up the version and retry. Error 15: An error occurred trying to start process '/usr/bin/bash' with working directory. This error ......
Read more >
11 Ways to Fix "The System Cannot Find The Path ...
1. Run Command Prompt as an Administrator ... Windows utilities cannot access all files and folders available on your device. Administrative ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found