Electron-builder: Squirrel.Windows not creating temporary directories when extracting nupkg files

Created on 6 Nov 2017  路  16Comments  路  Source: electron-userland/electron-builder


  • Version: 19.45.1

  • Target: squirrel

I am getting the following error when using Squirrel.Windows to extract existing nupkg files to the SQUIRREL_TEMP directory.

Utility: Failed to extract file E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32\EMRConnect-1.5.0-full.nupkg to E:\SquirrelTemp\tempa The system cannot find the file specified

Why doesn't the tempa folder get created by Squirrel.Windows automatically? Even if I manually add the folder it complains about folder tempb not existing.

I have SQUIRREL_TEMP set to E:\SquirrelTemp with configuration:
"win": { "target": [ { "target": "squirrel", "arch": "ia32" } ], "icon": "build/assets/img/main.ico" }, "squirrelWindows": { "iconUrl": "<url>", "loadingGif": "build/assets/img/install-spinner.gif", "remoteReleases": "<url>" }

Full stacktrace:
07-Nov-2017 10:56:07 | 2017-11-06T21:56:07.622Z electron-builder Executing C:\Users\build\AppData\Local\Temp\electron-builder-cache\Squirrel.Windows\Squirrel.Windows-1.7.8\WriteZipToSetup.exe --copy-stub-resources E:\a1\EMRC-ELECTRON99-BW\dist\win-ia32-unpacked\EMR Connect.exe C:\Users\build\AppData\Local\Temp\temp-files-hLra1Q\1-stub.exe -- | -- 07-Nov-2017 10:57:04 | 2017-11-06T21:57:04.895Z electron-builder Executing C:\Users\build\AppData\Local\Temp\electron-builder-cache\Squirrel.Windows\Squirrel.Windows-1.7.8\Update.com --releasify E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32\emrc-desktop-app-1.5.1-full.nupkg --releaseDir E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32 07-Nov-2017 10:57:05 | 2017-11-06T21:57:05.519Z electron-builder Async task error: Error: Exit code: 4294967295. Command failed: C:\Users\build\AppData\Local\Temp\electron-builder-cache\Squirrel.Windows\Squirrel.Windows-1.7.8\Update.com --releasify E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32\emrc-desktop-app-1.5.1-full.nupkg --releaseDir E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32 07-Nov-2017 10:57:05 | 2017-11-07 10:57:05> Utility: Failed to extract file E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32\EMRConnect-1.5.0-full.nupkg to E:\SquirrelTemp\tempa 07-Nov-2017 10:57:05 | The system cannot find the file specified 07-Nov-2017 10:57:05 | 2017-11-07 10:57:05> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified 07-Nov-2017 10:57:05 | at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 07-Nov-2017 10:57:05 | at System.Diagnostics.Process.Start() 07-Nov-2017 10:57:05 | at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) 07-Nov-2017 10:57:05 | at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext() 07-Nov-2017 10:57:05 | --- End of stack trace from previous location where exception was thrown --- 07-Nov-2017 10:57:05 | at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07-Nov-2017 10:57:05 | at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07-Nov-2017 10:57:05 | at Squirrel.Utility.<ExtractZipToDirectory>d__22.MoveNext() 07-Nov-2017 10:57:05 | --- End of inner exception stack trace --- 07-Nov-2017 10:57:05 | at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 07-Nov-2017 10:57:05 | at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 07-Nov-2017 10:57:05 | at Squirrel.DeltaPackageBuilder.CreateDeltaPackage(ReleasePackage basePackage, ReleasePackage newPackage, String outputFile) 07-Nov-2017 10:57:05 | at Squirrel.Update.Program.ReleasifyElectron(String package, String targetDir, String baseUrl) 07-Nov-2017 10:57:05 | at Squirrel.Update.Program.executeCommandLine(String[] args) 07-Nov-2017 10:57:05 | at Squirrel.Update.Program.main(String[] args) 07-Nov-2017 10:57:05 | ---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified 07-Nov-2017 10:57:05 | at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 07-Nov-2017 10:57:05 | at System.Diagnostics.Process.Start() 07-Nov-2017 10:57:05 | at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) 07-Nov-2017 10:57:05 | at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext() 07-Nov-2017 10:57:05 | --- End of stack trace from previous location where exception was thrown --- 07-Nov-2017 10:57:05 | at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 07-Nov-2017 10:57:05 | at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 07-Nov-2017 10:57:05 | at Squirrel.Utility.<ExtractZipToDirectory>d__22.MoveNext()<---

Squirrel.Windows backlog investigate

Most helpful comment

I am getting the same error. Here is the full debug log:
https://gist.github.com/wmnnd/645392242b64ef635006614971c1ec81

I was also unable to manually call Update.com --releasify with any success:.
Update.com --releasify simply creates a new RELEASES file but now delta package even if the previous -full package and RELEASES file are available.

This is happening with electron-builder 19.45.7 and Squirrel.Windows 1.7.8.

Edit:

I have downgraded electron-builder-squirrel-windows to 19.42.0 and now delta images are created correctly. This seems to be a regression in newer versions.

All 16 comments

Better to use reliable NSIS.

Need to investigate.

Unfortunately I can't use NSIS due to this being an existing project in production using Squirrel.
If you could investigate that would be awesome!

So, you start generated installer and get this error?

electron-builder-squirrel-windows version?

The error occurs when trying to create a delta nupkg from unpacking the existing nupkg files from previous releases. The process does not get as far as creating the installer.

I believe the version is 1.7.8 as mentioned in the stack trace?

electron-builder Async task error: Error: Exit code: 4294967295. Command failed: C:\Users\build\AppData\Local\Temp\electron-builder-cache\Squirrel.Windows\Squirrel.Windows-1.7.8\Update.com --releasify E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32\emrc-desktop-app-1.5.1-full.nupkg --releaseDir E:\a1\EMRC-ELECTRON99-BW\dist\squirrel-windows-ia32

FYI, the project currently uses electron-packager and electron-winstaller to create a Squirrel-based win32 exe. I'm trying to migrate to using electron-builder instead

I've been using electron-builder, and got a similar error.

I am getting the same error. Here is the full debug log:
https://gist.github.com/wmnnd/645392242b64ef635006614971c1ec81

I was also unable to manually call Update.com --releasify with any success:.
Update.com --releasify simply creates a new RELEASES file but now delta package even if the previous -full package and RELEASES file are available.

This is happening with electron-builder 19.45.7 and Squirrel.Windows 1.7.8.

Edit:

I have downgraded electron-builder-squirrel-windows to 19.42.0 and now delta images are created correctly. This seems to be a regression in newer versions.

same here
after version electron-builder-squirrel-windows version 19.42 npm run build doesn't work

in newest version 19.46.5
builder download 1.7.8 version of squirrel.windows

when i go back to 19.42.0, it downloads 1.6.0.0
Downloading Squirrel.Windows-1.6.0.0, please wait

new version also creates dist/squirrel-windows folder, before it always used dist/win

same issue with electron-builder 19.48.2.
I downgraded electron-builder-squirrel-windows to 19.42.0.
Then all success.

I have same issue on 19.49.0:

electron-builder Async task error: Error: Exit code: 4294967295.
Utility: Failed to extract file C:\tmp\workspace\packaging\dist\production\squirrel-windows\test.nupkg to C:\Users\JenkinsWin\AppData\Local\SquirrelTemp\tempa
The system cannot find the file specified

It seems there is no target location to save nupkg file "C:\Users\JenkinsWin\AppData\Local\SquirrelTemp\tempa"

Same issue on 19.55.0:

Utility: Failed to extract file F:\Users\username\Documents\Projects\testapp\dist\squirrel-windows\testapp-1.0.0-full.nupkg to C:\Users\username\AppData\Local\SquirrelTemp\tempa

Downgrade electron-builder-squirrel-windows to 19.42.0 to temporarily fix the issue.

Same issue is on electron-builder-squirrel-windows: 20.8.0. What I could found out is that this problem was introduced with version 19.43.0 when update of Squirrel.Windows to 1.7.8 happened.

Is this ever likely to be fixed? I still can't upgrade past 19.42.0 and now, with Electron 4 in beta I am completely unable to build that as it throws errors against 19.42.0 as well.

It seems that this is fixed for me now since I do not see this issue with using electron-builder-squirrel-windows: 20.38.3. Not sure when this was fixed but all files are generated now. Could be maybe that it is fixed with latest version of Squirrel.Windows.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philcockfield picture philcockfield  路  3Comments

iklemm picture iklemm  路  3Comments

xingoxu picture xingoxu  路  3Comments

StickNitro picture StickNitro  路  3Comments

omarkilani picture omarkilani  路  3Comments