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

Windows 10 build Error (NSIS) #1850

Closed
bennygenel opened this issue Jul 22, 2017 · 32 comments
Closed

Windows 10 build Error (NSIS) #1850

bennygenel opened this issue Jul 22, 2017 · 32 comments

Comments

@bennygenel
Copy link

  • 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
@develar
Copy link
Member

develar commented Jul 22, 2017

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

@bennygenel
Copy link
Author

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

@develar
Copy link
Member

develar commented Jul 22, 2017

Is your windows 64bit?

@bennygenel
Copy link
Author

Yes it is

@develar
Copy link
Member

develar commented Jul 22, 2017

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?

@bennygenel
Copy link
Author

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

@develar
Copy link
Member

develar commented Jul 22, 2017

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.

@bennygenel
Copy link
Author

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

@develar
Copy link
Member

develar commented Jul 22, 2017

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.

@develar
Copy link
Member

develar commented Jul 22, 2017

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.

@pamtbaau
Copy link

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

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

@GeometricProgress
Copy link

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-builder\cache 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

@moisesf10
Copy link

copy all plugins from nsis-resources to nsis-3.0.1.13

@clusterberries
Copy link
Contributor

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

@develar
Copy link
Member

develar commented Nov 8, 2018

@clusterberries Please provide actual error output via Slack DM.

@ruchenshanghai
Copy link

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

@stvenyin
Copy link

The windows setup installer can't install

@stoefln
Copy link

stoefln commented Jun 3, 2019

Same here

@MBetters
Copy link

MBetters commented Nov 29, 2019

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

@MBetters
Copy link

MBetters commented Dec 2, 2019

@damianobarbati
Copy link

@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?

@MBetters
Copy link

MBetters commented Dec 3, 2019

@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 #4057.

@antoinepryy
Copy link

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 !

@boraerden
Copy link

boraerden commented Feb 3, 2020

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!

@antoinepryy
Copy link

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.*",
      "....."
    ],
}

@adam-lynch
Copy link
Contributor

adam-lynch commented Apr 8, 2020

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.

@adam-lynch
Copy link
Contributor

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)

@baruchiro
Copy link

baruchiro commented Jan 2, 2021

I renoved this part from my package.json and it is working now:

"contributors": [
  "Name1 Last1 <name1@gmail.com>",
  "Name2 Last2 <name2@gmail.com>"
],

See also here: electron-userland/electron-builder-binaries#38 (comment)

@FernandoRogelin
Copy link

This worked for me! #3243 (comment)

@glokesh94
Copy link

glokesh94 commented Mar 11, 2021

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

First download zip by this URL: https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z

Copy this zip file here : C:\Users\Benny\AppData\Local\electron-builder\cache\nsis\nsis-3.0.4.1

Extract zip here: : C:\Users\Benny\AppData\Local\electron-builder\cache\nsis\nsis-3.0.4.1

Now add these line in package.json file.
"build": {
"nsis": {
"include": "build/installer.nsh"
}
},

create new folder (Folder name: build) in your project directory.
create new file (file name: installer.nsh) in build folder
copy following code in "installer.nsh" file

!macro customInstall
CreateShortCut "$SMSTARTUP\filename.lnk" "$INSTDIR\filename.exe"
!macroend

Now run again build command.

electron-builder --win

Now its working properly.

@xadk
Copy link

xadk commented Aug 8, 2021

I was having the same problem.
Apparently electron-builder does blind copy without checking if directories in target path exist and doesn't even try to create them, which raises the exception.
I created all the non-existing directories in target path [/resources] so that it can copy and it worked.

@ddm50
Copy link

ddm50 commented Oct 20, 2024

Error in macro x64_app_files on macroline 1
Error in macro compute_files_for_current_arch on macroline 7
Error in macro extractEmbeddedAppPackage on macroline 8
Error in macro installApplicationFiles on macroline 79
!include: error in script: "installSection.nsh" on line 66
Error in script "" on line 191 -- aborting creation process

Randomly started happening...

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

No branches or pull requests