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.

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

See original GitHub issue
  • 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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:26

github_iconTop GitHub Comments

6reactions
bimusiekcommented, Nov 7, 2019

@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

1reaction
lvbeckcommented, May 5, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

NSIS. Problem with using functions inside custom script
Simply add WriteUninstaller [Path]exename.exe into your uninstall section. ... used - no uninstaller will be , my code : nsis configuration
Read more >
uninstaller is not signed by electron-builder reason ... - 掘金
uninstaller is not signed by electron-builder reason=custom nsis script is used 技术、学习、经验文章掘金开发者社区搜索结果。掘金是一个帮助开发者成长的社区 ...
Read more >
NSIS - electron-builder
script allows you to provide completely different NSIS script. For most cases it is not required as you need only to customise some...
Read more >
Customize Nsis Installer With Electron-Builder - ADocLib
Con gure your app to use electronbuilder : Create a directory build in the ... log.info{ reason: custom NSIS script is used }...
Read more >
Chapter 4: Scripting Reference
For backwards compatibility with old NSIS scripts, the following installer pages will be added if no installer page commands are used: license (if ......
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