question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SignTool error: NSIS installer EXE is being used by another process

See original GitHub issue
  • Version: 9.1.0
  • Target: Windows/NSIS (32 and 64-bit)

SignTool successfully signs almost all of the binaries (both 32 and 64-bit unpacked, as well as the uninstaller) using the certificate specified by CSC_LINK and CSC_KEY_PASSWORD, but fails to sign the final installer EXE.

Not sure if the presence of two very similar copies of the SignTool error messages indicate that two concurrent calls were made, or if that’s just the error being re-displayed.

Error message/stack trace:

> @ prebuild D:\Mosaic\Chroma-prebuilt
> gulp build --env=development

[12:18:13] Using gulpfile D:\Mosaic\Chroma-prebuilt\gulpfile.js
[12:18:13] Starting 'bundle'...
[12:18:13] Finished 'bundle' after 117 μs
[12:18:13] Starting 'less'...
[12:18:13] Finished 'less' after 19 μs
[12:18:13] Starting 'environment'...
[12:18:13] Finished 'environment' after 11 ms
[12:18:13] Starting 'build'...
[12:18:13] Finished 'build' after 3.62 μs

> @ build D:\Mosaic\Chroma-prebuilt
> build --x64 --ia32 --publish never

Rebuilding native production dependencies for arch x64
Packaging for win32 x64 using electron 1.4.7 to dist\win-unpacked
Signing Chroma.exe (certificate file "<path_to_cert>")
Packaging NSIS installer for arch x64
Rebuilding native production dependencies for arch ia32
Packaging for win32 ia32 using electron 1.4.7 to dist\win-ia32-unpacked
Signing Chroma.exe (certificate file "<path_to_cert>")
Packaging NSIS installer for arch ia32
Building NSIS installer
Signing t-1b68-0-uninstaller.exe (certificate file "<path_to_cert>")
Signing Chroma Setup 1.2.1.exe (certificate file "<path_to_cert>")
Error: Exit code: 1. Command failed: C:\Users\Bobby\AppData\Local\electron-builder\cache\winCodeSign\winCodeSign-1.4.2\windows-10\signtool.exe sign /tr http://timestamp.comodoca.com/rfc3161 /f <cert_hash> (sha256 hash) /fd sha256 /td sha256 /d Chroma /du https://gitlab.com/mosaic-mfg/palette-standalone#readme /as /p <cert_pass> D:\Mosaic\Chroma-prebuilt\dist\Chroma Setup 1.2.1.exe
SignTool Error: The file is being used by another process.
SignTool Error: An error occurred while attempting to sign: D:\Mosaic\Chroma-prebuilt\dist\Chroma Setup 1.2.1.exe

Done Adding Additional Store

Number of errors: 1

SignTool Error: The file is being used by another process.
SignTool Error: An error occurred while attempting to sign: D:\Mosaic\Chroma-prebuilt\dist\Chroma Setup 1.2.1.exe

    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\util\util.ts:66:16
    at ChildProcess.exithandler (child_process.js:213:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
    at exec (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\util\util.ts:44:3)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\windowsCodeSign.ts:115:16
From previous event:
    at spawnSign (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\windowsCodeSign.js:94:22)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\windowsCodeSign.ts:48:11
From previous event:
    at sign (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\windowsCodeSign.js:42:21)
    at WinPackager.doSign (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\winPackager.ts:141:12)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\winPackager.ts:125:16
From previous event:
    at WinPackager.sign (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\winPackager.js:198:11)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\targets\nsis.ts:216:20
    at next (native)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)
From previous event:
    at NsisTarget.buildInstaller (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\targets\nsis.js:296:11)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\targets\nsis.ts:76:18
    at next (native)
From previous event:
    at NsisTarget.finishBuild (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\targets\nsis.js:151:11)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\packager.ts:136:31
From previous event:
    at Packager.doBuild (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\packager.js:256:11)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\packager.ts:100:38
    at next (native)
    at runCallback (timers.js:574:20)
    at tryOnImmediate (timers.js:554:5)
    at processImmediate [as _immediateCallback] (timers.js:533:5)
From previous event:
    at Packager.build (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\packager.js:208:11)
    at D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\src\builder.ts:240:40
    at next (native)
From previous event:
    at build (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\builder.js:89:21)
    at Object.<anonymous> (D:\Mosaic\Chroma-prebuilt\node_modules\electron-builder\out\build-cli.js:62:41)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! @ build: `build --x64 --ia32 --publish never`
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the @ build script 'build --x64 --ia32 --publish never'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     build --x64 --ia32 --publish never
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Mosaic\Chroma-prebuilt\npm-debug.log

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
aesalazarcommented, Nov 23, 2016

I get this error quite a bit actually. Usually has to do with Window Defender. Disabling it usually takes care of it.

Ernie

6reactions
Frugalitycommented, Feb 9, 2017

I experienced this as well, and the problem was Windows Defender. Excluding my build folder from Windows Defender allowed the signing to succeed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signtool file in use error when creating exe in version 18.7
EXE (last step so the installer exe) it says the file is being used by another process. But it is not me. Full...
Read more >
How can I resolve Sign error 0x800700C1 when signing an ...
I was just looking into signing our installer/uninstaller and ... !system: ""C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" ...
Read more >
NSIS Error when I run .exe file! - Microsoft Community
When I open Bandicam Setup (bdcamsetup.exe), it pop up an error message! ... Physical media being used to install the program is damaged....
Read more >
Sign the exe file using NSIS script - Stack Overflow
The error message you get when running the .bat is from cmd.exe because it cannot find the file. You could try !finalize dir...
Read more >
How to Fix an NSIS Installer Error on Windows 11 - MakeUseOf
Moving the installer to a different folder can help you run the setup file without the NSIS error. To do this, open File...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found