xxxigm
d1ecebcbfd
fix(desktop): re-download Electron binary via mirror when pack fails ( #47266 ) ( #47276 )
...
* fix(desktop): re-download Electron binary via mirror when pack fails (#47266 )
Since #38673 pinned build.electronDist to node_modules/electron/dist,
electron-builder reads the Electron binary straight from there and never
downloads it during `npm run pack`. That dist tree is only produced by the
electron package's postinstall (install.js) during `npm ci`. When that
download is blocked or throttled (GitHub's release host is unreachable in
some regions), the dist is missing and the build dies with:
The specified electronDist does not exist: .../node_modules/electron/dist
The existing ELECTRON_MIRROR fallback in all three desktop-build paths
(scripts/install.ps1, scripts/install.sh, and `hermes desktop` in
hermes_cli/main.py) re-ran `npm run pack` with ELECTRON_MIRROR set — but
pack never downloads Electron anymore, so the mirror was never used and the
retry re-read the same missing dist. The fallback was effectively dead.
Drive the mirror through electron's own downloader instead:
- Add a dist-presence check + a downloader helper (Test-ElectronDist /
Restore-ElectronDist, _electron_dist_ok / _restore_electron_dist,
_electron_dist_ok / _redownload_electron_dist) that wipes a partial dist
+ the path.txt version marker (electron's install.js short-circuits on it)
and re-runs `node install.js`, optionally via a mirror.
- On the first retry, repopulate a missing dist from the canonical source;
on the mirror retry, re-fetch through npmmirror.com, then pack.
- Gate the re-download on the dist check so an unrelated build failure
(tsc/vite) doesn't trigger a pointless ~200 MB refetch, and skip the final
pack when the binary still can't be fetched instead of failing the same way.
* test(desktop): cover Electron dist re-download mirror fallback (#47266 )
Add behavior coverage for the electronDist re-download fix:
- _electron_dist_ok across linux/win32/darwin, including the partial-dist
case (dir present but binary missing) that makes the pinned electronDist
fail.
- _redownload_electron_dist: no-op when the binary is present, bail when
install.js is absent, wipe a stale dist + path.txt marker and run
electron's downloader with ELECTRON_MIRROR injected, and report failure
when the download still produces no binary.
- `hermes desktop`: the mirror fallback now drives electron's own downloader
before re-running pack, and skips the final pack entirely when the binary
can't be fetched.
Replaces the old mirror test that asserted the (now-fixed) dead behavior of
re-running `npm run pack` with ELECTRON_MIRROR set — pack never downloads
Electron under the pinned electronDist, so that retry could never help.
2026-06-16 15:40:55 -05:00
..
2026-05-27 02:12:27 -07:00
2026-06-08 22:54:25 -07:00
2026-06-08 15:12:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-06-09 14:45:19 -07:00
2026-06-04 05:53:35 -07:00
2026-06-15 05:36:20 +00:00
2026-05-27 00:43:32 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 09:57:10 -07:00
2026-05-28 22:26:25 -07:00
2026-06-13 05:15:26 -07:00
2026-06-13 05:15:26 -07:00
2026-06-16 05:56:11 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 23:21:24 -07:00
2026-05-29 02:24:48 -07:00
2026-06-04 16:54:40 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 14:27:40 -07:00
2026-05-24 04:25:32 -07:00
2026-06-15 05:40:23 -07:00
2026-05-18 20:01:34 -07:00
2026-05-18 10:14:38 -07:00
2026-05-28 22:26:25 -07:00
2026-06-15 05:51:47 -07:00
2026-05-28 15:14:05 +10:00
2026-05-15 14:45:43 -07:00
2026-05-28 22:26:25 -07:00
2026-06-11 09:01:52 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 15:14:05 +10:00
2026-05-28 22:26:25 -07:00
2026-04-29 23:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 15:12:12 -07:00
2026-05-25 01:20:33 -07:00
2026-06-12 13:42:42 -04:00
2026-06-06 18:22:20 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 00:24:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-17 02:29:41 -07:00
2026-06-12 08:51:10 +00:00
2026-05-13 09:34:15 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 19:53:07 +10:00
2026-04-29 23:18:55 -07:00
2026-06-15 20:51:48 +10:00
2026-05-28 22:26:25 -07:00
2026-04-28 01:18:09 -07:00
2026-05-29 23:45:05 -07:00
2026-06-11 05:01:25 +00:00
2026-06-10 20:46:17 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 18:43:40 -07:00
2026-05-07 05:27:47 -07:00
2026-05-07 05:27:47 -07:00
2026-06-07 18:21:03 -07:00
2026-06-07 18:21:03 -07:00
2026-06-01 16:58:58 -07:00
2026-06-01 16:58:58 -07:00
2026-06-13 05:51:05 -07:00
2026-06-06 01:29:41 +05:30
2026-06-15 20:08:39 -07:00
2026-06-02 21:16:41 +10:00
2026-05-27 02:12:27 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 14:02:19 -04:00
2026-06-09 22:57:49 -07:00
2026-06-04 01:02:25 -07:00
2026-05-27 02:12:27 -07:00
2026-06-10 12:14:57 +10:00
2026-05-27 02:12:27 -07:00
2026-06-13 07:18:59 -07:00
2026-05-27 02:12:27 -07:00
2026-06-02 23:43:27 -07:00
2026-06-02 23:43:27 -07:00
2026-04-30 06:43:22 -04:00
2026-06-04 03:03:35 -07:00
2026-05-12 13:59:22 -04:00
2026-06-09 13:56:33 +10:00
2026-06-06 12:43:28 -05:00
2026-06-15 15:33:15 +10:00
2026-06-03 19:37:04 -07:00
2026-06-02 20:49:44 -05:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 11:04:46 -07:00
2026-06-14 02:09:16 -07:00
2026-05-03 03:25:45 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 13:36:33 -07:00
2026-06-15 12:24:46 -07:00
2026-05-28 15:14:05 +10:00
2026-06-15 12:31:23 -07:00
2026-06-01 13:27:30 +10:00
2026-06-10 02:21:00 -07:00
2026-05-13 18:40:14 -07:00
2026-05-28 22:26:25 -07:00
2026-05-04 15:31:15 -04:00
2026-05-28 22:26:25 -07:00
2026-06-11 06:10:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-09 17:54:17 -07:00
2026-05-30 23:05:56 -07:00
2026-06-02 11:59:27 +10:00
2026-05-28 22:26:25 -07:00
2026-06-14 02:20:55 -07:00
2026-06-03 19:37:29 -07:00
2026-06-06 19:53:58 -07:00
2026-06-14 08:42:06 -07:00
2026-06-13 13:47:08 -07:00
2026-05-29 23:45:05 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 01:23:06 -07:00
2026-06-16 15:40:55 -05:00
2026-06-06 18:22:38 -07:00
2026-05-28 22:26:25 -07:00
2026-04-29 20:33:29 -07:00
2026-05-28 00:19:31 -07:00
2026-05-21 19:17:45 -07:00
2026-05-31 17:46:56 -05:00
2026-06-16 13:09:40 -07:00
2026-05-30 01:40:57 -07:00
2026-05-18 20:17:10 -07:00
2026-05-28 21:00:46 -07:00
2026-06-04 07:39:53 -07:00
2026-06-07 23:14:18 -07:00
2026-05-30 01:40:49 -07:00
2026-06-07 09:50:44 -07:00
2026-06-01 20:26:57 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 19:02:55 -07:00
2026-05-18 20:47:01 -07:00
2026-05-31 01:16:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 19:02:55 -07:00
2026-05-23 23:10:36 -07:00
2026-05-07 13:04:41 -07:00
2026-05-07 13:04:41 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 17:50:42 -07:00
2026-06-13 05:50:09 -07:00
2026-05-06 03:50:59 -07:00
2026-05-31 17:46:56 -05:00
2026-05-19 01:28:32 -07:00
2026-06-05 07:54:08 -05:00
2026-06-11 08:59:55 -07:00
2026-06-14 04:24:14 -07:00
2026-06-15 04:22:07 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 04:46:54 -07:00
2026-05-30 07:45:26 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 14:03:02 +10:00
2026-05-20 09:18:23 -07:00
2026-05-31 17:46:56 -05:00
2026-06-10 00:24:06 -07:00
2026-06-13 13:47:08 -07:00
2026-06-10 00:24:06 -07:00
2026-05-31 03:19:37 -07:00
2026-06-13 06:05:30 -07:00
2026-06-14 02:09:16 -07:00
2026-06-16 23:25:07 +05:30
2026-06-04 17:29:31 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 08:51:10 +00:00
2026-06-15 23:24:55 -05:00
2026-05-29 02:24:48 -07:00
2026-06-11 07:51:01 -07:00
2026-06-05 06:43:51 -07:00
2026-05-29 23:45:05 -07:00
2026-05-09 23:17:25 -07:00
2026-06-02 06:31:37 -07:00
2026-05-06 09:08:33 -07:00
2026-05-17 02:29:41 -07:00
2026-05-28 22:26:25 -07:00
2026-06-05 06:55:09 -07:00
2026-05-05 04:37:47 -07:00
2026-05-30 00:22:46 -07:00
2026-05-23 17:49:47 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 08:02:55 +00:00
2026-06-08 17:57:37 +05:30
2026-06-08 17:57:37 +05:30
2026-06-13 13:23:59 -07:00
2026-05-25 01:41:19 -07:00
2026-05-24 18:04:54 -07:00
2026-06-12 10:57:25 +05:30
2026-05-09 13:02:25 -07:00
2026-05-17 13:54:12 -07:00
2026-06-07 21:50:57 -07:00
2026-05-28 22:26:25 -07:00
2026-06-15 11:43:23 +10:00
2026-06-14 16:30:23 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-30 02:53:42 -07:00
2026-05-28 22:26:25 -07:00
2026-05-31 15:02:26 -07:00
2026-06-16 23:25:07 +05:30
2026-05-29 02:24:48 -07:00
2026-05-28 02:36:09 -07:00
2026-06-08 07:03:12 -07:00
2026-05-31 03:19:37 -07:00
2026-05-07 05:10:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 14:27:40 -07:00
2026-06-08 10:01:47 -07:00
2026-05-28 03:34:47 -07:00
2026-06-10 14:39:03 -07:00
2026-06-13 02:36:09 -07:00
2026-05-25 01:20:33 -07:00
2026-06-06 18:36:40 -07:00
2026-05-12 01:02:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 11:48:06 -07:00
2026-06-15 14:02:10 +10:00
2026-05-28 22:26:25 -07:00
2026-05-10 13:06:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-02 02:08:06 -07:00
2026-05-15 10:36:38 +05:30
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-01 16:58:58 -07:00
2026-06-05 04:06:17 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 09:42:44 -07:00
2026-05-19 01:28:32 -07:00
2026-05-25 01:20:33 -07:00
2026-05-31 09:13:06 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 11:59:58 -07:00
2026-06-14 22:54:54 +05:30
2026-06-10 01:02:40 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-08 17:01:12 -07:00
2026-05-07 05:53:14 -07:00
2026-05-08 16:07:23 -07:00
2026-06-10 21:39:22 -04:00
2026-06-04 01:19:28 +05:30
2026-06-07 22:18:14 -07:00
2026-06-07 22:56:23 -07:00
2026-06-13 05:14:59 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-11 19:06:29 -04:00
2026-06-07 21:50:57 -07:00
2026-05-08 11:18:14 -07:00
2026-06-14 03:08:52 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 00:24:06 -07:00
2026-05-25 01:47:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-14 16:47:57 -07:00
2026-05-24 18:04:54 -07:00
2026-05-28 22:26:25 -07:00
2026-06-03 16:40:28 -07:00
2026-05-27 22:03:45 -05:00
2026-06-11 09:00:55 -07:00
2026-06-09 00:31:27 -07:00
2026-06-04 02:31:49 -07:00
2026-06-15 06:18:27 -07:00
2026-06-11 12:45:07 +05:30
2026-06-13 10:46:08 -07:00
2026-05-28 22:26:25 -07:00
2026-06-10 02:57:05 -07:00
2026-05-19 03:01:02 -07:00
2026-06-03 04:59:49 -07:00
2026-05-08 14:55:40 -07:00
2026-05-28 22:26:25 -07:00
2026-06-16 13:07:52 -07:00
2026-06-04 23:20:29 -04:00
2026-06-06 12:50:58 -05:00
2026-05-15 12:11:32 -07:00
2026-05-06 15:49:59 -07:00
2026-06-16 00:08:21 -05:00
2026-05-25 01:15:24 -07:00
2026-06-15 23:50:19 -05:00
2026-06-11 09:41:35 -07:00
2026-05-24 15:00:44 -07:00
2026-06-12 02:09:28 -07:00
2026-05-24 17:47:24 -07:00
2026-06-11 09:46:15 -07:00
2026-06-08 11:32:43 -07:00
2026-06-04 07:49:34 -07:00
2026-06-11 06:10:27 -07:00
2026-06-12 12:58:36 -07:00
2026-06-15 20:08:39 -07:00
2026-06-11 11:49:08 -07:00
2026-05-28 22:26:25 -07:00
2026-05-23 01:07:01 -04:00
2026-05-28 22:26:25 -07:00
2026-06-08 11:32:43 -07:00
2026-06-07 18:28:23 -07:00
2026-06-09 23:21:24 -07:00
2026-05-17 12:35:01 -07:00
2026-06-15 17:03:35 +05:30
2026-06-15 05:40:23 -07:00
2026-06-15 17:08:19 +05:30
2026-05-24 18:12:16 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00