develar / app-builder

Generic helper tool to build app in a distributable format
MIT License
117 stars 61 forks source link

app-builder.exe exited with code 1 saying that the requested address is not valid #5

Open pansila opened 5 years ago

pansila commented 5 years ago
  • electron-builder version=20.28.4
  • loaded configuration file=package.json ("build" field)
  • writing effective config file=build\builder-effective-config.yaml
  • rebuilding native production dependencies platform=win32 arch=x64
  • packaging       platform=win32 arch=x64 electron=2.0.11 appOutDir=build\win-unpacked
  ⨯ Get https://github.com/electron/electron/releases/download/v2.0.11/electron-v2.0.11-win32-x64.zip: proxyconnect tcp: dial tcp :0: connectex: The requested address is not valid in its context.
github.com/develar/app-builder/pkg/download.(*Downloader).follow.func1
        /Users/develar/go/src/github.com/develar/app-builder/pkg/download/downloader.go:167
github.com/develar/app-builder/pkg/download.(*Downloader).follow
        /Users/develar/go/src/github.com/develar/app-builder/pkg/download/downloader.go:200
github.com/develar/app-builder/pkg/download.(*Downloader).Download
        /Users/develar/go/src/github.com/develar/app-builder/pkg/download/downloader.go:75
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).doDownload
        /Users/develar/go/src/github.com/develar/app-builder/pkg/electron/electronDownloader.go:191
github.com/develar/app-builder/pkg/electron.(*ElectronDownloader).Download
        /Users/develar/go/src/github.com/develar/app-builder/pkg/electron/electronDownloader.go:171
github.com/develar/app-builder/pkg/electron.downloadElectron.func1.1
        /Users/develar/go/src/github.com/develar/app-builder/pkg/electron/electronDownloader.go:71
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
        /Users/develar/go/src/github.com/develar/app-builder/pkg/util/async.go:67
runtime.goexit
        /usr/local/Cellar/go/1.10.3/libexec/src/runtime/asm_amd64.s:2361

Error: d:\work\electron-test\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code 1
    at ChildProcess.childProcess.once.code (d:\work\electron-test\node_modules\builder-util\src\util.ts:254: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 Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
From previous event:
    at unpack (d:\work\electron-test\node_modules\app-builder-lib\out\electron\ElectronFramework.js:191:18)
    at Object.prepareApplicationStageDirectory (d:\work\electron-test\node_modules\app-builder-lib\src\electron\ElectronFramework.ts:148:50)
    at d:\work\electron-test\node_modules\app-builder-lib\src\platformPackager.ts:179:21
    at Generator.next (<anonymous>)
From previous event:
    at WinPackager.doPack (d:\work\electron-test\node_modules\app-builder-lib\src\platformPackager.ts:166:165)
    at d:\work\electron-test\node_modules\app-builder-lib\src\platformPackager.ts:112:16
    at Generator.next (<anonymous>)
From previous event:
    at WinPackager.pack (d:\work\electron-test\node_modules\app-builder-lib\src\platformPackager.ts:110:95)
    at d:\work\electron-test\node_modules\app-builder-lib\src\packager.ts:376:24
    at Generator.next (<anonymous>)
    at xfs.stat (d:\work\electron-test\node_modules\fs-extra-p\node_modules\fs-extra\lib\mkdirs\mkdirs.js:56:16)
    at d:\work\electron-test\node_modules\graceful-fs\polyfills.js:287:18
    at FSReqWrap.oncomplete (fs.js:153:5)
From previous event:
    at Packager.doBuild (d:\work\electron-test\node_modules\app-builder-lib\src\packager.ts:344:39)
    at d:\work\electron-test\node_modules\app-builder-lib\src\packager.ts:314:57
    at Generator.next (<anonymous>)
    at d:\work\electron-test\node_modules\graceful-fs\graceful-fs.js:99:16
    at d:\work\electron-test\node_modules\graceful-fs\graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:135:15)
From previous event:
    at Packager._build (d:\work\electron-test\node_modules\app-builder-lib\src\packager.ts:285:133)
    at d:\work\electron-test\node_modules\app-builder-lib\src\packager.ts:281:23
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (d:\work\electron-test\node_modules\app-builder-lib\src\packager.ts:238:14)
    at build (d:\work\electron-test\node_modules\app-builder-lib\src\index.ts:58:28)
    at build (d:\work\electron-test\node_modules\electron-builder\src\builder.ts:227:10)
    at then (d:\work\electron-test\node_modules\electron-builder\src\cli\cli.ts:42:48)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at Object.args [as handler] (d:\work\electron-test\node_modules\electron-builder\src\cli\cli.ts:42:48)
    at Object.runCommand (d:\work\electron-test\node_modules\yargs\lib\command.js:238:44)
    at Object.parseArgs [as _parseArgs] (d:\work\electron-test\node_modules\yargs\yargs.js:1085:24)
    at Object.get [as argv] (d:\work\electron-test\node_modules\yargs\yargs.js:1000:21)
    at Object.<anonymous> (d:\work\electron-test\node_modules\electron-builder\src\cli\cli.ts:25:28)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-test@0.1.0 build: `cross-env DEBUG=electron-builder node .electron-vue/build.js && electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-test@0.1.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!     C:\Users\electron-test\AppData\Roaming\npm-cache\_logs\2018-10-08T02_36_58_756Z-debug.log
alimohyudin commented 5 years ago

Found any solution? Please share if you do. Having exactly same issue. Thanks

pansila commented 5 years ago

@alimohyudin I dont' know the exact root cause as I'm not familiar with go, so I worked around it by downloading the missing packages manually and moving them to the appropriate places.

alimohyudin commented 5 years ago

I found the solution: Added NO_PROXY = * in environment variables. It solved my issue and downloaded the dependencies easily.

MetaiR commented 5 years ago

@alimohyudin I have this issue when I want to build my project with CircleCI can u be more specific about where should I put this?

alimohyudin commented 5 years ago

@metaiR I run electron builder on ubuntu and it worked fine and on windows I get above stated error and Environment variables are part of windows that you can google. Thats where I put that value.

MetaiR commented 5 years ago

@alimohyudin I changed my build docker container from node to electronuserland/builder:wine-mono and it works fine now

antoniusronnysuseno commented 5 years ago

I have the same problem. I tried running in visual studio code, and the result was an error app-builder.exe exited code 1. I closed all applications and run "npm run elecrron: build" in cmd windows that is normal. no error appears. Screenshot 2019-04-23 16 09 13 Screenshot 2019-04-23 16 10 44

brennomarques commented 4 years ago

I have this problem and I can't solve it, could you help me? please. I do not know what to do.

I'm on windows x64

image

joelmm1 commented 3 years ago

@MetaiR I run electron builder on ubuntu and it worked fine and on windows I get above stated error and Environment variables are part of windows that you can google. Thats where I put that value.

@alimohyudin Thanks for your response. Yes, I know about environment variables. However, do we create a new user variable or a new system variable? Also, what will be the "variable name" and "variable value" respectively?

shawinder commented 3 years ago

I found the solution: Added NO_PROXY = * in environment variables. It solved my issue and downloaded the dependencies easily.

Where did you set it. I tried setting it in .npmrc and using SET NO_PROXY=* with no luck?