CLI electronize build on linux #406

Closed
opened 2026-01-29 16:38:45 +00:00 by claunia · 1 comment
Owner

Originally created by @AyronK on GitHub (Nov 2, 2019).

Originally assigned to: @robertmuehsig on GitHub.

  • Version: CLI 5.30.1
  • Target: linux

I added electronize build step to my CI pipeline running on Alpine linux. I'm getting the following error. Works fine on windows for me. Seems like a problem with Directory.GetCurrentDirectory().

I replaced irrelevant part of path with *app_path*.

$ electronize build /target win
Build Electron Application...
Build ASP.NET Core App for win-x64...
Executing dotnet publish in this directory: /builds/*app_path*/obj/desktop/win
Build ASP.NET Core App for win-x64 under Release-Configuration...
Unhandled exception. System.AggregateException: One or more errors occurred. (No such file or directory)
 ---> System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, 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 ElectronNET.CLI.ProcessHelper.CmdExecute(String command, String workingDirectoryPath, Boolean output, Boolean waitForExit) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\ProcessHelper.cs:line 81
   at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__17_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\BuildCommand.cs:line 83
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at ElectronNET.CLI.Program.Main(String[] args) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 59
Aborted (core dumped)

It might be an issue with .NET runtime, but I'm letting you know, because unhandled exception is never a keeper :)

Originally created by @AyronK on GitHub (Nov 2, 2019). Originally assigned to: @robertmuehsig on GitHub. <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: CLI 5.30.1 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> <!-- What target are you building for? --> * **Target**: linux <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> I added electronize build step to my CI pipeline running on Alpine linux. I'm getting the following error. Works fine on windows for me. Seems like a problem with `Directory.GetCurrentDirectory()`. I replaced irrelevant part of path with `*app_path*`. ``` $ electronize build /target win Build Electron Application... Build ASP.NET Core App for win-x64... Executing dotnet publish in this directory: /builds/*app_path*/obj/desktop/win Build ASP.NET Core App for win-x64 under Release-Configuration... Unhandled exception. System.AggregateException: One or more errors occurred. (No such file or directory) ---> System.ComponentModel.Win32Exception (2): No such file or directory at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, 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 ElectronNET.CLI.ProcessHelper.CmdExecute(String command, String workingDirectoryPath, Boolean output, Boolean waitForExit) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\ProcessHelper.cs:line 81 at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__17_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\BuildCommand.cs:line 83 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at ElectronNET.CLI.Program.Main(String[] args) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 59 Aborted (core dumped) ``` It might be an issue with .NET runtime, but I'm letting you know, because unhandled exception is never a keeper :)
claunia added the bug label 2026-01-29 16:38:45 +00:00
Author
Owner

@AyronK commented on GitHub (Jan 10, 2020):

I am using latest CLI (7.30.2) now and it works fine :)! It's hard to tell when it was fixed and if it was intentional, but I do not get error mentioned above. In the meantime I also switched to Ubuntu, so it still has to be verified on Alpine. Anyway I see this issue is still open so I give my update here!

@AyronK commented on GitHub (Jan 10, 2020): I am using latest CLI (7.30.2) now and it works fine :)! It's hard to tell when it was fixed and if it was intentional, but I do not get error mentioned above. In the meantime I also switched to Ubuntu, so it still has to be verified on Alpine. Anyway I see this issue is still open so I give my update here!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#406