Anti-AIClone

Log date · Tue

How to check Electron protocols and code cache after an upgrade

Check scheme registration, loading and cache rejection separately: our Node illustration shows correct output even when a cache is rejected.

What should an Electron upgrade check?

Check scheme registration, resource loading and cache rejection separately after an upgrade; a page opening alone is not enough. In our Node sample, a grammar check distinguished two valid names from two invalid ones. The original and zeroed caches were both 288 bytes: V8 accepted the former and rejected the latter, yet both calculations returned 42.

Results at a glance
QuestionFinding
Can a scheme contain an underscore?The sample grammar check says invalid.
What happens when cache is rejected?The sample still runs from source and returns 42.
Does this verify the Electron fix?No; this is a Node illustration.

Electron 44.4.0 was released at 17:06 UTC on 15 September 2026; 43.7.1 and 42.11.4 also came out that day. Version 44.4.0 validates privileged scheme names and fixes V8 code caching for HTTPS scripts loaded by file:// and custom-scheme pages. [1]

Separate the name, privileges and handler

Electron checks scheme names against RFC 3986: the first character is a letter, followed by letters, digits, plus, period or hyphen; the canonical form is lowercase. [2] A valid name does not make a handler safe or justify enabling every privilege.

Call registerSchemesAsPrivileged before the app ready event and only once. A handler belongs to a particular session; a window using a custom partition needs a handler registered on that session. [2] Exercise every window and partition used in production, not just the default window.

Four synthetic names checked against the documented grammar in Node; output from our run.
app: valid
app+demo: valid
1app: invalid
app_name: invalid

Cache acceptance and correct execution

With no Electron runtime available here, we used Node 20.19.5 and V8 11.3.244.8-node.30 on our own sample. This illustrates the underlying issue; it is not a test of Electron 44.4.0 or its HTTPS loading path. Separate processes supply either the original cache or a zeroed buffer of equal length to vm.Script with the same source.

Output from the two separate processes, copied verbatim.
original: bytes=288, rejected=false, result=42
zeroed: bytes=288, rejected=true, result=42

Node documents createCachedData as producing compilation cache for Script, and cachedDataRejected as reporting whether V8 accepted supplied data. [3] Our rejected-cache case still had source to execute, so the answer stayed correct. A result-only assertion would miss cache rejection. Treat the cache as a compilation optimization, not a source secrecy or security boundary; Node also says vm is not a security mechanism. [3]

For a real Electron regression, record cold and repeat launches, script requests, console errors and application results separately, and use observable cache evidence to assess whether caching works. Keep the app version, platform, configuration and cache directory consistent; one launch duration does not establish a cache hit.

Include the other fixes in regression

The release also fixes a browser-side drag-and-drop check between cross-site frames of the same page, a Windows memory leak and potential use-after-free in app.getPreferredSystemLanguages(), and a macOS helper that could start a second instance without a process type. In that configuration with the runAsNode fuse disabled, child_process.fork() now throws. Node.js was updated to 24.21.0 and upstream fixes including Chromium and V8 were backported; the notes have no separate security section. [1]

Recommendations by case
CaseRecommendation
Custom schemeCheck names, minimum privileges and loading in each session.
HTTPS scripts and cacheCompare cold and warm launches, results and cache evidence.
Cross-site iframe drag-and-dropTest allowed and denied directions and user experience.
macOS fork and fuseVerify error handling and process count in the packaged configuration.
Windows language APIRegression-test repeated calls on the actual path.

These are recommendations, not Electron behavior measured by the sample. Recheck fuse and ASAR integrity settings after the upgrade; re-sign changed production macOS builds and notarize according to the release process.

Check your own application

Search your project for protocol registration, handlers, caches and fork calls and compare the results with the actual packaged configuration. Search results are leads: also inspect wrappers, dependencies and generated code.

Run from your own project root.
# From your own project root:
rg -n "registerSchemesAsPrivileged|protocol\.handle|createCachedData|child_process|\.fork\(" .

Keep a repeatable case for each important resource path: record the window session, scheme, script URL, expected result and behavior with a cleared and a retained cache. Test platform builds separately and repeat after upgrades. This separates loading failures, fallback to source and actual cache use.

Your checklist

  • Check every privileged scheme name and enabled privilege.
  • Test resource loading in each session and partition.
  • Record cold and warm launches and cache rejection evidence.
  • Test cross-site frame drag-and-drop, macOS fork and Windows language calls.
  • Recheck fuses and ASAR integrity, then sign and notarize as required.

Primary sources

All sources and reproduction status ↗