# How run electron-builder without fail and build no stop

**URL:** <https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728>\
**Category:** Windows\
**Created:** [June 14, 2019, 5:19pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728 "2019-06-14T17:19:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![boyphongsakorn](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/boyphongsakorn/32/1972_2.png) [@boyphongsakorn](https://travis-ci.community/u/boyphongsakorn)\
**Post date:** [June 14, 2019, 5:19pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/1 "2019-06-14T17:19:40Z")

</div>

how to run electron-builder without fail and build not stop  
electron-builder is work but failed and exited with 1 during .  
how to set travis file ?

> [@boyphongsakorn](#):
>
> os: windows  
> language: node\_js  
> node\_js: ‘10’  
> install:
> 
> - npm install --global yarn
> - npm update node-sass@latest
> - npm install electron --save-dev
> - npm install electron-builder --save-dev
> - npm install electron-packager --save-dev
> - npm install jquery --save-dev
> - npm install webpack --save-dev
> - npm install async --save
> - npm install oauth-electron-facebook --save
> - npm install run-async --save
> - npm run dist
> - dir  
> deploy:  
> provider: releases  
> api\_key: “lala”  
> file: “FILE TO UPLOAD”  
> skip\_cleanup: true  
> draft: true  
> on:  
> tags: true  
> ===

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 17, 2019, 12:39pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/2 "2019-06-17T12:39:15Z")

</div>

same here

```auto
language: node_js
matrix:
  allow_failures:
    - os: windows
  fast_finish: true
  include:
    - name: "build on windows"
      os: windows
    - name: "build on mac"
      os: osx
sudo: false
node_js:
- '10'
cache: yarn
before_install:
  - if ["$TRAVIS_OS_NAME" == "windows"]; then powershell -command 'Set-MpPreference -DisableRealtimeMonitoring $true'; fi
install:
  - cd ./packages/PROJECTNAME
  - yarn install
env:
  - DEBUG=electron-builder BUILD_COMMIT_SHA1="$TRAVIS_COMMIT" NODE_ENV=production NPM_CONFIG_PRODUCTION=false
script:
  - echo $TRAVIS_COMMIT
  - echo $BUILD_COMMIT_SHA1
  - yarn build:frontend
  - if ["$TRAVIS_OS_NAME" == "windows"]; then powershell -command 'yarn package:win'; fi
  - if ["$TRAVIS_OS_NAME" == "osx"]; then yarn package; fi

```

MacOS build runs quick and finishes successfully.  
Windows runs without errors, but times out.

```auto
module.exports = {
  appId: 'com.electron.${name}',
  directories: {
    output: 'package'
  },
  files: [
    'icon.icns',
    'icon.ico',
    'main.js'
  ],
  win: {
    target: 'dir'
  },
  mac: {
    target: 'dir'
  }
}

```

the commands:

```auto
electron-builder --config electron-builder.js --mac
electron-builder --config electron-builder.js --win

```

Build output before failing:

```auto
Child main:
    Hash: 094aa54945b8f6758c95
    Time: 61075ms
    Built at: 06/17/2019 12:21:03 PM
      Asset Size Chunks Chunk Names
    main.js 5.76 KiB 0 [emitted] main
    Entrypoint main = main.js
     [0] external "electron-better-ipc" 42 bytes {0} [built]
     [1] external "electron-log" 42 bytes {0} [built]
     [2] external "electron" 42 bytes {0} [built]
     [3] external "electron-is-dev" 42 bytes {0} [built]
     [4] ./src/launcher/main/ipc.ts 1.22 KiB {0} [built]
     [5] external "path" 42 bytes {0} [built]
     [6] external "assert" 42 bytes {0} [built]
     [7] ./src/launcher/config.ts 614 bytes {0} [built]
     [8] external "electron-store" 42 bytes {0} [built]
     [9] ./src/launcher/init-log.ts 360 bytes {0} [built]
    [10] external "@sentry/electron" 42 bytes {0} [built]
    [11] ./src/launcher/init-sentry.ts + 1 modules 885 bytes {0} [built]
         | ./src/launcher/init-sentry.ts 162 bytes [built]
         | ./src/launcher/build-vars.ts 718 bytes [built]
    [12] ./src/launcher/main.ts 6.4 KiB {0} [built]
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

```

I am building win on a windows machine, because i am using `sharp` node module as native dependency.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [June 17, 2019, 1:13pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/3 "2019-06-17T13:13:16Z")

</div>

My initial guess is that you have a background process running (e.g., [Build doesn't finish after completing tests](https://travis-ci.community/t/build-doesnt-finish-after-completing-tests/288)) that is preventing the shutdown.

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 17, 2019, 1:21pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/4 "2019-06-17T13:21:55Z")

</div>

i am trying this already :D:

> [@Timeout after build finished (and succeeded)](https://travis-ci.community/t/timeout-after-build-finished-and-succeeded/1336/2):
>
> Container stays up because of the yarn installation running gpg. see: # [Build doesn't finish after completing tests](https://travis-ci.community/t/build-doesnt-finish-after-completing-tests/288/9) to workaround, add this to .travis.yml: env: - YARN\_GPG=no

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 17, 2019, 1:43pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/5 "2019-06-17T13:43:52Z")

</div>

sadly no luck. same problem as before.

I have a before\_deploy and deploy step.  
So the electron-build command timed out without an error, because the other steps are not called.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [June 17, 2019, 2:52pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/6 "2019-06-17T14:52:30Z")

</div>

GPG may not be the only thing running in the background. The text “Child main” in the logs suggests that the build itself is spawning multiple processes. Please consult the documentation.

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 18, 2019, 5:36am UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/7 "2019-06-18T05:36:12Z")

</div>

i am trying to increase the timeout for that command:

`- if ["$TRAVIS_OS_NAME" == "windows"]; then travis_wait 30 yarn package:win; fi`

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 18, 2019, 6:55am UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/8 "2019-06-18T06:55:16Z")

</div>

no luck. i do not know what is happening … or if there is even anything running.

Any further ideas?

---

<div class="post-metadata">

**Author:** ![jayvdb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jayvdb/32/1966_2.png) [@jayvdb](https://travis-ci.community/u/jayvdb)\
**Post date:** [June 18, 2019, 7:14am UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/9 "2019-06-18T07:14:12Z")

</div>

If you can add extra commands , try to get a list of all running processes, to find which needs to be killed.

> <https://superuser.com/questions/914782/how-do-you-list-all-processes-on-the-command-line-in-windows>

My guess is electron is running a process to help cache the next build.

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 18, 2019, 8:20am UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/10 "2019-06-18T08:20:57Z")

</div>

when is the best moment to call it?  
before the build task it does not make sense and everthing after is not called.

When i use travis\_wait the command fails and the process is killed as well.

---

<div class="post-metadata">

**Author:** ![jayvdb](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jayvdb/32/1966_2.png) [@jayvdb](https://travis-ci.community/u/jayvdb)\
**Post date:** [June 18, 2019, 8:53am UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/11 "2019-06-18T08:53:13Z")

</div>

Maybe run it under [wtrace](https://github.com/lowleveldesign/wtrace) to see what processes are being created and deleted (not sure there is an easy way to correlate the create and kills, so this might be laborious if electron uses lots of processes - try to configure it to go slow and use only one process)

---

<div class="post-metadata">

**Author:** ![KillerCodeMonkey](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/killercodemonkey/32/1997_2.png) [@KillerCodeMonkey](https://travis-ci.community/u/KillerCodeMonkey)\
**Post date:** [June 18, 2019, 12:37pm UTC](https://travis-ci.community/t/how-run-electron-builder-without-fail-and-build-no-stop/3728/12 "2019-06-18T12:37:21Z")

</div>

My fault:

my build command (previously only on unix machines) concatenates to commands like this:

`&&` this caused the described behaviour. So i splitted them up, and now it runs.

Noob mistake 😄
