Skip to content

Desktop: Fixes #15030: Upgrade electron-builder - #15043

Merged
laurent22 merged 19 commits into
laurent22:devfrom
personalizedrefrigerator:pr/desktop/electron-builder-26-8-1
Jul 28, 2026
Merged

Desktop: Fixes #15030: Upgrade electron-builder#15043
laurent22 merged 19 commits into
laurent22:devfrom
personalizedrefrigerator:pr/desktop/electron-builder-26-8-1

Conversation

@personalizedrefrigerator

@personalizedrefrigerator personalizedrefrigerator commented Apr 7, 2026

Copy link
Copy Markdown
Collaborator

Problem

Joplin currently uses a version of electron-builder that:

  • creates AppImages that depend on a deprecated libfuse2 library. This makes the installation process more difficult (users need to install libfuse2).
  • fails to build AppImages for ARM64 Linux.

Solution

Note

This pull request is a modified version of @JGCarroll's #15032.

Upgrade electron-builder and instruct Electron Builder to use a modern AppImage runtime (see #15032).

Resolves #15030.

Testing

MacOS 26.4 (ARM64)

After running the steps for building an ARM64 MacOS package and the steps for also creating a .pkg file, I:

  1. Verified that yarn dist can build a .dmg and .pkg file.
  2. Verified that the .dmg filesize hasn't significantly increased (current size: 202 MB).
  3. Installed the .dmg file.
  4. Verified that default plugins load (e.g. it's possible to create a backup).

Windows 11 (x86_64)

  1. Built the Windows installer and portable files (yarn dist from packages/app-desktop).
  2. Verified that JoplinPortable.exe starts successfully and displays the welcome notes.
  3. Quit Joplin.
  4. Uninstalled the existing Joplin version from system settings > installed apps.
  5. Installed an older Joplin 3.6.14.
  6. Installed Joplin 3.7.9 using the Joplin Setup 3.7.9.exe built in step 1.
  7. Verified that the installer completes successfully.
  8. Verified that the installed version of Joplin starts successfully and can sync with the file system.

Note

With this change, the built Joplin Setup 3.7.9.exe is 537 MB. Prior to this change, a built Joplin Setup 3.7.9.exe on the same VM is 525 MB.

Fedora 44, GNOME (x86_64)

  1. Build the AppImage (yarn dist from packages/app-desktop).
  2. Ran the AppImage (./dist/Joplin-3.7.9.AppImage).
  3. Verified that:
    1. Notes can be opened in secondary windows
    2. Print-to-PDF works
    3. The default plugins (drawing & backup) load.
  4. Copied the AppImage to ~/.joplin/Joplin.AppImage.
  5. Started Joplin via a previously-installed .desktop entry.
  6. Verified that the window icons are correct.

Ubuntu 26.04, GNOME (x86_64)

  1. Build the AppImage and deb (yarn dist from packages/app-desktop).
  2. Verify that the AppImage starts successfully.
  3. Install the deb.
  4. Verify that Joplin starts successfully from the deb. Verify that primary and secondary windows both have the correct icons.

Install script

Note: Install script testing was done with an earlier version of this pull request.

  • Running bash Joplin_install_and_update.sh without libfuse2 installed fails with "Error: Can't get libfuse2 on system, please install libfuse2".
  • When hosting the AppImage locally and patching the install script to use the locally-hosted AppImage,
    • The AppImage downloads successfully (without libfuse2)
    • It's possible to launch the AppImage from the application menu
  • After installing libfuse2t64, reverting the install script patch, and removing the previously-installed AppImage, it's possible to install Joplin 3.5.13. Joplin 3.5.13 can be launched from the application menu.

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9cf0d0ff-6d65-4b4a-a6ba-c7d92fbe0bb8

📥 Commits

Reviewing files that changed from the base of the PR and between 9186265 and dafa250.

📒 Files selected for processing (1)
  • Joplin_install_and_update.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • Joplin_install_and_update.sh

📝 Walkthrough

Walkthrough

The installer resolves releases before dependency checks and gates libfuse2 verification to versions below 3.7.10. Electron Builder signing, Linux metadata, AppImage tooling, dependency versions, and Yarn resolutions are updated.

Changes

Installer and release-dependent checks

Layer / File(s) Summary
Release resolution and libfuse gating
Joplin_install_and_update.sh
Resolves the selected release before dependency checks and performs libfuse.so.2 checks only when RELEASE_VERSION is below 3.7.10, with guarded ldconfig use.

Electron Builder packaging

Layer / File(s) Summary
Builder configuration and dependency update
packages/app-desktop/package.json
Moves Windows signing options and Linux desktop metadata into nested Electron Builder configuration, adds AppImage toolset 1.0.3, and updates electron-builder to 26.9.0.

Yarn resolutions

Layer / File(s) Summary
Resolution updates
package.json
Removes older app-builder-lib patches and adds a patched resolution for app-builder-lib@npm:26.15.6.

Sequence Diagram(s)

sequenceDiagram
  participant Installer
  participant GitHub
  participant System
  Installer->>GitHub: Request latest or prerelease release
  GitHub-->>Installer: Return RELEASE_VERSION
  alt RELEASE_VERSION < 3.7.10
    Installer->>System: Check ldconfig and libfuse.so.2
  else RELEASE_VERSION >= 3.7.10
    Installer->>Installer: Skip libfuse dependency check
  end
  Installer->>GitHub: Download Joplin release
Loading

Suggested labels: bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the desktop electron-builder upgrade and references the linked issue.
Description check ✅ Passed The description matches the changeset by explaining the electron-builder upgrade and the AppImage/libfuse2 fix.
Linked Issues check ✅ Passed The changes implement the requested AppImage runtime update to remove the deprecated FUSE2 dependency for #15030.
Out of Scope Changes check ✅ Passed The modified install-script and package configuration changes are aligned with the AppImage/runtime upgrade and are not out of scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Joplin_install_and_update.sh`:
- Around line 182-197: The libfuse2 gating uses compareVersions with
RELEASE_VERSION which can contain prerelease suffixes (e.g., "3.6.9-pre1")
causing numeric compare failures; sanitize the version before the check by
stripping any prerelease suffix (remove everything after the first '-' from
RELEASE_VERSION) and use that sanitized value in the compareVersions call used
in the libfuse2 block (referencing compareVersions and RELEASE_VERSION), or
alternatively enhance compareVersions to ignore non-numeric patch suffixes;
ensure the sanitized variable is used in the existing libfuse2 check so
prereleases are treated by their core numeric version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f5a55608-1d2b-402b-a8b2-cbf0fcd22506

📥 Commits

Reviewing files that changed from the base of the PR and between 9e99750 and b4c7a78.

⛔ Files ignored due to path filters (3)
  • .yarn/patches/app-builder-lib-npm-24.13.3-86a66c0bf3.patch is excluded by !**/.yarn/**
  • .yarn/patches/app-builder-lib-npm-26.8.1-e88d27929a.patch is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • Joplin_install_and_update.sh
  • package.json
  • packages/app-desktop/package.json

Comment thread Joplin_install_and_update.sh
Note: This change addresses issues found by Claude Code during a
review.
@JGCarroll

JGCarroll commented Apr 7, 2026

Copy link
Copy Markdown

Build currently doesn't seem to work in Ubuntu 26.04 beta (error: version `GLIBC_2.43' not found (required by basename) while running yarn dist). However, the AppImage and .deb files built on Fedora 43 seem to work:

Created electron-userland/electron-builder-binaries#147 as this is a problem with the bundled mksquashfs tooling.

Since Joplin releases are built in 22.04 runners, this isn't really a problem from a packaging POV as the AppImage would still be forwards compatible as it currently is. However it does potentially cause friction with contributions from users.

This would mean the toolsets value currently set to 1.0.2 would need updating when upstream releases a new bundle, which itself might need another electron-builder version bump to accept the schema (currently 1.0.2 is the only valid option).

At this point I think it's worth verifying whether the stable 3.5 series AppImage does actually run in Fedora 44 - explicitly confirming Fedora has dropped libfuse2 entirely, before deciding whether to wait for a fix for this ABI incompatibility. The breakage here looks like it would only effect contributors, not end users, so long as the CI keeps running on 22.04, which the CI shows builds fine. If there's no need to urgently change the AppImage we could push this back til the issue above is fixed and the tooling is updated to make use of it.

If Fedora 44 has removed libfuse2 entirely however, then I guess there's a decision to be made to break users or contributors, at least those on Ubuntu 26.04 who would actually run yarn dist specifically.

Edit: I have tested Fedora 44 Workstation in a VM, the urgency of this fix has gone down since installing fuse-libs still includes libfuse2.so - there's functionally no difference to the current status quo. It may be worth drafting this until the upstream issue is resolved. I'll update the relevant issue to make it clear that it's not end the end times just yet :)

@personalizedrefrigerator personalizedrefrigerator changed the title Linux: Fixes #15030: Support Fedora 44: Upgrade electron-builder Linux: Fixes #15030: Upgrade electron-builder Apr 8, 2026
@JGCarroll

Copy link
Copy Markdown

https://github.com/electron-userland/electron-builder/releases/tag/electron-builder%4026.9.0

I'd tried build this branch, changing the electron-builder version to 26.9.0 - this allows then changing the ToolSet version to 1.0.3

Unfortunately, depd is playing up again, and I'm still too Electron newbie to tackle that.

From the release notes for 26.9.0:

fix(appimage): add entry for patched appimage toolset bundle to resolve issues on Ubuntu 25.1.0 by @mmaietta in electron-userland/electron-builder#9673

This looks relevant to our issue above (looking in the Electron-Builder commits, there were some changes to libm before I'd created the issue above), but also

feat(appimage): If necessary, start with --no-sandbox by @sabonerune in electron-userland/electron-builder#9590

This is worth investigating (does it mean we can drop the --no-sandbox logic from the install script as part of this PR?)

@personalizedrefrigerator

Copy link
Copy Markdown
Collaborator Author

I've bumped the electron-builder version to v26.9.0!

Note: As of April 30th, electron-builder v26.9.0 is still a pre-release (tagged as next on NPM).

@coderabbitai coderabbitai Bot removed enhancement Feature requests and code enhancements desktop All desktop platforms linux labels Apr 30, 2026
Comment thread packages/app-desktop/package.json Outdated
"artifactName": "Joplin-${version}.${ext}"
},
"toolsets": {
"appimage": "1.0.2"

@JGCarroll JGCarroll Apr 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs increasing to 1.0.3 to fix the Ubuntu 26.04 issues

@coderabbitai coderabbitai Bot added desktop All desktop platforms linux labels Apr 30, 2026
This pull request now targets the v3.7 release. The first prerelease that doesn't require libfuse2 will be at least v3.7.0.
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

@personalizedrefrigerator the pull request title does not match the required format.

Please prefix the title with the area you are targeting, then add the issue you are addressing. For example:

  • Desktop: Resolves #123: Added new setting to change font
  • Mobile, Desktop: Fixes #456: Fixed config screen error
  • All: Resolves #777: Made synchronisation faster

See the pull request template for the list of valid prefixes and the full specification.

This PR has been left open — please update the title when you have a moment.

@coderabbitai coderabbitai Bot removed desktop All desktop platforms linux labels May 8, 2026
@personalizedrefrigerator personalizedrefrigerator changed the title Linux: Fixes #15030: Upgrade electron-builder Desktop: Fixes #15030: Upgrade electron-builder May 8, 2026
@coderabbitai coderabbitai Bot added enhancement Feature requests and code enhancements desktop All desktop platforms linux macOS windows labels May 8, 2026
@laurent22

Copy link
Copy Markdown
Owner

@personalizedrefrigerator, what is the status of this PR? Do we still need this?

@personalizedrefrigerator

Copy link
Copy Markdown
Collaborator Author

@personalizedrefrigerator, what is the status of this PR? Do we still need this?

This pull request removes the need for libfuse2, but causes issues with the Windows installer. It would be good to have, since it simplifies the Linux installation process, but the Windows installer issues would need to be fixed first.

@laurent22

Copy link
Copy Markdown
Owner

I'm closing the PR for now but feel free to reopen when it's ready to merge

@laurent22 laurent22 closed this May 19, 2026
@personalizedrefrigerator

Copy link
Copy Markdown
Collaborator Author

Note: As of April 30th, electron-builder v26.9.0 is still a pre-release (tagged as next on NPM).

A stable electron-builder v26.15.6 has been released and seems to work well on Linux (Ubuntu 26.04)! It also doesn't seem to need the yarn resolution patch. If testing is successful on MacOS and Windows, I plan to re-open this pull request.

@personalizedrefrigerator

Copy link
Copy Markdown
Collaborator Author

I'm marking this as ready for review: I've switched this pull request to electron-builder v26.15.6 and updated the "Testing" section of the PR description.

@personalizedrefrigerator
personalizedrefrigerator marked this pull request as ready for review July 27, 2026 23:23

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 149: Update the indentation of the added app-builder-lib dependency entry
in package.json to use tabs instead of spaces, matching the repository’s JSON
formatting convention without changing the dependency declaration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d4702b31-a721-4d2b-8934-2b617444ead0

📥 Commits

Reviewing files that changed from the base of the PR and between 7e2b37e and 9186265.

⛔ Files ignored due to path filters (1)
  • .yarn/patches/app-builder-lib-npm-26.15.6-010811df92.patch is excluded by !**/.yarn/**
📒 Files selected for processing (1)
  • package.json

Comment thread package.json
@coderabbitai coderabbitai Bot added the bug It's a bug label Jul 27, 2026
@laurent22
laurent22 merged commit 7990ec7 into laurent22:dev Jul 28, 2026
13 of 16 checks passed
@personalizedrefrigerator
personalizedrefrigerator deleted the pr/desktop/electron-builder-26-8-1 branch July 28, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug It's a bug desktop All desktop platforms enhancement Feature requests and code enhancements linux macOS v3.7 windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AppImage relies on deprecated FUSE2

3 participants