Electron-builder: Windows 10 build Error (NSIS)

Created on 22 Jul 2017  Β·  27Comments  Β·  Source: electron-userland/electron-builder

  • Version: 19.8.0

  • Target: Windows

Hi;

When I run npm run dev my app works fine. When I try to build app with npm run package I get an error while NSIS packaging stage.

Building NSIS installer
  Packaging NSIS installer for arch x64
Error: C:\Users\Benny\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\Bin\makensis.exe exited with code 1
Output:
Command line defined: "APP_ID=org.develar.ElectronReact"
Command line defined: "APP_GUID=6bbac5fa-04bd-5b9b-b752-acf42e3ab443"
Command line defined: "PRODUCT_NAME=ElectronReact"
Command line defined: "PRODUCT_FILENAME=ElectronReact"
Command line defined: "APP_FILENAME=electron-react-boilerplate"
Command line defined: "APP_DESCRIPTION=Electron application boilerplate based on React, React Router, Webpack, React Hot Loader for rapid application development"
Command line defined: "VERSION=1.0.0"
Command line defined: "PROJECT_DIR=C:\Apps\order-siparis"
Command line defined: "BUILD_RESOURCES_DIR=C:\Apps\order-siparis\resources"
Command line defined: "COMPANY_NAME=C. T. Lin"
Command line defined: "APP_PRODUCT_FILENAME=ElectronReact"
Command line defined: "APP_64=C:\Apps\order-siparis\release\electron-react-boilerplate-1.0.0-x64.nsis.7z"
Command line defined: "APP_64_NAME=electron-react-boilerplate-1.0.0-x64.nsis.7z"
Command line defined: "COMPRESSION_METHOD=7z"
Command line defined: "REQUEST_EXECUTION_LEVEL=user"
Command line defined: "COMPRESS=auto"
Processing config: C:\Users\Benny\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13\nsisconf.nsh
Processing script file: "<stdin>" (ACP)

Error output:
Plugin not found, cannot call Nsis7z::Extract
Error in macro doExtractEmbeddedAppPackage on macroline 4
Error in macro extractEmbeddedAppPackage on macroline 18
Error in script "<stdin>" on line 21 -- aborting creation process

NSIS script:
!addincludedir "C:\Apps\order-siparis\node_modules\electron-builder\templates\nsis\include"
!addplugindir /x86-unicode "C:\Users\Benny\AppData\Local\electron-builder\cache\nsis-resources\nsis-resources-3.0.0\plugins\x86-unicode"
!addplugindir /x86-unicode "C:\Apps\order-siparis\resources\x86-unicode"
!include "C:\Users\Benny\AppData\Local\Temp\electron-builder-TpJGD7\0-1-messages.nsh"
!include "common.nsh"

WindowIcon Off
AutoCloseWindow True
RequestExecutionLevel ${REQUEST_EXECUTION_LEVEL}

SilentInstall silent

Function .onInit
  !insertmacro check64BitAndSetRegView
FunctionEnd

Section
  StrCpy $INSTDIR $PLUGINSDIR\app
        SetOutPath $INSTDIR

        !insertmacro extractEmbeddedAppPackage

  System::Call 'Kernel32::SetEnvironmentVariable(t, t)i ("PORTABLE_EXECUTABLE_DIR", "$EXEDIR").r0'
        ExecWait "$INSTDIR\${APP_EXECUTABLE_FILENAME}"

  SetOutPath $PLUGINSDIR
        RMDir /r $INSTDIR
SectionEnd

Can someone direct me to the right way please. I'm pretty lost for now.

OS: Windows 10
node: v8.1.2
npm: 5.1.0
bug nsis windows

Most helpful comment

FYI: Deleting C:\Users\pamtbaau\AppData\Local\electron-builder\cache directory solved the issue for me.

Using: "electron-builder": "^19.49.2",

All 27 comments

  1. Please use electron-builder 19.16.1
  2. Please remove C:\Users\Benny\AppData\Local\electron-builder\cache directory (to invalidate caches).

Thanks for quick reply.
I upgraded electron-builder and removed the cache folder but I'm still getting the same error.

Is your windows 64bit?

Yes it is

Well... something broken on your machine. Could you please try to reboot (sorry)? And provide result of command tree in the dir C:\Users\Benny\AppData\Local\electron-builder\cache\nsis

Is windows 10 updated to latest version and not updates to install?

I checked the updates for the Win 10. There was only one .NET Framework update. I did the update and deleted the cache folder again. Did a reboot and then tried to run command npm run package-win
Still getting the error.
Here is the tree command result

Folder PATH listing
Volume serial number is 0000002C 6097:E780
C:.
└───nsis-3.0.1.13
    β”œβ”€β”€β”€Bin
    β”œβ”€β”€β”€Contrib
    β”‚   β”œβ”€β”€β”€Graphics
    β”‚   β”‚   β”œβ”€β”€β”€Checks
    β”‚   β”‚   β”œβ”€β”€β”€Header
    β”‚   β”‚   β”œβ”€β”€β”€Icons
    β”‚   β”‚   └───Wizard
    β”‚   β”œβ”€β”€β”€Language files
    β”‚   β”œβ”€β”€β”€Modern UI
    β”‚   β”œβ”€β”€β”€Modern UI 2
    β”‚   β”‚   └───Pages
    β”‚   β”œβ”€β”€β”€UIs
    β”‚   └───zip2exe
    β”œβ”€β”€β”€Include
    β”‚   └───Win
    β”œβ”€β”€β”€linux
    β”œβ”€β”€β”€mac
    β”œβ”€β”€β”€Menu
    β”‚   └───images
    β”œβ”€β”€β”€Plugins
    β”‚   β”œβ”€β”€β”€x86-ansi
    β”‚   └───x86-unicode
    └───Stubs

Feel free to contact me directly using slack.

Please check that there is dir nsis-resources in the C:\Users\Benny\AppData\Local\electron-builder\cache. Please execute tree /F in the cache dir.

yes there is a nsis-resources dir.
result of the command

Folder PATH listing
Volume serial number is 000000E2 6097:E780
C:.
β”œβ”€β”€β”€nsis
β”‚   └───nsis-3.0.1.13
β”‚       β”‚   .DS_Store
β”‚       β”‚   COPYING
β”‚       β”‚   elevate.exe
β”‚       β”‚   makensis.exe
β”‚       β”‚   NSIS.exe
β”‚       β”‚   nsisconf.nsh
β”‚       β”‚   version.txt
β”‚       β”‚
β”‚       β”œβ”€β”€β”€Bin
β”‚       β”‚       makensis.exe
β”‚       β”‚       zlib1.dll
β”‚       β”‚
β”‚       β”œβ”€β”€β”€Contrib
β”‚       β”‚   β”‚   .DS_Store
β”‚       β”‚   β”‚
β”‚       β”‚   β”œβ”€β”€β”€Graphics
β”‚       β”‚   β”‚   β”œβ”€β”€β”€Checks
β”‚       β”‚   β”‚   β”‚       big.bmp
β”‚       β”‚   β”‚   β”‚       classic-cross.bmp
β”‚       β”‚   β”‚   β”‚       classic.bmp
β”‚       β”‚   β”‚   β”‚       colorful.bmp
β”‚       β”‚   β”‚   β”‚       grey-cross.bmp
β”‚       β”‚   β”‚   β”‚       grey.bmp
β”‚       β”‚   β”‚   β”‚       modern.bmp
β”‚       β”‚   β”‚   β”‚       red-round.bmp
β”‚       β”‚   β”‚   β”‚       red.bmp
β”‚       β”‚   β”‚   β”‚       simple-round.bmp
β”‚       β”‚   β”‚   β”‚       simple-round2.bmp
β”‚       β”‚   β”‚   β”‚       simple.bmp
β”‚       β”‚   β”‚   β”‚
β”‚       β”‚   β”‚   β”œβ”€β”€β”€Header
β”‚       β”‚   β”‚   β”‚       nsis-r.bmp
β”‚       β”‚   β”‚   β”‚       nsis.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-branding-r.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-branding.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-grey-right.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-grey.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-metro-right.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-metro.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-vintage-right.bmp
β”‚       β”‚   β”‚   β”‚       nsis3-vintage.bmp
β”‚       β”‚   β”‚   β”‚       orange-nsis.bmp
β”‚       β”‚   β”‚   β”‚       orange-r-nsis.bmp
β”‚       β”‚   β”‚   β”‚       orange-r.bmp
β”‚       β”‚   β”‚   β”‚       orange-uninstall-nsis.bmp
β”‚       β”‚   β”‚   β”‚       orange-uninstall-r-nsis.bmp
β”‚       β”‚   β”‚   β”‚       orange-uninstall-r.bmp
β”‚       β”‚   β”‚   β”‚       orange-uninstall.bmp
β”‚       β”‚   β”‚   β”‚       orange.bmp
β”‚       β”‚   β”‚   β”‚       win.bmp
β”‚       β”‚   β”‚   β”‚
β”‚       β”‚   β”‚   β”œβ”€β”€β”€Icons
β”‚       β”‚   β”‚   β”‚       arrow-install.ico
β”‚       β”‚   β”‚   β”‚       arrow-uninstall.ico
β”‚       β”‚   β”‚   β”‚       arrow2-install.ico
β”‚       β”‚   β”‚   β”‚       arrow2-uninstall.ico
β”‚       β”‚   β”‚   β”‚       box-install.ico
β”‚       β”‚   β”‚   β”‚       box-uninstall.ico
β”‚       β”‚   β”‚   β”‚       classic-install.ico
β”‚       β”‚   β”‚   β”‚       classic-uninstall.ico
β”‚       β”‚   β”‚   β”‚       llama-blue.ico
β”‚       β”‚   β”‚   β”‚       llama-grey.ico
β”‚       β”‚   β”‚   β”‚       modern-install-blue-full.ico
β”‚       β”‚   β”‚   β”‚       modern-install-blue.ico
β”‚       β”‚   β”‚   β”‚       modern-install-colorful.ico
β”‚       β”‚   β”‚   β”‚       modern-install-full.ico
β”‚       β”‚   β”‚   β”‚       modern-install.ico
β”‚       β”‚   β”‚   β”‚       modern-uninstall-blue-full.ico
β”‚       β”‚   β”‚   β”‚       modern-uninstall-blue.ico
β”‚       β”‚   β”‚   β”‚       modern-uninstall-colorful.ico
β”‚       β”‚   β”‚   β”‚       modern-uninstall-full.ico
β”‚       β”‚   β”‚   β”‚       modern-uninstall.ico
β”‚       β”‚   β”‚   β”‚       nsis1-install.ico
β”‚       β”‚   β”‚   β”‚       nsis1-uninstall.ico
β”‚       β”‚   β”‚   β”‚       nsis3-install-alt.ico
β”‚       β”‚   β”‚   β”‚       nsis3-install.ico
β”‚       β”‚   β”‚   β”‚       nsis3-uninstall.ico
β”‚       β”‚   β”‚   β”‚       orange-install-nsis.ico
β”‚       β”‚   β”‚   β”‚       orange-install.ico
β”‚       β”‚   β”‚   β”‚       orange-uninstall-nsis.ico
β”‚       β”‚   β”‚   β”‚       orange-uninstall.ico
β”‚       β”‚   β”‚   β”‚       pixel-install.ico
β”‚       β”‚   β”‚   β”‚       pixel-uninstall.ico
β”‚       β”‚   β”‚   β”‚       win-install.ico
β”‚       β”‚   β”‚   β”‚       win-uninstall.ico
β”‚       β”‚   β”‚   β”‚
β”‚       β”‚   β”‚   └───Wizard
β”‚       β”‚   β”‚           arrow.bmp
β”‚       β”‚   β”‚           llama.bmp
β”‚       β”‚   β”‚           nsis.bmp
β”‚       β”‚   β”‚           nsis3-branding.bmp
β”‚       β”‚   β”‚           nsis3-grey.bmp
β”‚       β”‚   β”‚           nsis3-metro.bmp
β”‚       β”‚   β”‚           nsis3-vintage.bmp
β”‚       β”‚   β”‚           nullsoft.bmp
β”‚       β”‚   β”‚           orange-nsis.bmp
β”‚       β”‚   β”‚           orange-uninstall-nsis.bmp
β”‚       β”‚   β”‚           orange-uninstall.bmp
β”‚       β”‚   β”‚           orange.bmp
β”‚       β”‚   β”‚           win.bmp
β”‚       β”‚   β”‚
β”‚       β”‚   β”œβ”€β”€β”€Language files
β”‚       β”‚   β”‚       Afrikaans.nlf
β”‚       β”‚   β”‚       Afrikaans.nsh
β”‚       β”‚   β”‚       Albanian.nlf
β”‚       β”‚   β”‚       Albanian.nsh
β”‚       β”‚   β”‚       Arabic.nlf
β”‚       β”‚   β”‚       Arabic.nsh
β”‚       β”‚   β”‚       Armenian.nlf
β”‚       β”‚   β”‚       Armenian.nsh
β”‚       β”‚   β”‚       Asturian.nlf
β”‚       β”‚   β”‚       Asturian.nsh
β”‚       β”‚   β”‚       Basque.nlf
β”‚       β”‚   β”‚       Basque.nsh
β”‚       β”‚   β”‚       Belarusian.nlf
β”‚       β”‚   β”‚       Belarusian.nsh
β”‚       β”‚   β”‚       Bosnian.nlf
β”‚       β”‚   β”‚       Bosnian.nsh
β”‚       β”‚   β”‚       Breton.nlf
β”‚       β”‚   β”‚       Breton.nsh
β”‚       β”‚   β”‚       Bulgarian.nlf
β”‚       β”‚   β”‚       Bulgarian.nsh
β”‚       β”‚   β”‚       Catalan.nlf
β”‚       β”‚   β”‚       Catalan.nsh
β”‚       β”‚   β”‚       Corsican.nlf
β”‚       β”‚   β”‚       Corsican.nsh
β”‚       β”‚   β”‚       Croatian.nlf
β”‚       β”‚   β”‚       Croatian.nsh
β”‚       β”‚   β”‚       Czech.nlf
β”‚       β”‚   β”‚       Czech.nsh
β”‚       β”‚   β”‚       Danish.nlf
β”‚       β”‚   β”‚       Danish.nsh
β”‚       β”‚   β”‚       Dutch.nlf
β”‚       β”‚   β”‚       Dutch.nsh
β”‚       β”‚   β”‚       English.nlf
β”‚       β”‚   β”‚       English.nsh
β”‚       β”‚   β”‚       Esperanto.nlf
β”‚       β”‚   β”‚       Esperanto.nsh
β”‚       β”‚   β”‚       Estonian.nlf
β”‚       β”‚   β”‚       Estonian.nsh
β”‚       β”‚   β”‚       Farsi.nlf
β”‚       β”‚   β”‚       Farsi.nsh
β”‚       β”‚   β”‚       Finnish.nlf
β”‚       β”‚   β”‚       Finnish.nsh
β”‚       β”‚   β”‚       French.nlf
β”‚       β”‚   β”‚       French.nsh
β”‚       β”‚   β”‚       Galician.nlf
β”‚       β”‚   β”‚       Galician.nsh
β”‚       β”‚   β”‚       Georgian.nlf
β”‚       β”‚   β”‚       Georgian.nsh
β”‚       β”‚   β”‚       German.nlf
β”‚       β”‚   β”‚       German.nsh
β”‚       β”‚   β”‚       Greek.nlf
β”‚       β”‚   β”‚       Greek.nsh
β”‚       β”‚   β”‚       Hebrew.nlf
β”‚       β”‚   β”‚       Hebrew.nsh
β”‚       β”‚   β”‚       Hungarian.nlf
β”‚       β”‚   β”‚       Hungarian.nsh
β”‚       β”‚   β”‚       Icelandic.nlf
β”‚       β”‚   β”‚       Icelandic.nsh
β”‚       β”‚   β”‚       Indonesian.nlf
β”‚       β”‚   β”‚       Indonesian.nsh
β”‚       β”‚   β”‚       Irish.nlf
β”‚       β”‚   β”‚       Irish.nsh
β”‚       β”‚   β”‚       Italian.nlf
β”‚       β”‚   β”‚       Italian.nsh
β”‚       β”‚   β”‚       Japanese.nlf
β”‚       β”‚   β”‚       Japanese.nsh
β”‚       β”‚   β”‚       Korean.nlf
β”‚       β”‚   β”‚       Korean.nsh
β”‚       β”‚   β”‚       Kurdish.nlf
β”‚       β”‚   β”‚       Kurdish.nsh
β”‚       β”‚   β”‚       Latvian.nlf
β”‚       β”‚   β”‚       Latvian.nsh
β”‚       β”‚   β”‚       Lithuanian.nlf
β”‚       β”‚   β”‚       Lithuanian.nsh
β”‚       β”‚   β”‚       Luxembourgish.nlf
β”‚       β”‚   β”‚       Luxembourgish.nsh
β”‚       β”‚   β”‚       Macedonian.nlf
β”‚       β”‚   β”‚       Macedonian.nsh
β”‚       β”‚   β”‚       Malay.nlf
β”‚       β”‚   β”‚       Malay.nsh
β”‚       β”‚   β”‚       Mongolian.nlf
β”‚       β”‚   β”‚       Mongolian.nsh
β”‚       β”‚   β”‚       Norwegian.nlf
β”‚       β”‚   β”‚       Norwegian.nsh
β”‚       β”‚   β”‚       NorwegianNynorsk.nlf
β”‚       β”‚   β”‚       NorwegianNynorsk.nsh
β”‚       β”‚   β”‚       Pashto.nlf
β”‚       β”‚   β”‚       Pashto.nsh
β”‚       β”‚   β”‚       Polish.nlf
β”‚       β”‚   β”‚       Polish.nsh
β”‚       β”‚   β”‚       Portuguese.nlf
β”‚       β”‚   β”‚       Portuguese.nsh
β”‚       β”‚   β”‚       PortugueseBR.nlf
β”‚       β”‚   β”‚       PortugueseBR.nsh
β”‚       β”‚   β”‚       Romanian.nlf
β”‚       β”‚   β”‚       Romanian.nsh
β”‚       β”‚   β”‚       Russian.nlf
β”‚       β”‚   β”‚       Russian.nsh
β”‚       β”‚   β”‚       ScotsGaelic.nlf
β”‚       β”‚   β”‚       ScotsGaelic.nsh
β”‚       β”‚   β”‚       Serbian.nlf
β”‚       β”‚   β”‚       Serbian.nsh
β”‚       β”‚   β”‚       SerbianLatin.nlf
β”‚       β”‚   β”‚       SerbianLatin.nsh
β”‚       β”‚   β”‚       SimpChinese.nlf
β”‚       β”‚   β”‚       SimpChinese.nsh
β”‚       β”‚   β”‚       Slovak.nlf
β”‚       β”‚   β”‚       Slovak.nsh
β”‚       β”‚   β”‚       Slovenian.nlf
β”‚       β”‚   β”‚       Slovenian.nsh
β”‚       β”‚   β”‚       Spanish.nlf
β”‚       β”‚   β”‚       Spanish.nsh
β”‚       β”‚   β”‚       SpanishInternational.nlf
β”‚       β”‚   β”‚       SpanishInternational.nsh
β”‚       β”‚   β”‚       Swedish.nlf
β”‚       β”‚   β”‚       Swedish.nsh
β”‚       β”‚   β”‚       Thai.nlf
β”‚       β”‚   β”‚       Thai.nsh
β”‚       β”‚   β”‚       TradChinese.nlf
β”‚       β”‚   β”‚       TradChinese.nsh
β”‚       β”‚   β”‚       Turkish.nlf
β”‚       β”‚   β”‚       Turkish.nsh
β”‚       β”‚   β”‚       Ukrainian.nlf
β”‚       β”‚   β”‚       Ukrainian.nsh
β”‚       β”‚   β”‚       Uzbek.nlf
β”‚       β”‚   β”‚       Uzbek.nsh
β”‚       β”‚   β”‚       Vietnamese.nlf
β”‚       β”‚   β”‚       Vietnamese.nsh
β”‚       β”‚   β”‚       Welsh.nlf
β”‚       β”‚   β”‚       Welsh.nsh
β”‚       β”‚   β”‚
β”‚       β”‚   β”œβ”€β”€β”€Modern UI
β”‚       β”‚   β”‚       ioSpecial.ini
β”‚       β”‚   β”‚       System.nsh
β”‚       β”‚   β”‚
β”‚       β”‚   β”œβ”€β”€β”€Modern UI 2
β”‚       β”‚   β”‚   β”‚   Deprecated.nsh
β”‚       β”‚   β”‚   β”‚   Interface.nsh
β”‚       β”‚   β”‚   β”‚   Localization.nsh
β”‚       β”‚   β”‚   β”‚   MUI2.nsh
β”‚       β”‚   β”‚   β”‚   Pages.nsh
β”‚       β”‚   β”‚   β”‚
β”‚       β”‚   β”‚   └───Pages
β”‚       β”‚   β”‚           Components.nsh
β”‚       β”‚   β”‚           Directory.nsh
β”‚       β”‚   β”‚           Finish.nsh
β”‚       β”‚   β”‚           InstallFiles.nsh
β”‚       β”‚   β”‚           License.nsh
β”‚       β”‚   β”‚           StartMenu.nsh
β”‚       β”‚   β”‚           UninstallConfirm.nsh
β”‚       β”‚   β”‚           Welcome.nsh
β”‚       β”‚   β”‚
β”‚       β”‚   β”œβ”€β”€β”€UIs
β”‚       β”‚   β”‚       default.exe
β”‚       β”‚   β”‚       modern.exe
β”‚       β”‚   β”‚       modern_headerbmp.exe
β”‚       β”‚   β”‚       modern_headerbmpr.exe
β”‚       β”‚   β”‚       modern_nodesc.exe
β”‚       β”‚   β”‚       modern_smalldesc.exe
β”‚       β”‚   β”‚       sdbarker_tiny.exe
β”‚       β”‚   β”‚
β”‚       β”‚   └───zip2exe
β”‚       β”‚           Base.nsh
β”‚       β”‚           Classic.nsh
β”‚       β”‚           Modern.nsh
β”‚       β”‚
β”‚       β”œβ”€β”€β”€Include
β”‚       β”‚   β”‚   Colors.nsh
β”‚       β”‚   β”‚   FileFunc.nsh
β”‚       β”‚   β”‚   InstallOptions.nsh
β”‚       β”‚   β”‚   LangFile.nsh
β”‚       β”‚   β”‚   Library.nsh
β”‚       β”‚   β”‚   LogicLib.nsh
β”‚       β”‚   β”‚   Memento.nsh
β”‚       β”‚   β”‚   MUI.nsh
β”‚       β”‚   β”‚   MUI2.nsh
β”‚       β”‚   β”‚   MultiUser.nsh
β”‚       β”‚   β”‚   nsDialogs.nsh
β”‚       β”‚   β”‚   Sections.nsh
β”‚       β”‚   β”‚   StrFunc.nsh
β”‚       β”‚   β”‚   TextFunc.nsh
β”‚       β”‚   β”‚   UpgradeDLL.nsh
β”‚       β”‚   β”‚   Util.nsh
β”‚       β”‚   β”‚   VB6RunTime.nsh
β”‚       β”‚   β”‚   VPatchLib.nsh
β”‚       β”‚   β”‚   WinCore.nsh
β”‚       β”‚   β”‚   WinMessages.nsh
β”‚       β”‚   β”‚   WinVer.nsh
β”‚       β”‚   β”‚   WordFunc.nsh
β”‚       β”‚   β”‚   x64.nsh
β”‚       β”‚   β”‚
β”‚       β”‚   └───Win
β”‚       β”‚           COM.nsh
β”‚       β”‚           Propkey.nsh
β”‚       β”‚           WinDef.nsh
β”‚       β”‚           WinError.nsh
β”‚       β”‚           WinNT.nsh
β”‚       β”‚           WinUser.nsh
β”‚       β”‚
β”‚       β”œβ”€β”€β”€linux
β”‚       β”‚       .DS_Store
β”‚       β”‚       makensis
β”‚       β”‚
β”‚       β”œβ”€β”€β”€mac
β”‚       β”‚       makensis
β”‚       β”‚
β”‚       β”œβ”€β”€β”€Menu
β”‚       β”‚   β”‚   index.html
β”‚       β”‚   β”‚   notinstalled.html
β”‚       β”‚   β”‚
β”‚       β”‚   └───images
β”‚       β”‚           header.gif
β”‚       β”‚           line.gif
β”‚       β”‚           site.gif
β”‚       β”‚
β”‚       β”œβ”€β”€β”€Plugins
β”‚       β”‚   β”‚   .DS_Store
β”‚       β”‚   β”‚
β”‚       β”‚   β”œβ”€β”€β”€x86-ansi
β”‚       β”‚   β”‚       AdvSplash.dll
β”‚       β”‚   β”‚       Banner.dll
β”‚       β”‚   β”‚       BgImage.dll
β”‚       β”‚   β”‚       Dialer.dll
β”‚       β”‚   β”‚       InstallOptions.dll
β”‚       β”‚   β”‚       LangDLL.dll
β”‚       β”‚   β”‚       Math.dll
β”‚       β”‚   β”‚       nsDialogs.dll
β”‚       β”‚   β”‚       nsExec.dll
β”‚       β”‚   β”‚       NSISdl.dll
β”‚       β”‚   β”‚       Splash.dll
β”‚       β”‚   β”‚       StartMenu.dll
β”‚       β”‚   β”‚       System.dll
β”‚       β”‚   β”‚       TypeLib.dll
β”‚       β”‚   β”‚       UserInfo.dll
β”‚       β”‚   β”‚       VPatch.dll
β”‚       β”‚   β”‚
β”‚       β”‚   └───x86-unicode
β”‚       β”‚           AdvSplash.dll
β”‚       β”‚           Banner.dll
β”‚       β”‚           BgImage.dll
β”‚       β”‚           Dialer.dll
β”‚       β”‚           InstallOptions.dll
β”‚       β”‚           LangDLL.dll
β”‚       β”‚           Math.dll
β”‚       β”‚           nsDialogs.dll
β”‚       β”‚           nsExec.dll
β”‚       β”‚           NSISdl.dll
β”‚       β”‚           Splash.dll
β”‚       β”‚           StartMenu.dll
β”‚       β”‚           System.dll
β”‚       β”‚           TypeLib.dll
β”‚       β”‚           UserInfo.dll
β”‚       β”‚           VPatch.dll
β”‚       β”‚
β”‚       └───Stubs
β”‚               bzip2-x86-ansi
β”‚               bzip2-x86-unicode
β”‚               bzip2_solid-x86-ansi
β”‚               bzip2_solid-x86-unicode
β”‚               lzma-x86-ansi
β”‚               lzma-x86-unicode
β”‚               lzma_solid-x86-ansi
β”‚               lzma_solid-x86-unicode
β”‚               uninst
β”‚               zlib-x86-ansi
β”‚               zlib-x86-unicode
β”‚               zlib_solid-x86-ansi
β”‚               zlib_solid-x86-unicode
β”‚
β”œβ”€β”€β”€nsis-resources
β”‚   └───nsis-resources-3.0.0
β”‚       β”‚   .DS_Store
β”‚       β”‚   version.txt
β”‚       β”‚
β”‚       └───plugins
β”‚           β”‚   .DS_Store
β”‚           β”‚
β”‚           β”œβ”€β”€β”€x86-ansi
β”‚           β”‚       INetC.dll
β”‚           β”‚       nsis7z.dll
β”‚           β”‚       nsisunz.dll
β”‚           β”‚       nsProcess.dll
β”‚           β”‚       SpiderBanner.dll
β”‚           β”‚       StdUtils.dll
β”‚           β”‚       UAC.dll
β”‚           β”‚       WinShell.dll
β”‚           β”‚
β”‚           └───x86-unicode
β”‚                   INetC.dll
β”‚                   nsis7z.dll
β”‚                   nsisunz.dll
β”‚                   nsProcess.dll
β”‚                   SpiderBanner.dll
β”‚                   StdUtils.dll
β”‚                   UAC.dll
β”‚                   WinShell.dll
β”‚
└───winCodeSign
    └───winCodeSign-1.9.0
        β”‚   .DS_Store
        β”‚   rcedit.exe
        β”‚   version.txt
        β”‚
        β”œβ”€β”€β”€appxAssets
        β”‚       SampleAppx.150x150.png
        β”‚       SampleAppx.310x150.png
        β”‚       SampleAppx.44x44.png
        β”‚       SampleAppx.50x50.png
        β”‚
        β”œβ”€β”€β”€darwin
        β”‚   β”‚   .DS_Store
        β”‚   β”‚   osslsigncode
        β”‚   β”‚   readme.md
        β”‚   β”‚
        β”‚   β”œβ”€β”€β”€10.12
        β”‚   β”‚   β”‚   .DS_Store
        β”‚   β”‚   β”‚   osslsigncode
        β”‚   β”‚   β”‚
        β”‚   β”‚   └───lib
        β”‚   β”‚       β”‚   libcrypto.1.0.0.dylib
        β”‚   β”‚       β”‚   libcrypto.a
        β”‚   β”‚       β”‚   libcrypto.dylib
        β”‚   β”‚       β”‚   libssl.1.0.0.dylib
        β”‚   β”‚       β”‚   libssl.a
        β”‚   β”‚       β”‚   libssl.dylib
        β”‚   β”‚       β”‚
        β”‚   β”‚       β”œβ”€β”€β”€engines
        β”‚   β”‚       β”‚       lib4758cca.dylib
        β”‚   β”‚       β”‚       libaep.dylib
        β”‚   β”‚       β”‚       libatalla.dylib
        β”‚   β”‚       β”‚       libcapi.dylib
        β”‚   β”‚       β”‚       libchil.dylib
        β”‚   β”‚       β”‚       libcswift.dylib
        β”‚   β”‚       β”‚       libgmp.dylib
        β”‚   β”‚       β”‚       libgost.dylib
        β”‚   β”‚       β”‚       libnuron.dylib
        β”‚   β”‚       β”‚       libpadlock.dylib
        β”‚   β”‚       β”‚       libsureware.dylib
        β”‚   β”‚       β”‚       libubsec.dylib
        β”‚   β”‚       β”‚
        β”‚   β”‚       └───pkgconfig
        β”‚   β”‚               libcrypto.pc
        β”‚   β”‚               libssl.pc
        β”‚   β”‚               openssl.pc
        β”‚   β”‚
        β”‚   └───ci
        β”‚           osslsigncode
        β”‚
        β”œβ”€β”€β”€linux
        β”‚       osslsigncode
        β”‚
        β”œβ”€β”€β”€windows-10
        β”‚   β”‚   .DS_Store
        β”‚   β”‚
        β”‚   β”œβ”€β”€β”€ia32
        β”‚   β”‚       appxpackaging.dll
        β”‚   β”‚       makeappx.exe
        β”‚   β”‚       makecert.exe
        β”‚   β”‚       makepri.exe
        β”‚   β”‚       Microsoft.Windows.Build.Appx.AppxPackaging.dll.manifest
        β”‚   β”‚       Microsoft.Windows.Build.Appx.OpcServices.dll.manifest
        β”‚   β”‚       opcservices.dll
        β”‚   β”‚       pvk2pfx.exe
        β”‚   β”‚       signtool.exe
        β”‚   β”‚
        β”‚   └───x64
        β”‚           appxpackaging.dll
        β”‚           makeappx.exe
        β”‚           makecert.exe
        β”‚           makepri.exe
        β”‚           Microsoft.Windows.Build.Appx.AppxPackaging.dll.manifest
        β”‚           Microsoft.Windows.Build.Appx.OpcServices.dll.manifest
        β”‚           opcservices.dll
        β”‚           pvk2pfx.exe
        β”‚           signtool.exe
        β”‚
        └───windows-6
                makecat.exe
                makecat.exe.manifest
                Microsoft.Windows.Build.Signing.mssign32.dll.manifest
                Microsoft.Windows.Build.Signing.wintrust.dll.manifest
                mssign32.dll
                signtool.exe
                signtool.exe.manifest
                wintrust.dll

So, I see nsis7z.dll.... Hmm... Ok. Please install http://prdownloads.sourceforge.net/nsis/nsis-3.01-setup.exe?download NSIS (only to install some system deps, this installed nsis will be not used).

Please set env DEBUG=electron-builder* and attach log of the terminal output (https://github.com/visionmedia/debug#windows-note).

PS. If you just want to work β€” may be copying nsis7z.dll from nsis-resources/nsis-resources-3.0.0/x86-unicode to dir nsis/nsis-3.0.1.13/Plugins/x86-unicode will be temporary solution for you.

Slack FTW :) Yes, privacy :) In the future, please, please inform in advance if you modify any line due to security reasons β€” we are opensorce project and it will save our time.

Problem β€” username contains unicode symbols.

FYI: Deleting C:\Users\pamtbaau\AppData\Local\electron-builder\cache directory solved the issue for me.

Using: "electron-builder": "^19.49.2",

Hi

Has this error been resolved?
Running win 10 64 bit
Electron-builder: 20:4.0
Electron:1.8.3
Running yarn and deleted cache file in users\AppData\Local\electron-buildercache before I started.

Error:
File: failed creating mmap of "E:\APPS\UfmApp\dist\UfmApp-1.0.0-x64.nsis.7z"
Error in macro extractEmbeddedAppPackage on macroline 18
Error in macro installApplicationFiles on macroline 53
!include: error in script: "installSection.nsh" on line 60
Error in script "" on line 145 -- aborting creation process

at ChildProcess.childProcess.once.code (E:\APPS\UfmApp\node_modules\builder-util\src\util.ts:252:14)
at Object.onceWrapper (events.js:317:30)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12)

Any help would be appreciated.

Regards

Mark

copy all plugins from nsis-resources to nsis-3.0.1.13

Hi @develar ! Is there a solution/workaround for this issue?

@clusterberries Please provide actual error output via Slack DM.

I have found the same problem when buliding exe file on win10

The windows setup installer can't install

Same here

Same here. Win10 + electron-builder v21.2.0. The Setup.exe hangs halfway through its progress bar.

@MBetters did you solve this locally just for your installation?
Or did you manage to pack with electron-builder and distribute an .exe which works (both installing or autoupdating)?
Can you please provide steps or .nsh include files you used to fix this?

@damianobarbati All I did was...

  • Win key
  • Add or remove programs
  • Search name of app (productName in the build key) and select that app
  • Click Uninstall
  • Run the Setup.exe again (this time it works, i.e.- doesn't hang)

So really I should say that I just followed https://www.howtogeek.com/314734/how-to-manually-remove-programs-from-the-windows-uninstall-program-list/, which I discovered via https://github.com/electron-userland/electron-builder/issues/4057.

Same error w. 20.39.0 version. My application consists in a React main process that launch 2 python processes (with large .WAV file), since I remove both of them the build is succesful. Maybe you should try a build without large files that may be present in your source code !

Same error with electron-builder 22.3.2 building windows nsis, nsis-exe and portable on a windows 10. The build is successful when deleting large files (~4GB total), but electron-builder gives this error when I attempt to build with them:

File: failed creating mmap of "C:\Users\[redacted]platform-0.1.0-x64.nsis.7z"
Error in macro x64_app_files on macroline 1
Error in macro compute_files_for_current_arch on macroline 25
Error in macro extractEmbeddedAppPackage on macroline 14
Error in script "<stdin>" on line 143 -- aborting creation process
at ChildProcess.childProcess.once.code (C:\Users\[redacted]\node_modules\app-builder-lib\node_modules\builder-util\src\util.ts:239:14)
at Object.onceWrapper (events.js:277:13)
at ChildProcess.emit (events.js:189:
at maybeClose (internal/child_process.js:970:
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

The solutions above were not helpful for my case. Is there a known work around? eg can I build and paste the large files in after the fact?

Thanks!

Same error with electron-builder 22.3.2 building windows nsis, nsis-exe and portable on a windows 10. The build is successful when deleting large files (~4GB total), but electron-builder gives this error when I attempt to build with them:

File: failed creating mmap of "C:\Users\[redacted]platform-0.1.0-x64.nsis.7z"
Error in macro x64_app_files on macroline 1
Error in macro compute_files_for_current_arch on macroline 25
Error in macro extractEmbeddedAppPackage on macroline 14
Error in script "<stdin>" on line 143 -- aborting creation process
at ChildProcess.childProcess.once.code (C:\Users\[redacted]\node_modules\app-builder-lib\node_modules\builder-util\src\util.ts:239:14)
at Object.onceWrapper (events.js:277:13)
at ChildProcess.emit (events.js:189:
at maybeClose (internal/child_process.js:970:
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

The solutions above were not helpful for my case. Is there a known work around? eg can I build and paste the large files in after the fact?

Thanks!

Yes you can build and paste the large files after the operation ! I'm currently doing that for my project that includes 3Gb of audio files. But before you should try asarUnpack option in your package.json build section, can also work for some medium-sized files that might not be compiled or optimized.

{
  "build":{
    "asarUnpack":[
      "fileToUnpack1.*",
      "fileToUnpack2.*",
      "....."
    ],
}

I got the same error as the issue creator. None of the suggestions above solved it. It turned out that Windows Security was blocking it;

Windows Security treat detection screen

It's categorizing the uninstaller as a trojan.

Version info:

  • Windows 10 Pro Insider Preview Build 19587.rs_prerelease.200313-1639
  • electron-builder 22.4.1

The project is a minimal hello world project.

I'm on 22.6.0 now and it's still happening, but not because of a Trojan. It seems to only happen when building two different apps one after the other. I worked around it by using a different cache directory per app, i.e. setting ELECTRON_BUILDER_CACHE (a separate issue with that: #4955)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iklemm picture iklemm  Β·  3Comments

antonycourtney picture antonycourtney  Β·  3Comments

popod picture popod  Β·  3Comments

mstralka picture mstralka  Β·  3Comments

alexstrat picture alexstrat  Β·  3Comments