electron-builder: uninstaller is not signed by electron-builder reason=custom NSIS script is used

  • Version: 22.1.0
  • Target: NSIS

Hi. I have such config:

"build": {
    "appId": "com.electron.browsec",
    "asar": false,
    "productName": "Browsec",
    "directories": {
      "app": "appCopy"
    },
    "win": {
      "artifactName": "${productName}-setup-${version}-${arch}.${ext}",
      "publish": {
        "provider": "generic",
        "url": ""
      },
      "target": {
        "target": "nsis",
        "arch": [
          "x64",
          "ia32"
        ]
      },
      "signAndEditExecutable": false
    },
    "nsis": {
      "script": "build/installer.nsi",
      "warningsAsErrors": false
    }
  },

And just copy of default NSIS template of electron-builder.

I am getting error:

• uninstaller is not signed by electron-builder  reason=custom NSIS script is used
Error: C:\Users\Mester\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4\Bin\makensis.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Output:

Output:
Command line defined: "APP_ID=com.electron.browsec"
Command line defined: "APP_GUID=1ab9e481-6fb5-55ed-96ec-40263fc4aae5"
Command line defined: "UNINSTALL_APP_KEY=1ab9e481-6fb5-55ed-96ec-40263fc4aae5"
Command line defined: "PRODUCT_NAME=Browsec"
Command line defined: "PRODUCT_FILENAME=Browsec"
Command line defined: "APP_FILENAME=browsec_desktop"
Command line defined: "APP_DESCRIPTION=Browsec for desktop"
Command line defined: "VERSION=0.9.2"
Command line defined: "PROJECT_DIR=C:\Projects\Browsec\Electron\Code"
Command line defined: "BUILD_RESOURCES_DIR=C:\Projects\Browsec\Electron\Code\build"
Command line defined: "APP_PACKAGE_NAME=browsec_desktop"
Command line defined: "APP_32=C:\Projects\Browsec\Electron\Code\dist\browsec_desktop-0.9.2-ia32.nsis.7z"
Command line defined: "APP_32_NAME=browsec_desktop-0.9.2-ia32.nsis.7z"
Command line defined: "APP_32_HASH=4371ED69B64955690D451A9F26C4CEF84ED97A6C839ECAAF3DCDF3F5D53AACDE5EFFB164149AFA0593E7C36BE34B6FD8C0DC662DDEAE18AC974168199EE04AFD"
Command line defined: "APP_64=C:\Projects\Browsec\Electron\Code\dist\browsec_desktop-0.9.2-x64.nsis.7z"
Command line defined: "APP_64_NAME=browsec_desktop-0.9.2-x64.nsis.7z"
Command line defined: "APP_64_HASH=550DED5E30A777ABEEA66590B1583B8958FB4EC094D950A14EF8E5D61C495E49414C2B47F5C4B1EA694B5B7DD9DA54AF3CE1D9DEC856C56BFDDBE00428B4D390"
Command line defined: "COMPANY_NAME=Browsec"
Command line defined: "APP_PRODUCT_FILENAME=Browsec"
Command line defined: "APP_INSTALLER_STORE_FILE=browsec_desktop-updater\installer.exe"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "ONE_CLICK"
Command line defined: "RUN_AFTER_FINISH"
Command line defined: "SHORTCUT_NAME=Browsec"
Command line defined: "UNINSTALL_DISPLAY_NAME=Browsec 0.9.2"
Command line defined: "ESTIMATED_SIZE=333022"
Command line defined: "COMPRESS=auto"
Processing config: C:\Users\Mester\AppData\Local\electron-builder\Cache\nsis\nsis-3.0.4\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Error output:

Error output:
File: "${UNINSTALLER_OUT_FILE}" -> no files found.

I can not understand where to get this uninstall.exe (<= main question) and how to sign it?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26

Most upvoted comments

@MatthiasD0 I was able to fix it by… installing all updates to Windows in Parallels. Then it happened that NSIS installer is broken on newest electron-builder so you have to use 21.2.0

today I updated electron-builder to latest version 22.6.0, but another error occurred:

\node_modules\electron-builder\node_modules\fs-extra\lib\mkdirs\make-dir.js:86
      } catch {
              ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (\node_modules\electron-builder\node_modules\fs-extra\lib\mkdirs\index.js:3:44)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! esther@6.0.0 build: `node .electron-vue/build.js && electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the esther@6.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     \AppData\Roaming\npm-cache\_logs\2020-05-05T10_16_33_677Z-debug.log