Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codesigning failure: 4294967295 #404

Open
DerKruser opened this issue Jan 5, 2022 · 3 comments
Open

Codesigning failure: 4294967295 #404

DerKruser opened this issue Jan 5, 2022 · 3 comments

Comments

@DerKruser
Copy link

Getting the below failure - if I rdp in to the box and manually rerun the signtool command, it works. Apologies in advance, but not really sure what the stack trace indicates.

06:31:21 2022-01-05T13:31:19.048Z electron-windows-installer:spawn Spawning D:\jenkins\workspace\WinDesktopSystm_master\node_modules\electron-winstaller\vendor\Squirrel.exe --releasify C:\Users\jenkins\AppData\Local\Temp\si-202205-3892-1yrwly2.bcp9f\SYSTM_staging.7.15.0-alpha0.nupkg --releaseDir D:\jenkins\workspace\WinDesktopSystm_master\release\win32-installer --loadingGif D:\jenkins\workspace\WinDesktopSystm_master\assets\loading.gif --signWithParams /a /f "D:\loc\cert\TheSufferfestWindowsCert.p12" /p "" --setupIcon D:\jenkins\workspace\WinDesktopSystm_master\assets\windows\app.ico --no-msi
06:31:35 Failed with exit code: 4294967295
06:31:35 Output:
06:31:35 System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to sign, command invoked was: 'D:\jenkins\workspace\WinDesktopSystm_master\node_modules\electron-winstaller\vendor\signtool.exe sign /a /f "D:\loc\cert\TheSufferfestWindowsCert.p12" /p "
" D:\jenkins\workspace\WinDesktopSystm_master\squirreltemp\tempa\lib\net45\ffmpeg.dll'
06:31:35 at Squirrel.Update.Program.d__17.MoveNext()
06:31:35 --- End of stack trace from previous location where exception was thrown ---
06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
06:31:35 at Squirrel.Update.Program.<>c__DisplayClass10_0.<b__14>d.MoveNext()
06:31:35 --- End of stack trace from previous location where exception was thrown ---
06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
06:31:35 at Squirrel.Utility.<>c__DisplayClass13_11.<<ForEachAsync>b__1>d.MoveNext() 06:31:35 --- End of inner exception stack trace --- 06:31:35 at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 06:31:35 at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 06:31:35 at Squirrel.Update.Program.<>c__DisplayClass10_0.<Releasify>b__7(String pkgPath) 06:31:35 at Squirrel.ReleasePackage.CreateReleasePackage(String outputFile, String packagesRootDir, Func2 releaseNotesProcessor, Action1 contentsPostProcessHook) 06:31:35 at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi, String frameworkVersion, Boolean generateDeltas) 06:31:35 at Squirrel.Update.Program.executeCommandLine(String[] args) 06:31:35 at Squirrel.Update.Program.main(String[] args) 06:31:35 at Squirrel.Update.Program.Main(String[] args) 06:31:35 ---> (Inner Exception #0) System.Exception: Failed to sign, command invoked was: 'D:\jenkins\workspace\WinDesktopSystm_master\node_modules\electron-winstaller\vendor\signtool.exe sign /a /f "D:\loc\cert\TheSufferfestWindowsCert.p12" /p "****" D:\jenkins\workspace\WinDesktopSystm_master\squirreltemp\tempa\lib\net45\ffmpeg.dll' 06:31:35 at Squirrel.Update.Program.<signPEFile>d__17.MoveNext() 06:31:35 --- End of stack trace from previous location where exception was thrown --- 06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 06:31:35 at Squirrel.Update.Program.<>c__DisplayClass10_0.<<Releasify>b__14>d.MoveNext() 06:31:35 --- End of stack trace from previous location where exception was thrown --- 06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 06:31:35 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 06:31:35 at Squirrel.Utility.<>c__DisplayClass13_11.<b__1>d.MoveNext()<---
06:31:35
06:31:35
06:31:36 error Command failed with exit code 1.
06:31:36 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@chbonser
Copy link

chbonser commented Oct 3, 2022

@DerKruser I received this same exit code 4294967295 but trying to sign a different file, app\node_modules\@serialport\bindings-cpp\prebuilds\android-arm\node.napi.armv7.node. See versions and full stack trace here serialport/node-serialport#2515

Did you learn anything in your investigation?

@anaisbetts
Copy link
Contributor

:000> .formats 0n4294967295 
Evaluate expression:
  Hex:     00000000`ffffffff
  Decimal: 4294967295
  Octal:   0000000000037777777777
  Binary:  00000000 00000000 00000000 00000000 11111111 11111111 11111111 11111111
  Chars:   ........
  Time:    ***** Invalid
  Float:   low -1.#QNAN high 0
  Double:  2.122e-314

This error code is just -1 misinterpreted as a UINT

@carloslenz
Copy link

carloslenz commented Jun 7, 2023

I have the same issue, and I think it's because it's trying to sign every included (native?) file, not just the main .exe.
I've tried adding an explicit exe config hoping electron-windows-installer would sign only this file but the error persists.
To me the solution seems to be an implementation of #358.

Following this tip I found out the issue I had (In Squirrel.Windows) was that the path to the certificate was invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants