Skip to content

Revert electron-builder to ^26.0.12 — snaps built with 26.12+ fail to launch#6048

Closed
dantovska wants to merge 1 commit into
mainfrom
bugfix/revert-electron-builder-snap-regression
Closed

Revert electron-builder to ^26.0.12 — snaps built with 26.12+ fail to launch#6048
dantovska wants to merge 1 commit into
mainfrom
bugfix/revert-electron-builder-snap-regression

Conversation

@dantovska

@dantovska dantovska commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What

Reverts the electron-builder bump 26.0.12 → 26.15.2 (#6026). Every snap built since the bump fails to launch — including the 3.6.0 pre-release:

/snap/redisinsight/x1/command.sh: line 2: /snap/redisinsight/x1/desktop-init.sh: No such file or directory

Root cause: electron-builder ≥26.12 replaced the Go app-builder with a TypeScript reimplementation (electron-userland/electron-builder#9829) whose archive extractor handles .tar.xz in two stages (7z decompress + untar) but routes .tar.7z — the snap template format — into the plain .7z branch, which never untars the inner tar. The built snap ships a stray snap-template-electron-4.0-2-amd64.tar at its root instead of the desktop-integration launch scripts referenced by command.sh. Verified empirically; still broken in 26.15.3. deb/rpm/AppImage targets are unaffected.

The bump's Wayland motivation (upstream electron-userland/electron-builder#9452) doesn't apply to our config: forceX11 only exists in the new core24/snapcraft-CLI path, while our legacy snap config gets DISABLE_WAYLAND=1 — which 26.0.12 already sets by default. Confirmed on GNOME Wayland Ubuntu 24.04 that the released 26.0.12-built snap launches fine.

Re-bump only after upstream fixes .tar.7z extraction; the proper future Wayland improvement is migrating to snapcraft.core24 + forceX11 (requires snapcraft CLI on runners).

Testing

  • yarn install green in a clean worktree; lockfile stable (frozen-lockfile gate will pass)
  • After rebuild, on Ubuntu: sudo snap install --dangerous <snap> must launch, and ls /snap/redisinsight/current/ must list desktop-init.sh, desktop-common.sh, desktop-gnome-specific.sh with no snap-template*.tar

🤖 Generated with Claude Code


Note

Medium Risk
Packaging regression risk is limited to restoring a known-good snap toolchain; the main concern is staying on an older electron-builder until upstream fixes .tar.7z extraction.

Overview
Downgrades electron-builder from ^26.15.2 to ^26.0.12 and refreshes yarn.lock so Linux snap builds use the older packaging stack again.

The snap block in electron-builder.json drops allowNativeWayland: false, leaving only stagePackages: ["default"] alongside existing plugs/confinement.

This is a targeted rollback: newer electron-builder mishandles snap template archives (.tar.7z), so snaps ship without desktop launch scripts and fail at startup; deb/rpm/AppImage are unchanged.

Reviewed by Cursor Bugbot for commit a7832d4. Bugbot is set up for automated code reviews on this repo. Configure here.

…packaging

Reverts the bump to 26.15.2 (#6026). electron-builder >=26.12 replaced the
Go app-builder with a TS reimplementation whose archive extractor never
untars the inner tar of the snap template (.tar.7z): the built snap ships
a stray snap-template-electron-4.0-2-amd64.tar at its root instead of the
desktop-integration scripts, and command.sh fails at line 2 with
"desktop-init.sh: No such file or directory". Every snap built since the
bump is unlaunchable, including the 3.6.0 pre-release. deb/rpm/AppImage
are unaffected. Still broken upstream as of 26.15.3.

The bump's Wayland motivation does not apply to our config: forceX11 only
exists in the new core24/snapcraft path, while the legacy snap config gets
DISABLE_WAYLAND=1, which 26.0.12 already sets by default. Verified the
26.0.12-built released snap launches fine on GNOME Wayland Ubuntu 24.04.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dantovska dantovska requested a review from a team as a code owner June 10, 2026 13:31

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7832d49b5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread package.json
"dotenv": "^16.4.5",
"electron": "^40.10.2",
"electron-builder": "^26.15.2",
"electron-builder": "^26.0.12",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin electron-builder below the broken 26.12 line

Because this remains a caret range, any future lockfile refresh or dependency upgrade can legally resolve electron-builder back to 26.12+ (including the just-reverted 26.15.2), reintroducing the snap launch failure this commit is trying to avoid. The current yarn.lock masks it for frozen installs, but the package constraint should be exact 26.0.12 or otherwise capped below 26.12.0 so the known-bad versions cannot be selected again.

Useful? React with 👍 / 👎.

@jit-ci

jit-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@dantovska

Copy link
Copy Markdown
Contributor Author

Closing per team direction: instead of reverting, we're fixing forward on electron-builder 26.15.2 with a patch-package patch for the .tar.7z template extraction, targeting release/3.6.0. Replacement PR incoming.

@dantovska dantovska closed this Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage - Backend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 92.72% 15709/16943
🟡 Branches 74.7% 4949/6625
🟢 Functions 86.87% 2447/2817
🟢 Lines 92.55% 15014/16222

Test suite run success

3454 tests passing in 309 suites.

Report generated by 🧪jest coverage report action from a7832d4

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage - Frontend unit tests

St.
Category Percentage Covered / Total
🟢 Statements 83.19% 25286/30397
🟡 Branches 68.46% 10668/15582
🟡 Functions 78.31% 6793/8674
🟢 Lines 83.65% 24683/29509

Test suite run success

7150 tests passing in 814 suites.

Report generated by 🧪jest coverage report action from a7832d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant