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

electron_config_cache not taken into account when building #2711

Closed
mattspeller opened this issue Mar 19, 2018 · 2 comments
Closed

electron_config_cache not taken into account when building #2711

mattspeller opened this issue Mar 19, 2018 · 2 comments
Labels

Comments

@mattspeller
Copy link

Latest non-beta - 20.5.1

None

Linux 64

When building packages with electron, that use electron downloader, I am able to set environment variable electron_config_cache which allows me to stop electronDownloader going to GitHub for binaries. (This is particularly important to us as our build machines do not have internet access.)

When running 'npm run dist' on a electron-Builder application, the call to the electronDownload ignores the electron_config_cache environment variable. How do we bypass external calls and pass in a endpoint (and filename) for the electron-builder to use when resolving the pre-built binaries?

Bamboo build log file excerpt showing command run and environment variables:

19-Mar-2018 16:13:39 | Starting task 'Bulid dist' of type 'com.atlassian.bamboo.plugins.bamboo-nodejs-plugin:task.builder.npm'
-- | --
Beginning to execute external process for build 'xxx - Electron Container - Node Build and Deploy #12 (JOB1-12)'
 ... running command line: 
/app/dev/node-v8.9.1-linux-x64/bin/node /app/dev/node-v8.9.1-linux-x64/bin/npm run dist
 ... in: /app/bamboo/bamboo-agent-home/xml-data/build-dir/JOB1
 ... using extra environment variables: 
electron_config_cache=/app/bamboo/bamboo-agent-home/xml-data/build-dir/JOB1/electronbinaries

Bamboo build log file excerpt showing builder still tries to hit the github ip address:

19-Mar-2018 16:13:42 | Downloading tmp-47563-0-electron-v1.8.3-linux-x64.zip
-- | --
19-Mar-2018 16:13:42 | [>                                            ] 0.0% (0 B/s)
19-Mar-2018 16:13:49 | Downloading tmp-47563-0-electron-v1.8.3-linux-x64.zip
19-Mar-2018 16:13:49 | Error: connect ETIMEDOUT 192.30.253.112:443
19-Mar-2018 16:13:49 | Error: connect ETIMEDOUT 192.30.253.112:443
19-Mar-2018 16:13:49 | at Object._errnoException (util.js:1024:11)
19-Mar-2018 16:13:49 | at _exceptionWithHostPort (util.js:1046:20)
19-Mar-2018 16:13:49 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

19-Mar-2018 16:13:49 | Error: connect ETIMEDOUT 192.30.253.112:443
-- | --
19-Mar-2018 16:13:49 | Error: connect ETIMEDOUT 192.30.253.112:443
19-Mar-2018 16:13:49 | at Object._errnoException (util.js:1024:11)
19-Mar-2018 16:13:49 | at _exceptionWithHostPort (util.js:1046:20)
19-Mar-2018 16:13:49 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)
19-Mar-2018 16:13:49 | From previous event:
19-Mar-2018 16:13:49 | at Packager.packager.electronDownloader.options [as electronDownloader] (/app/bamboo/bamboo-agent-home/xml-data/build-dir/DASH-EC-JOB1/node_modules/electron-builder/src/builder.ts:227:12)
19-Mar-2018 16:13:49 | at /app/bamboo/bamboo-agent-home/xml-data/build-dir/DASH-EC-JOB1/node_modules/electron-builder-lib/src/packager/dirPackager.ts:53:21


@mandyr
Copy link

mandyr commented Mar 26, 2018

I am facing the same issue.
Electron-builder version is 20.5.1

This is the relevant part in my electron-builder.json file

{ ... , "electronDownload": { "mirror": "[URL]", "cache": "$HOME/.cache/electron-builder/" } }

The winCodeSign zip was copied and unzipped in the $HOME/.cache/electron-builder/winCodeSign folder (like mentioned here Issue1859) but it still tries to download the binary from Github.

I also tried setting the electron_builder_cache environment variable, but that gets ignored as well.
What am I missing?

@stale
Copy link

stale bot commented Jul 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the backlog label Jul 2, 2019
@stale stale bot closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants