On this page · 4 sections
  1. Electron 46.0.0-alpha.1: Am I affected by the breaking changes?
  2. Electron 45: Permissions and presets for sandboxed apps
  3. Upgrade checklist
  4. Sources

TL;DR

Electron 46.0.0-alpha.1, which its notes label an alpha, and Electron 45 both change APIs that Electron apps may depend on. The changes cover sandboxed preload globals, synchronous safeStorage calls, screen-capture permissions, image sizes from capturePage() and Windows crash reporting. Teams shipping on Electron 45 and anyone testing the alpha should audit these before upgrading.

ChangeWho is affectedAction
Sandboxed preload globals and modules removed (46.0.0-alpha.1, 45)Apps whose sandboxed preload scripts use Buffer, setImmediate, clearImmediate, events, timers or urlUse Web APIs or bundle polyfills
Synchronous safeStorage methods removed (46.0.0-alpha.1)Apps calling safeStorage.isEncryptionAvailable(), encryptString() or decryptString()Move to the async variants
Screen capture uses the display-capture permission (45)Apps with a session.setPermissionRequestHandler() that grants only mediaAlso grant display-capture
Images from capturePage() use the device scale factor (46.0.0-alpha.1)Apps reading image.getSize() on HiDPI displaysTreat the size as DIPs, not pixels
Windows Error Reporting helper (46.0.0-alpha.1, 45)Windows apps that call crashReporter.start()Rename the helper DLL to match the executable
contentTracing heap profiling moved to Perfetto (46.0.0-alpha.1, 45)Apps that record heap profiles with contentTracingUse the nativeHeapProfiling option and the Perfetto format
utilityProcess child.kill() sends SIGTERM (46.0.0-alpha.1)Apps that stop utility processes on POSIXConfirm the child handles SIGTERM

Electron 46.0.0-alpha.1: Am I affected by the breaking changes? #

Yes, if your app runs sandboxed preloads, calls the synchronous safeStorage methods, or reads image sizes from captured pages, because the Electron 46.0.0-alpha.1 release notes list each of these as breaking. The notes say the alpha should be installed with npm install electron@alpha, and that bugs found in it should be filed as new issues. The breaking changes below are listed in that order.

The alpha removes the synchronous safeStorage.isEncryptionAvailable(), safeStorage.encryptString() and safeStorage.decryptString() methods, and the notes direct developers to isAsyncEncryptionAvailable(), encryptStringAsync() and decryptStringAsync() instead (#53662). Code that calls the old methods will need changes to use the async versions. The alpha also removes the events, timers and url modules and the Buffer, setImmediate and clearImmediate globals from sandboxed preload scripts, and tells developers to use a polyfill (#53891).

Image sizes from captured pages change on HiDPI displays. The notes state that webContents.capturePage(), the offscreen paint event and webContents.beginFrameSubscription() now return images with the page's device scale factor, so image.getSize() is in DIPs rather than pixels (#53813). The same entry says nativeImage.toJPEG() no longer returns an empty buffer for images without a 1x representation. Code that compares captured image sizes with pixel dimensions should be reviewed against this.

The alpha also changes how child processes stop. child.kill() on utilityProcess now sends SIGTERM on POSIX, like child_process.kill(), and no longer force-kills a child that handles the signal (#53992). Heap profiling in contentTracing recordings now uses a Perfetto heap-profiling data source (#53349, also in 45).

Electron 46.0.0-alpha.1: New features #

The alpha adds a globalShortcut registration-resolved event on Linux that reports whether the Wayland GlobalShortcuts portal bound a registered accelerator (#52224). It also adds app.canDeElevate() and app.relaunch({ deElevate }) on Windows (#54383), and experimental Widevine CDM support with bundled CDM lookup (#50046). Preload registration gains matches, excludeMatches, includeGlobs, excludeGlobs and matchOriginAsFallback options for session.registerPreloadScript (#54903).

Several request and process events gain more context. Requests carry initiatorOrigin, DownloadItem.getInitiatorOrigin() is added, and the will-download and preconnect session events receive a trailing frame argument (#53685, also in 43, 44 and 45). The app child-process-gone event reports systemErrorCode for launch failures (#53946, also in 44 and 45). The alpha also supports Notification action buttons on Linux (#54516, also in 44 and 45), experimental protocol.registerSource() (#53220, also in 44 and 45), and Wayland restore-token support in desktopCapturer.getSources() (#54550).

Several smaller additions are listed in the alpha notes:

  • A Windows Error Reporting helper, electron_wer.dll, renamed to <app>_wer.dll alongside the executable, so crashReporter can capture __fastfail crashes (#53802, also in 45).
  • App shims on macOS that show windows under another app's Dock icon (#54932, also in 44 and 45).
  • The ELECTRON_DEBUG_DRAGGABLE_REGIONS environment variable for unpackaged apps (#53598, also in 43, 44 and 45).
  • Validation in protocol.registerSchemesAsPrivileged() that rejects names outside the RFC 3986 scheme grammar (#52519, also in 44 and 45).

Electron 46.0.0-alpha.1: Fixes and changes #

The alpha lists a set of crash and stability fixes, several of which are backported to earlier lines as the notes indicate. Some examples are:

  • A renderer crash when an iframe was removed after loading with nodeIntegrationInSubFrames enabled (#53833, also in 42, 43, 44 and 45).
  • A main-process crash when onSendHeaders observed Blob uploads (#55085, also in 44 and 45).
  • A crash in ses.clearData() after a DownloadItem was garbage collected (#54961).
  • A crash on navigator.usb.requestDevice() in in-memory sessions (#54608, also in 44 and 45).
  • A memory leak on Windows when app.getPreferredSystemLanguages() was called (#53853, also in 43, 44 and 45).

The alpha also changes the default trash implementation on KDE Plasma 6 to kioclient (#54092, also in 44 and 45) and aligns DevTools zoom steps with Chromium (#54349, also in 44 and 45). The excerpt ends partway through the fix list, so later alpha fixes are not covered here.

Electron 45: Permissions and presets for sandboxed apps #

Screen sharing now arrives under a different permission type. The Electron 45 blog post states that requests to capture the screen, a window or a tab are passed to session.setPermissionRequestHandler() as display-capture rather than media (#52824). Apps that grant media and deny everything else will break screen sharing unless they also grant the new type.

"Applications with a permission handler that grants media and denies everything else must also grant display-capture , or screen sharing will stop working."

Electron 45 blog post

The same sandboxed preload removals appear in the Electron 45 blog post, which says the preload scripts no longer include Buffer, setImmediate, clearImmediate, or the events, timers and url shims. The post advises updating affected preloads to use Web APIs or to bundle the polyfills they need before upgrading.

Electron 45: Performance #

Sandboxed renderers avoid Electron's JavaScript bootstrap bundle unless webviewTag is enabled, and macOS cold launch prefetches the framework's files. Menus are now built natively, and calls to native methods and properties on windows, views and web contents have less overhead, according to the Electron 45 blog post. The post also says that files inside ASAR archives are read directly from the archive, and that cold reads of large packed files are "up to 100x faster". This suggests that apps with large packed assets are the most likely to notice the change, though the post does not measure a particular setup.

Electron 45: Local AI, passkeys and crash reporting #

Electron 45 adds experimental Prompt API support through session.registerLocalAIHandler(), a localAIHandler module and LanguageModelUtility, and the post says Electron does not bundle a model or inference engine (#50659). On macOS, app.configureWebAuthn() gains platform passkeys with platformPasskeys: true, and a select-webauthn-authenticator session event lets apps choose between Touch ID and platform passkeys (#51563). The post notes that system passkeys can sync across devices, unlike device-bound Touch ID credentials.

The Windows Error Reporting helper is registered when crashReporter.start() is called and captures __fastfail crashes on Windows 10 20H1 and later (#53851). The post says that if electron.exe is renamed to myapp.exe, electron_wer.dll must also be renamed to myapp_wer.dll, because Windows loads the helper only when the names match.

Native heap profiling moved to Perfetto. Passing nativeHeapProfiling to contentTracing.startRecording() collects sampled C/C++ allocations, and the post says this replaces the experimental contentTracing.enableHeapProfiling() (#54863). samplingInterval is the average number of allocated bytes between samples, and lower values give more detail at a higher performance cost:

JavaScript
const { app, contentTracing } = require('electron');
const { setTimeout } = require('node:timers/promises');

app.whenReady().then(async () => {
  await contentTracing.startRecording({
    nativeHeapProfiling: {
      samplingInterval: 128 * 1024,
    },
  });
  await setTimeout(10_000);
  const tracePath = await contentTracing.stopRecording();
  console.log(`Trace saved to ${tracePath}`);
});

Electron 45: Other changes #

The release updates Chromium from 152.0.7977.54 to 156.0.8078.48, Node.js from v24.18.1 to v24.22.0, and V8 from 15.2 to 15.6. Other changes listed in the post include:

  • Added disableWakeLocks to webPreferences, so page activity such as audio playback no longer prevents sleep (#52342).
  • Added webFrame.getIsolatedWorlds() and the isolated-world-created event (#50633).
  • Reduced IPC dispatch overhead by delivering messages to JavaScript listeners natively (#53957).
  • Improved the performance of computing draggable regions in windows with many -webkit-app-region: drag elements (#53596).

The post refers to the full Electron 45.0.0 release notes, which are not part of the provided source material, so this article covers only the post's list.

Upgrade checklist #

Audit sandboxed preloads and permission handlers before any upgrade. The steps below apply to both Electron 45 and the 46.0.0-alpha.1 notes, in the order a team would usually take them.

  1. Search your sandboxed preload scripts for Buffer, setImmediate, clearImmediate, events, timers and url, and replace them with Web APIs or bundled polyfills.
  2. Replace any calls to safeStorage.isEncryptionAvailable(), encryptString() and decryptString() with the async variants if you plan to use the 46.0.0-alpha.1 build.
  3. Update your setPermissionRequestHandler() logic so that screen, window and tab capture requests are granted under display-capture.
  4. Review code that reads image.getSize() from capturePage(), the offscreen paint event or beginFrameSubscription(), and treat the values as DIPs.
  5. On Windows, copy electron_wer.dll next to your executable and rename it to match the executable's name.
  6. If you use contentTracing heap profiles, move to the nativeHeapProfiling option and open the recordings in Perfetto.
  7. Check how your code stops utilityProcess children, since POSIX SIGTERM is now sent and a child that handles the signal is not force-killed.

Sources

  1. Release electron v46.0.0-alpha.1 · electron/electron · GitHub github.com · Oct 23, 2026
  2. Electron 45 | Electron electronjs.org · Oct 21, 2026

Next reading

Edited and approved by Jarosław Krzemiński. Spotted a mistake? Report a correction or read the corrections policy.