codebytere

#52600: chore: include the asar entry in integrity-check failure messages

Merged
Created: Aug 2, 2026, 9:13:25 PM
Merged: Aug 3, 2026, 5:13:39 PM
4 comments
Target: main

Description of Change

asar::ValidateIntegrityOrDie() logs only the two hashes when a check
fails, so a crash report from a damaged install ("Integrity check failed
for asar archive ( vs )") can't say which entry - or the
header - failed the check.

Thread a short what label through the three call sites (header
validation, packed-file read, unpacked copy-out) and include it, with the
input size, in the fatal message. Message text only; no behavior change.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are changed or added
  • relevant documentation, tutorials, templates and examples are changed or are not needed

Release Notes

Notes: Improved the error message when an asar integrity check fails to name the entry that failed.

Backports

42-x-y
In-flight
PR Number
#52623
Waiting to be merged
43-x-y
In-flight
PR Number
#52622
Waiting to be merged
44-x-y
In-flight
PR Number
#52624
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron