electron / electron/forge

System.ComponentModel.Win32Exception: The system cannot find the file specified when running on azure agent

Open
#3,892 11 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [x] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Forge version

7.6.1

### Electron version

35.0.2

### Operating system

Windows server 2019, Windows server 2022, Windows server 2025

### Last known working Forge version

7.6.1

### Expected behavior

When running electron forge make script on azure pipeline agent, forge should create the distributable files for the application

### Actual behavior

When I run 'make' script on azure pipeline agent, it fails on step 'Making a squirrel distributable for win32/x64'. The exception trace is:
`
× Making a squirrel distributable for win32/x64 [FAILED: Failed with exit code: 4294967295
Output:
System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Squirrel.Utility.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__23.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Squirrel.ReleasePackage.CreateReleasePackage(String outputFile, String packagesRootDir, Func`2 releaseNotesProcessor, Action`1 contentsPostProcessHook)
at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, Boolean packageAs64Bit, String frameworkVersion, Boolean generateDeltas)
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
at Squirrel.Update.Program.Main(String[] args)
---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Squirrel.Utility.d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Squirrel.Utility.d__23.MoveNext()<---
`

### Steps to reproduce

1. Create an electron application and push it to a repo on azure devops
2. Configure squirrel maker
3. Run make script

### Additional information

The process was working before, my last successful run was on October 18th, 2024. I searched for similar issues and I found [that GitHub issue](https://github.com/Squirrel/Squirrel.Windows/issues/1454), and also [that StackOverflow question](https://stackoverflow.com/questions/58918027/electron-winstaller-throws-the-system-cannot-find-the-path-specified-at-squirre), but none of the proposed fixes worked. It works fine on my machine, using Windows 11. I also tried to run that on an ubuntu agent, with mono and wine installed, and I got an error related to the graphics driver. I really don't know what's that related to, I tried running my previous commit, which triggered the last successful run and it also failed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.