I using electron in a company behing a proxy. I have set npm to use proxy and it works. But when I try to run electron installer it tries to download nsis without proxy and this fails. What can I do to make electron builder to use proxy?
{
"name": "diaXDashboard",
"main": "./app/index.js",
"scripts": {
"postinstall": "install-app-deps",
"start": "npm install && electron ./app",
"pack": "app --dir",
"dist": "build"
},
"build": {
"appId": "diax_Dashboard",
"win": {
"target": "portable",
"icon": "build/icon.ico"
}
},
"dependencies": {},
"devDependencies": {
"electron": "latest",
"electron-builder": "20.2.0"
}
}
diaXDashboard@ dist d:devdiaxdiax-incubatordashboard
build• electron-builder version=20.2.0
• loaded configuration file=package.json ("build" field)
• effective config config=
directories:
output: dist
buildResources: build
appId: diax_Dashboard
win:
target: portable
icon: build/icon.ico• two package.json structure is used devPackageFile=d:devdiaxdiax-incubatordashboardpackage.json appPackageFile=d:devdiaxdiax-incubatordashboardapppackage.json
• writing effective config file=distelectron-builder.yaml
• no native production dependencies
• packaging platform=win32 arch=x64 electron=1.8.2 appOutDir=distwin-unpacked
• spawning command=d:devdiaxdiax-incubatordashboardnode_modules7zip-bin-winx647za.exe x -bd C:Usersmat1plAppDataLocalelectronCacheelectron-v1.8.2-win32-x64.zip -aoa -od:devdiaxdiax-incubatordashboarddistwin-unpacked7-Zip (a) 18.01 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2018-01-28
Scanning the drive for archives:
1 file, 55207481 bytes (53 MiB)Extracting archive: C:Usersmat1plAppDataLocalelectronCacheelectron-v1.8.2-win32-x64.zip
Path = C:Usersmat1plAppDataLocalelectronCacheelectron-v1.8.2-win32-x64.zip
Type = zip
Physical Size = 55207481Everything is Ok
Files: 117
Size: 141933313
Compressed: 55207481
• exited command=7za.exe code=0 pid=23108
• spawning command=d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe icon --format ico --root d:devdiaxdiax-incubatordashboardbuild --root d:devdiaxdiax-incubatordashboard --out d:devdiaxdiax-incubatordashboarddist.icon-ico --input build/icon.ico
[37m •[0m path doesn't exist [37mpath[0m=d:devdiaxdiax-incubatordashboardbuildbuildicon.ico
[37m •[0m path resolved [37moutputFormat[0m=ico [37mpath[0m=d:devdiaxdiax-incubatordashboardbuildicon.ico
• exited command=app-builder.exe code=0 pid=16456 out={"icons":[{"file":"d:\dev\diax\diax-incubator\dashboard\build\icon.ico","size":0}]}
• spawning command=d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe download-artifact --url https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-1.9.0/winCodeSign-1.9.0.7z --name winCodeSign-1.9.0 --sha512 cyhO9Mv5MTP2o9dwk/+qs0KvuO9CbDhjEJXA2ujpvhcsk5zmc+zY9iqiWXVzOuibTLYNC3qZiuFlJrrCT2kldw==
[37m •[0m found existing [37mpath[0m=C:Usersmat1plAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.9.0
• exited command=app-builder.exe code=0 pid=13680 out=C:Usersmat1plAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.9.0
• executing file=C:Usersmat1plAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.9.0rcedit.exe args=d:devdiaxdiax-incubatordashboarddistwin-unpackeddiaX_Dashboard.exe --set-version-string FileDescription diaX_Dashboard --set-version-string ProductName diaX_Dashboard --set-version-string LegalCopyright Copyright © 2018 --set-file-version 1.2.14 --set-product-version 1.2.14.0 --set-version-string InternalName diaX_Dashboard --set-version-string OriginalFilename --set-version-string CompanyName Company --set-icon d:devdiaxdiax-incubatordashboardbuildicon.ico
• executed file=C:Usersmat1plAppDataLocalelectron-buildercachewinCodeSignwinCodeSign-1.9.0rcedit.exe
wine&sign: 0s 488ms
• building target=portable file=distdiaX_Dashboard 1.2.14.exe archs=x64
• spawning command=d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe download-artifact --url https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.1.13/nsis-3.0.1.13.7z --name nsis-3.0.1.13 --sha512 WtEinikNm5ES8WSf1ZDefuUahn7iewbtVmJrRg4xWfm4eaESSJKy9pKIMRMgszdKw5e3YooCOqObnC5qJIfTLA==
[37m •[0m found existing [37mpath[0m=C:Usersmat1plAppDataLocalelectron-buildercachensisnsis-3.0.1.13
• exited command=app-builder.exe code=0 pid=23216 out=C:Usersmat1plAppDataLocalelectron-buildercachensisnsis-3.0.1.13
• executing file=d:devdiaxdiax-incubatordashboardnode_modules7zip-bin-winx647za.exe args=a -bd -mx=9 -mtc=off -mtm=off -mta=off d:devdiaxdiax-incubatordashboarddistdiaX_Dashboard-1.2.14-x64.nsis.7z . cwd=d:devdiaxdiax-incubatordashboarddistwin-unpacked
nsis package, x64: 45s 684ms
• spawning command=d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe download-artifact --url https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.3.0/nsis-resources-3.3.0.7z --name nsis-resources-3.3.0 --sha512 4okc98BD0v9xDcSjhPVhAkBMqos+FvD/5/H72fTTIwoHTuWd2WdD7r+1j72hxd+ZXxq1y3FRW0x6Z3jR0VfpMw==
[34m •[0m downloading [34mpath[0m=C:Usersmat1plAppDataLocalelectron-buildercachensisnsis-resources-3.3.0 [34murl[0m=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.3.0/nsis-resources-3.3.0.7z
[37m •[0m computing effective URL [37mcurrentUrl[0m=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.3.0/nsis-resources-3.3.0.7z [37minitialUrl[0m=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.3.0/nsis-resources-3.3.0.7z
[37m •[0m computing effective URL [37mcurrentUrl[0m=https://github-production-release-asset-2e65be.s3.amazonaws.com/65527128/a66824a4-87df-11e7-82f2-5300303e3c85?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180302%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180302T121732Z&X-Amz-Expires=300&X-Amz-Signature=87e3cd4153d5c89e0c1a5db588f7bca9b8a642cb401eef31ea29dfe133f0ca46&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnsis-resources-3.3.0.7z&response-content-type=application%2Foctet-stream [37minitialUrl[0m=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.3.0/nsis-resources-3.3.0.7z
[31m ⨯[0m Get https://github-production-release-asset-2e65be.s3.amazonaws.com/65527128/a66824a4-87df-11e7-82f2-5300303e3c85?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180302%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180302T121732Z&X-Amz-Expires=300&X-Amz-Signature=87e3cd4153d5c89e0c1a5db588f7bca9b8a642cb401eef31ea29dfe133f0ca46&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnsis-resources-3.3.0.7z&response-content-type=application%2Foctet-stream: Proxy Authentication Required
github.com/develar/app-builder/pkg/download.follow.func2
/Users/develar/go/src/github.com/develar/app-builder/pkg/download/downloader.go:135
github.com/develar/app-builder/pkg/download.follow
/Users/develar/go/src/github.com/develar/app-builder/pkg/download/downloader.go:176
github.com/develar/app-builder/pkg/download.Download
/Users/develar/go/src/github.com/develar/app-builder/pkg/download/downloader.go:61
github.com/develar/app-builder/pkg/download.DownloadArtifact
/Users/develar/go/src/github.com/develar/app-builder/pkg/download/artifactDownloader.go:80
github.com/develar/app-builder/pkg/download.ConfigureArtifactCommand.func1
/Users/develar/go/src/github.com/develar/app-builder/pkg/download/artifactDownloader.go:25
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(actionMixin).applyActions
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/actions.go:28
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(Application).applyActions
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:557
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(Application).execute
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:390
github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin.(Application).Parse
/Users/develar/go/src/github.com/develar/app-builder/vendor/github.com/alecthomas/kingpin/app.go:222
main.main
/Users/develar/go/src/github.com/develar/app-builder/main.go:59
runtime.main
/usr/local/Cellar/go/1.10/libexec/src/runtime/proc.go:198
runtime.goexit
/usr/local/Cellar/go/1.10/libexec/src/runtime/asm_amd64.s:2361• exited command=app-builder.exe code=1 pid=15800
• async task error error=d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe exited with code 1
• async task error error=d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe exited with code 1
Error: d:devdiaxdiax-incubatordashboardnode_modulesapp-builder-bin-winx64app-builder.exe exited with code 1
at ChildProcess.childProcess.once.code (d:devdiaxdiax-incubatordashboardnode_modulesbuilder-utilsrcutil.ts:252:14)
at Object.onceWrapper (events.js:219:13)
at ChildProcess.emit (events.js:127:13)
at maybeClose (internal/child_process.js:936:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
From previous event:
at AsyncTaskManager.add (d:devdiaxdiax-incubatordashboardnode_modulesbuilder-utilsrcasyncTaskManager.ts:15:20)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrctargetsnsisNsisTarget.ts:465:17
at Generator.next ()
From previous event:
at NsisTarget.computeCommonInstallerScriptHeader (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libouttargetsnsisNsisTarget.js:553:11)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrctargetsnsisNsisTarget.ts:210:37
From previous event:
at NsisTarget.buildInstaller (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libouttargetsnsisNsisTarget.js:336:11)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrctargetsnsisNsisTarget.ts:96:18
at Generator.next ()
From previous event:
at NsisTarget.finishBuild (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libouttargetsnsisNsisTarget.js:214:11)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrcpackager.ts:380:36
at Generator.next ()
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
From previous event:
at Packager.doBuild (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-liboutpackager.js:441:11)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrcpackager.ts:316:52
at Generator.next ()
at d:devdiaxdiax-incubatordashboardnode_modulesgraceful-fsgraceful-fs.js:99:16
at d:devdiaxdiax-incubatordashboardnode_modulesgraceful-fsgraceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:153:20)
From previous event:
at Packager._build (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-liboutpackager.js:385:11)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrcpackager.ts:278:23
at Generator.next ()
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
From previous event:
at Packager.build (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-liboutpackager.js:341:11)
at d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-libsrcindex.ts:50:40
at Generator.next ()
From previous event:
at build (d:devdiaxdiax-incubatordashboardnode_moduleselectron-builder-liboutindex.js:47:21)
at build (d:devdiaxdiax-incubatordashboardnode_moduleselectron-buildersrcbuilder.ts:228:10)
at then (d:devdiaxdiax-incubatordashboardnode_moduleselectron-buildersrcclicli.ts:48:33)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
From previous event:
at Object.args [as handler] (d:devdiaxdiax-incubatordashboardnode_moduleselectron-buildersrcclicli.ts:48:33)
at Object.runCommand (d:devdiaxdiax-incubatordashboardnode_modulesyargslibcommand.js:235:44)
at Object.parseArgs [as _parseArgs] (d:devdiaxdiax-incubatordashboardnode_modulesyargsyargs.js:1042:24)
at Object.get [as argv] (d:devdiaxdiax-incubatordashboardnode_modulesyargsyargs.js:957:21)
at Object.(d:devdiaxdiax-incubatordashboardnode_moduleselectron-buildersrcclicli.ts:42:15)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Function.Module.runMain (module.js:703:10)
at startup (bootstrap_node.js:193:16)
at bootstrap_node.js:660:3
Please try 20.3.0.
I'm using electron-builder 20.3.1 and still getting the same error:
[34m •[0m downloading [34mpath[0m=C:\Users\mat1pl\AppData\Local\electron-builder\cache\nsis\nsis-3.0.1.13 [34murl[0m=https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.1.13/nsis-3.0.1.13.7z
[31m ⨯[0m Get https://github-production-release-asset-2e65be.s3.amazonaws.com/65527128/a3c5da4a-4089-11e7-9f7c-87700ea73ffb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180307%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180307T124057Z&X-Amz-Expires=300&X-Amz-Signature=a2aba691d30d9c68848b550cc300afe6326ae08d8fb9337d538c6735729acfed&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnsis-3.0.1.13.7z&response-content-type=application%2Foctet-stream: Proxy Authentication Required
Please try to run with env NO_PROXY=*
I tried to use your setting, but in our company it is impossible to directly access the internet, so this does not work. What I need is to provide the proxy credentials (username and password) to the download programm.
Electron build downloads (nsis, winCodeSign) not working behind enterprise proxy : npm proxy settings are not used.
No way to use npm proxy settings ? (.npmrc ...)
I have the same question. Corporate proxy.
I only want to be not hated please anyone that has ongoing business
proceedings within iam has my full blessings to proceed
On Jan 3, 2019 11:24 AM, "Alex Lee" notifications@github.com wrote:
I have the same question. Corporate proxy.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/electron-userland/electron-builder/issues/2656#issuecomment-451249532,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AkatxPa7ZbQArYUx02vUYM8Xxel7Egowks5u_ljVgaJpZM4SZ2cH
.
is there a way to download electron-builder-binaries and make electron-builder point to same?
@cynx Yes.
So far, this is the workaround that I've found:
electron-builder command (either publish, or dist. It shouldn't matter, you'll be getting an error either way.)electron-builder was trying to download. Copy the URL and open it in a browser to download manually.cache.cache folder.ELECTRON_CACHE=%cd%\\cache and ELECTRON_BUILDER_CACHE=%cd%\\cache. (_Note: The %cd% is a Windows way to get the directory from powershell. This may not work with Mac. Try looking at cross-env for easy environment setting in all systems. https://www.npmjs.com/package/cross-env_)If you are trying to do this for different operating systems, you'll need to do the same for the other binaries. Be prepared to get errors, but the errors will tell you what the filenames should be.
Feel free to message me for help.
Most helpful comment
I have the same question. Corporate proxy.