Error message when running installer: "This application could not be started"
See original GitHub issueI’m building a Windows installer using windows-installer (unsigned at the moment but I plan to set up signing shortly). Everything works as expected including build, install, app initialization, and even auto updating. When I run the installer though I get the below error messages and I can’t figure out why. It’s a really straightforward app with no weird custom libraries or anything.
The Microsoft documentation which the Windows 10 error points me to is unhelpful. It seems to be something related to .NET and possibly 32/64 bit architecture but after a lot of google research I’m stumped (I haven’t done any Windows development in years so forgive me for noobery). The error seems fairly common but I couldn’t find anything in relation to squirrel or windows-installer and none of the suggests that I saw seemed particularly relevant.
Again, as far as I can tell the app actually works fine after this happens. The app launches after installation just as expected and I can run it again from the newly created shortcuts and it runs without issue. I just don’t want to ship it to customers with this error message.
Any ideas? I apologize if this is the wrong place to post this but it’s hard for me to tell exactly what isn’t working right.
Errors
I’m running the installer on two VMs, Win 7 and Win 10. I had to install .NET 4.5 on the Win 7 VM but otherwise both are clean installs from here. I’m assuming these errors are basically the same, or caused by the same thing, even though they appear slightly different in each OS.
Win 7:
Win 10:
SquirrelSetup.log:
2016-05-06 06:52:55> Program: Starting Squirrel Updater: --install .
2016-05-06 06:52:55> Program: Starting install, writing to C:\Users\IEUser\AppData\Local\SquirrelTemp
2016-05-06 06:52:55> Program: About to install to: C:\Users\IEUser\AppData\Local\citytrader
2016-05-06 06:52:55> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\IEUser\AppData\Local\citytrader\packages\.betaId'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
at Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2016-05-06 06:52:55> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\IEUser\AppData\Local\citytrader\packages\RELEASES'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__3f.MoveNext()
2016-05-06 06:52:55> CheckForUpdateImpl: Reading RELEASES file from C:\Users\IEUser\AppData\Local\SquirrelTemp
2016-05-06 06:52:55> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2016-05-06 06:52:55> ApplyReleasesImpl: Writing files to app directory: C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\content_resources_200_percent.pak to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\content_resources_200_percent.pak
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\content_shell.pak to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\content_shell.pak
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\d3dcompiler_47.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\d3dcompiler_47.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\ffmpeg.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\ffmpeg.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\Futures+.exe to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\Futures+.exe
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\icudtl.dat to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\icudtl.dat
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\libEGL.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\libEGL.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\libGLESv2.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\libGLESv2.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\LICENSE to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\LICENSE
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\msvcp120.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\msvcp120.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\msvcr120.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\msvcr120.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\natives_blob.bin to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\natives_blob.bin
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\node.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\node.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\snapshot_blob.bin to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\snapshot_blob.bin
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\squirrel.exe to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\squirrel.exe
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\ui_resources_200_percent.pak to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\ui_resources_200_percent.pak
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\vccorlib120.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\vccorlib120.dll
2016-05-06 06:52:58> ApplyReleasesImpl: Moving file C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\lib\net45\xinput1_3.dll to C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\xinput1_3.dll
2016-05-06 06:52:59> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\IEUser\AppData\Local\citytrader\app-0.0.1\Futures+.exe]
2016-05-06 06:53:02> ApplyReleasesImpl: Starting fixPinnedExecutables
2016-05-06 06:53:02> ApplyReleasesImpl: Examining Pin: File Explorer.lnk
2016-05-06 06:53:02> ApplyReleasesImpl: Fixing up tray icons
2016-05-06 06:53:02> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__ee(RegistryView view)
2016-05-06 06:53:02> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__ee(RegistryView view)
2016-05-06 06:53:02> ApplyReleasesImpl: cleanDeadVersions: for version 0.0.1
2016-05-06 06:53:02> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-0.0.1
Build info:
OS: OSX 10.11.3 node: v5.4.1 electron: 0.37.3 (also tested with 0.37.8) electron-packager: 6.0.2 electron-winstaller: 2.3.0 wine: wine-1.8 mono: Mono JIT compiler version 4.2.1 (Stable 4.2.1.102/6dd2d0d Wed Dec 2 14:02:18 PST 2015)
electron-winstaller config:
{
appDirectory: sourcePath,
outputDirectory: destPath,
authors: `${orgname}`,
exe: target,
noMsi: true,
description: `The desktop distribution of ${appname}`,
title: appname,
setupIcon: `assets/icons/${iconname}.ico`,
setupExe: `${appname}_setup.exe`,
loadingGif: `assets/gif7.gif`
}
The app and installer are currently both unsigned as I’m waiting on a cert from our director.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:17 (4 by maintainers)
Top GitHub Comments
@dknutsen I was seeing this same problem with electron-winstaller 2.3.1. It seems that your
setupIcon
gets embedded in the squirrel.exe update executable as well as your app exe. This buggers up squirrel.exe. You can stop this from happening with a secret electron-winstaller config option calledskipUpdateIcon
- just set it to true.@hoffmabc with the skipUpdateIcon option worked! tanks 😃