electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.69k stars 1.74k forks source link

Connection to remote builder refused, while building linux package #3569

Closed vanmxpx closed 5 years ago

vanmxpx commented 5 years ago

Good day. Trying to build linux package remotely getting the error. What's wrong with remote builder?

• electron-builder version=20.38.4

Linux target AppImage, deb

`> electron-builder --linux

• electron-builder version=20.38.4 • loaded configuration file=package.json ("build" field) • description is missed in the package.json appPackageFile=C:\Users\nick\Projects\TournamentTRN\test\package.json • writing effective config file=distElectron\builder-effective-config.yaml • no native production dependencies • packaging platform=linux arch=x64 electron=4.0.0 appOutDir=distElectron\linux-unpacked • scheduling remote build target=appImage arch=x64 • cannot get, wait attempt=0 error=Get https://service.electron.build/find-build-agent?no-cache=1e247ur: dial tcp 51.38.69.239:443: connectex: No connection could be made because the target machine actively refused it. waitTime=2 • cannot get, wait attempt=1 error=Get https://service.electron.build/find-build-agent?no-cache=1e247ur: dial tcp 51.38.69.239:443: connectex: No connection could be made because the target machine actively refused it. waitTime=4 • cannot get, wait attempt=2 error=Get https://service.electron.build/find-build-agent?no-cache=1e247ur: dial tcp 51.38.69.239:443: connectex: No connection could be made because the target machine actively refused it. waitTime=6 ⨯ Get https://service.electron.build/find-build-agent?no-cache=1e247ur: dial tcp 51.38.69.239:443: connectex: No connection could be made because the target machine actively refused it.

Error: C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code 1 at ChildProcess.childProcess.once.code (C:\Users\nick\Projects\TournamentTRN\test\node_modules\builder-util\src\util.ts:244:14) at Object.onceWrapper (events.js:273:13) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:962:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) From previous event: at RemoteBuilder._build (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:57:83) at _bluebirdLst.default.mapSeries.arch (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:52:19) From previous event: at RemoteBuilder.build (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\remoteBuilder\RemoteBuilder.ts:51:28) at C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\linuxPackager.ts:99:30 From previous event: at RemoteTarget.finishBuild (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\linuxPackager.ts:97:20) at C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\packager.ts:438:36 at Generator.next () at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) From previous event: at Packager.doBuild (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\packager.ts:396:24) at C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\packager.ts:366:57 at Generator.next () at C:\Users\nick\Projects\TournamentTRN\test\node_modules\graceful-fs\graceful-fs.js:111:16 at C:\Users\nick\Projects\TournamentTRN\test\node_modules\graceful-fs\graceful-fs.js:45:10 at FSReqWrap.oncomplete (fs.js:141:20) From previous event: at Packager._build (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\packager.ts:335:133) at C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\packager.ts:331:23 at Generator.next () at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) From previous event: at Packager.build (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\packager.ts:288:14) at build (C:\Users\nick\Projects\TournamentTRN\test\node_modules\app-builder-lib\src\index.ts:59:28) at build (C:\Users\nick\Projects\TournamentTRN\test\node_modules\electron-builder\src\builder.ts:227:10) at then (C:\Users\nick\Projects\TournamentTRN\test\node_modules\electron-builder\src\cli\cli.ts:46:19)`

miyanoyuriko commented 4 years ago

Same issue

githubfan commented 4 years ago

Same issue, this needs a fix

miyanoyuriko commented 4 years ago

guys, seriously? can't build app without service.highlight.com. there's no any way to build?

Hi,can you build successful?

miyanoyuriko commented 4 years ago
⨯ Get https://service.electron.build/find-build-agent?no-cache=1fbiiu7: dial tcp 51.15.76.176:443: connectex: No connection could be made because the target machine actively refused it.  
 ERROR  Error: C:\Users\Tucsky\Documents\Development\safe-orthopedic\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE

Hello??

Same issue, this needs a fix

Did you solve this problem?

miyanoyuriko commented 4 years ago

Same issue, this needs a fix

Excuse me,did you solve this problem?

githubfan commented 4 years ago

I didn't

shickk commented 4 years ago

Electron builder uses electron-build-service to build a Linux package and installer. Since the free service host is unavailable and refuses the connection, the server can be self-hosted as mentioned here in the documentation. https://github.com/electron-userland/electron-build-service Haven't tried this yet, though.

miyanoshiyo commented 4 years ago

I know how to solve it now. If you want to build a package for linux, you have to build it on Linux. And then you will get a program with the suffix AppImage ♥

agnusha commented 3 years ago

Same issue

arturbp commented 3 years ago

Same here... Hello?

Ovi commented 3 years ago

Still facing the issue...

cannot get, wait  error=Get "https://service.electron.build/find-build-agent?no-cache=1g0j30e": dial tcp 51.15.76.176:443: connectex: No connection could be made because the target machine actively refused it.
realStandal commented 3 years ago

Electron builder uses electron-build-service to build a Linux package and installer. Since the free service host is unavailable and refuses the connection, the server can be self-hosted as mentioned here in the documentation. https://github.com/electron-userland/electron-build-service Haven't tried this yet, though.

Tried this solution and it worked.

I used minikube running on Docker-Desktop instead of microk8s, that was a personal choice.

These are reproducible steps using a similar setup to what I have. Though, you can deploy this service in any Kubernetes cluster and, so long as you can access it externally, point your electron-builder to its service, as described in the linked document. I'm going to assume you're on Windows 10 using the Terminal app if you're using my instructions.

Worked as expected with the following addition after you've started the cluster and created the required resources:

  1. Run minikube service builder -n build-service --url=true to forward traffic to the cluster through NodePort.
    • Keep this Terminal window running for the duration of your build-process(es).
  2. Use the URL (Eg: http://127.0.0.1:63692) to configure your environment variables as described in the linked document. Ignore the HTTP(S):// protocol bit.
  3. In a separate Terminal window, build your application as you normally would.
  4. Workflow should remain the same as you'd expect, I'm not sure what to expect though this is my first time using the tool.

You must re-run minikube service builder ... each time its Terminal window closes you will need to reconfigure your environment variables. This is because the minikube service command will dedicate a new port when tunneling into the cluster. Maybe someone else knows more than I do, but I believe this is how minikube service behaves.

PauloRodrigues33 commented 3 years ago

The problem on Windows persist but i ✅ solved using the WSL 2 for Windows.

AmarsDing commented 3 years ago

same here ⨯ Get "https://service.electron.build/find-build-agent?no-cache=1ga9ac2": dial tcp 51.15.76.176:443: connectex: No connection could be made because the target machine actively refused it.

alvaroadlf commented 3 years ago

Same error, again:

Command: electron-builder --linux

cannot get, wait error=Get "https://service.electron.build/find-build-agent?no-cache=1gerpgo": dial tcp 51.15.76.176:443: connectex: No connection could be made because the target machine actively refused it.

For Windows works ok electron-builder --win

mmaietta commented 3 years ago

This service is intentionally out of service. You can see from these list of issues: https://github.com/electron-userland/electron-build-service/issues https://github.com/electron-userland/electron-build-service/issues/13 Please use the repo linked on how to configure your own service or simply use a local docker image for building linux on windows