Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Build fails with "Cannot find electron v0.22.1 from GitHub null" if no cached version is available #1958

Closed
fmezas opened this issue Aug 28, 2015 · 7 comments
Labels

Comments

@fmezas
Copy link

fmezas commented Aug 28, 2015

trying to build the master branch following the steps in developer-install.md results in the error

Running "download-electron" task
>> Cannot find electron v0.22.1 from GitHub null
Warning: Task "download-electron" failed. Use --force to continue.

Aborted due to warnings.

The problem seems to be caused by the version of Electron the build process attempts to download from github as configured in shell/Gruntfile.js: version 0.22.1 apparently is called atom-shell. Simply updating the version number to 0.31.1 (the most recent Electron version) fixes this issue but requires a couple string replacements in other scripts.

I've got a pull request if this is actually a problem and not an error on my part (this is my first look at LT's code). Let me know if you'd want me to send it

@niedzielski
Copy link

I can repro on Linux.

@cldwalker
Copy link
Member

@fmezas Thanks for reporting. I didn't notice this because the download task uses a cached version of the download. We're preparing for a release so we'll decide soon if upgrading electron is worth doing before or after the release

@fmezas
Copy link
Author

fmezas commented Aug 30, 2015

Sure. Makes sense. Looking forward to the release :)

On Sat, Aug 29, 2015 at 1:36 PM, Gabriel Horner notifications@github.com
wrote:

@fmezas https://github.com/fmezas Thanks for reporting. I didn't notice
this because the download task uses a cached version
https://github.com/atom/grunt-download-electron/blob/05dd085b0090b7a83f2098751b1c1f3e72bedd3b/tasks/download-atom-shell-task.coffee#L134
of the download. We're preparing for a release so we'll decide soon if
upgrading electron is worth doing before or after the release


Reply to this email directly or view it on GitHub
#1958 (comment)
.

@cldwalker cldwalker added the bug label Aug 30, 2015
@kenny-evitt kenny-evitt changed the title freshly cloned repo fails to build with 'Cannot find electron v0.22.1 from GitHub' Build fails with "Cannot find electron v0.22.1 from GitHub null" if no cached version is available Aug 30, 2015
@kenny-evitt
Copy link
Contributor

I just ran into this. @fmezas Was this definitely due to the name change? It seems like it should still be available regardless.

@fmezas
Copy link
Author

fmezas commented Aug 30, 2015

@kenny-evitt sequence of events:

  1. LT uses the npm module grunt-download-electron [^2.0.0] to try to download Electron [0.22.1]
  2. grunt-download-electron implements this functionality as a grunt task
  3. The code of the grunt-download-electron grunt task (code that belongs to grunt-download-electron, not to LT), points to the github repo from where the Electron code base needs to be downloaded and it assumes it is atom/electron (hardcoded)
  4. grunt-download-electron tries to download Electron from repo atom/electron using the npm module github-releases
  5. github-releases tries to find the downloadable release for version 0.22.1 of Electron, but it doesn't exist because the released version 0.22.1 of that product had a different name: atom-shell

@kenny-evitt
Copy link
Contributor

@fmezas This is fixed in the branch more-electron in the same way you fixed it – by bumping the Electron version. See the pull request for the changes to be merged from the branch.

What's weird is that this definitely did work previously as none of the relevant LT or grunt-download-electron code has changed in a while.

Interestingly, if I run curl https://api.github.com/repos/atom/electron/releases the last release listed in the result is v0.22.2. I suspect that the recent Electron releases – two in the last week alone – bumped the release we were using to the 'second page' of results. I ran curl https://api.github.com/repos/atom/electron/releases/tags/v0.22.1:

{
  "url": "https://api.github.com/repos/atom/electron/releases/1064349",
  "assets_url": "https://api.github.com/repos/atom/electron/releases/1064349/assets",
  "upload_url": "https://uploads.github.com/repos/atom/electron/releases/1064349/assets{?name}",
  "html_url": "https://github.com/atom/electron/releases/tag/v0.22.1",
  "id": 1064349,
  "tag_name": "v0.22.1",
  "target_commitish": "master",
  "name": "atom-shell v0.22.1",
  "draft": false,
  ...

@kenny-evitt
Copy link
Contributor

This has been fixed upstream. We could bump to version 2.1.2 to prevent similar problems in the future.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants