electron-builder: Breaking change in electron-updater 4.3.10

  • Version: 4.3.10
  • Electron Version: Effects Electron 11 and before. Does not effect Electron 12 or later.
  • Target: All

Electron-updater has introduced fs/promises which will break the build on Electron 11 and earlier. This is because fs/promises is not supported in Node 12 (which is used by Electron 11). The change was introduced in this PR: https://github.com/electron-userland/electron-builder/pull/5890

This is a critical issue for anybody on Electron 11 or earlier because it will break their application after an update and it is not possible to recover by pushing a fix in an update.

The best mitigation that I think of here is to publish a 4.3.11 that does not use fs/promises. If you want to use fs/promises then you can publish 5.0.0 that uses fs/promises.

electron-updater

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 8
  • Comments: 26 (6 by maintainers)

Commits related to this issue

Most upvoted comments

4.3.9 is marked as latest again for now.

4.3.10 was marked as a next for a two months.

@davej: I’m publishing a temp nuget package with the fixes your PR (and including also the fix for the splashscreen that has been long pending). It’s based on my fork here: https://github.com/theolivenbaum/Electron.NET

If you want to use it, you’ll need to:

As this is now using Electron12, you also need to add this to your CreateWindow calls:

Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
{
   // ...
    WebPreferences = new WebPreferences()
    {
        NodeIntegration = true,
        ContextIsolation = false
    },
   // ...

We’re using this one till it’s fixed upstream, and testing if everything still works. If you want to use it for now and hit anything, drop me an email to rafael (at) curiosity (dot) ai

Cheers for that. Gregor is reviewing the PR’s Thursday evening so hopefully we’ll have an update shortly after.

@davej: I’m publishing a temp nuget package with the fixes your PR (and including also the fix for the splashscreen that has been long pending). It’s based on my fork here: https://github.com/theolivenbaum/Electron.NET

If you want to use it, you’ll need to:

As this is now using Electron12, you also need to add this to your CreateWindow calls:

Electron.WindowManager.CreateWindowAsync(new BrowserWindowOptions
{
   // ...
    WebPreferences = new WebPreferences()
    {
        NodeIntegration = true,
        ContextIsolation = false
    },
   // ...

We’re using this one till it’s fixed upstream, and testing if everything still works. If you want to use it for now and hit anything, drop me an email to rafael (at) curiosity (dot) ai

I solved this problem by specifying the version in package.json

Most electron builder users won’t be aware of this issue before they publish a new release of their app. For this reason, it’s best to fix this in a patch release.

。。。I solved this problem by specifying the version in package.json

That would be a temporary fix. However, we’re using the Electron.NET package which uses a CLI to build our apps. Therefore we can’t just change it. With a breaking change such as this, it shouldn’t have been placed as a minor version.

Yes, I also use Electron.NET, this problem has troubled me for a long time, I directly modified the CLI

Nice. I have put a PR in to upgrade us to Electron 12.0.12 and Tweeted Gregor. No PR’s since Jan makes for a sad dev team.

。。。I solved this problem by specifying the version in package.json

That would be a temporary fix. However, we’re using the Electron.NET package which uses a CLI to build our apps. Therefore we can’t just change it. With a breaking change such as this, it shouldn’t have been placed as a minor version.

Yes, I also use Electron.NET, this problem has troubled me for a long time, I directly modified the CLI

I got the same problem