windows-installer icon indicating copy to clipboard operation
windows-installer copied to clipboard

Error: Failed with exit code: 4294967295

Open wujiazhong opened this issue 8 years ago • 14 comments

First I used electron-packager exporting a folder. Then I used electron-winstaller to build this folder to a executable.

build.js: const electronInstaller = require('electron-winstaller');

var settings = { appDirectory: './app', outputDirectory: './output', exe: 'app.exe', setupExe: 'app.exe', noMsi: true, authors: 'wujz' };

resultPromise = electronInstaller.createWindowsInstaller(settings);

resultPromise.then(() => { console.log("Created"); }, (e) => { console.log(e); });

Then I got below error: Error: Failed with exit code: 4294967295 Output: Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) Couldn't open log file, trying new file: System.MethodAccessException: Attempt by method 'Squirrel.Update.SetupLogLogger..ctor(Boolean)' to access method 'System.IO.StreamWriter..ctor(System.IO.Stream, System.Text.Encoding, Int32, Boolean)' failed. at Squirrel.Update.SetupLogLogger..ctor(Boolean saveInTemp) 2017-04-03 04:30:34> Program: Starting Squirrel Updater: --releasify C:\Users\statbldr\AppData\Local\Temp\si-11733-4260-1xt81w6.plmed0a4i\statsinstaller.1.0.0.nupkg --releaseDir C:\Workroom\views\StatsDownloadAndGo\output --loadingGif C:\Workroom\views\StatsDownloadAndGo\node_modules\electron-winstaller\resources\install-spinner.gif --no-msi 2017-04-03 04:30:34> Program: Bootstrapper EXE found at:C:\Workroom\views\StatsDownloadAndGo\node_modules\electron-winstaller\vendor\Setup.exe 2017-04-03 04:30:45> Program: Creating release package: C:\Workroom\views\StatsDownloadAndGo\output\statsinstaller.1.0.0.nupkg 2017-04-03 04:30:46> Unhandled exception: System.MissingMethodException: Method not found: 'Int32 System.Environment.get_CurrentManagedThreadId()'. at NuGet.ManifestMetadata.<Validate>d__108..ctor(Int32 <>1__state) at NuGet.ManifestMetadata.Validate(ValidationContext validationContext) at System.ComponentModel.DataAnnotations.Validator.GetObjectValidationErrors(Object instance, ValidationContext validationContext, Boolean validateAllProperties, Boolean breakOnFirstError) at System.ComponentModel.DataAnnotations.Validator.TryValidateObject(Object instance, ValidationContext validationContext, ICollection1 validationResults, Boolean validateAllProperties) at NuGet.Manifest.TryValidate(Object value, ICollection1 results) at NuGet.Manifest.Validate(Manifest manifest) at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema) at NuGet.LocalPackage.ReadManifest(Stream manifestStream) at NuGet.ZipPackage.EnsureManifest() at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching) at Squirrel.ReleasePackage.get_SuggestedReleaseFileName() at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi) at Squirrel.Update.Program.executeCommandLine(String[] args) at Squirrel.Update.Program.main(String[] args) System.MissingMethodException: Method not found: 'Int32 System.Environment.get_CurrentManagedThreadId()'. at NuGet.ManifestMetadata.<Validate>d__108..ctor(Int32 <>1__state) at NuGet.ManifestMetadata.Validate(ValidationContext validationContext) at System.ComponentModel.DataAnnotations.Validator.GetObjectValidationErrors(Object instance, ValidationContext validationContext, Boolean validateAllProperties, Boolean breakOnFirstError) at System.ComponentModel.DataAnnotations.Validator.TryValidateObject(Object instance, ValidationContext validationContext, ICollection1 validationResults, Boolean validateAllProperties) at NuGet.Manifest.TryValidate(Object value, ICollection1 results) at NuGet.Manifest.Validate(Manifest manifest) at NuGet.Manifest.ReadFrom(Stream stream, IPropertyProvider propertyProvider, Boolean validateSchema) at NuGet.LocalPackage.ReadManifest(Stream manifestStream) at NuGet.ZipPackage.EnsureManifest() at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching) at Squirrel.ReleasePackage.get_SuggestedReleaseFileName() at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi) at Squirrel.Update.Program.executeCommandLine(String[] args) at Squirrel.Update.Program.main(String[] args) at Squirrel.Update.Program.Main(String[] args)

at ChildProcess.proc.on.code (C:\Workroom\views\StatsDownloadAndGo\node_modules\electron-winstaller\lib\spawn-promise.js:62:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

I used Windows Server 2008. Could anyone help to see this issue? Thanks.

wujiazhong avatar Apr 04 '17 06:04 wujiazhong

I got the same error, and this (already closed) issue helped me: https://github.com/electron/windows-installer/issues/124

paulinodjm avatar May 03 '17 14:05 paulinodjm

+1 same problem

bopeng87 avatar Sep 05 '17 16:09 bopeng87

Same here too

Caumaker avatar Nov 20 '17 02:11 Caumaker

same problem

MishaMikus avatar Jan 22 '18 13:01 MishaMikus

me too

ranmufei avatar Feb 06 '18 09:02 ranmufei

same problem

darshan-jain-29 avatar Oct 29 '18 09:10 darshan-jain-29

Hi, I did have the same problem. My solution is I added 'name' in settings. If you are using '-' or " " in the application name. You can get that error.

burakkp avatar Nov 19 '18 10:11 burakkp

I got the same issue, and the error still occurred even after I removed the '-' in name :(

WuShaoa avatar Nov 10 '21 14:11 WuShaoa

Hello, I have solved this problem. The reason is that the absolute path of the project appears in Chinese. I hope you can solve this problem too

ZhongDdengKe avatar Nov 24 '21 07:11 ZhongDdengKe

I think this is related too. When i try to update Office including the Chinese language pack i get the same error:

Found Microsoft 365 Apps for enterprise [Microsoft.Office] Version 16.0.14931.20132 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Successfully verified installer hash Starting package install... Installer failed with exit code: 4294967295

niStee avatar Mar 28 '22 15:03 niStee

Same issue for me. The name in my package.json contains no special characters

vdawg-git avatar Apr 11 '22 21:04 vdawg-git

It just worked when I added config.forge to package.json and added "win32"

image

Mikaelisson avatar May 02 '23 01:05 Mikaelisson

I encountered the same error, what helped me was deleting the project and reinstalling it from git

vanichh avatar Jan 26 '24 10:01 vanichh

In my case, the default makers had to be commented out

image

Jsan2020 avatar Feb 15 '24 22:02 Jsan2020