App: [HOLD for payment 2024-03-13] [$500] Upgrade Electron package to latest version

Problem

Electron is a core part of our app and we are currently several major versions behind. We should be up to date in order to gain the benefit of up-to-date security patches and also added functionality. One example is that https://github.com/Expensify/App/issues/34829 will be partially fixed when this Electron issue gets closed, but only if we are on the most recent version.

Solution

Upgrade to the most recent stable version of Electron. As of the time of writing this issue that is major version 28 but major version 29 should become the new latest stable version sometime in February. Keep that in mind as this issue progresses.

Note: for testing make sure to test the electron auto updater

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01411beff5fb7fab7c
  • Upwork Job ID: 1753189399602946048
  • Last Price Increase: 2024-02-15
  • Automatic offers:
    • jeremy-croff | Contributor | 0

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 31 (19 by maintainers)

Most upvoted comments

@MitchExpensify checklist not applicable because this isn’t a bug / feature

@jeremy-croff @rushatgabhane are you both still good to work on this?

Can start today

Not overdue. Tomorrow the newest version of electron comes out and then we can start the upgrade.

@blimpich @MitchExpensify There’s some turbulence with the expected fix. Latest is that the occlusion fix got reverted: https://github.com/electron/electron/pull/41311 And there’s a new draft open for the feature.

📣 It’s been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@jeremy-croff Not sure if I understand, do you mean one proposal for the major version upgrade and one proposal for the minor version upgrade? If so, no, just the major. Or really simply the latest version once 29 is released.

We don’t need to wait for the upstream fix in my opinion. Once we are updated to the latest major version there will be little risk in bumping the minor version needed to make use of that upstream Electron PR. This can be done in parallel. And actually I’d prefer that this be done in parallel so that we can sort out any issues / regression that bumping the major version might cause now rather than later.

However, after thinking about it, I would like this upgrade to be done once the latest Electron major version is released on February 20th. So lets table this issue until then. Hopefully the upstream issue is fixed by then and we get two birds with one stone.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Need to update electron

What is the root cause of that problem?

Visibility bug will improve our user experience on electron

What changes do you think we should make in order to solve the problem?

We should wait for the next major version to get released around feb 20th. Only then upgrade to that electron version with the steps documented in https://github.com/Expensify/App/blob/4f103255b77271d60666d39a0670104d113c44b5/desktop/README.md#testing-electron-auto-update.

I did a spot check against https://www.electronjs.org/docs/latest/breaking-changes make sure we don’t have any larger migration changes needed. As all the deprecated and breaking changes are not used in our app yet.

What alternative solutions did you explore? (Optional)