codebytere

#53131: fix: deliver macOS notifications without an icon when the attachment fails

Merged
Created: Aug 23, 2026, 7:03:11 AM
Merged: Aug 24, 2026, 9:54:58 AM
4 comments
Target: main

Description of Change

Fixes #52295

Since the UserNotifications rewrite (#47817) a notification's icon is turned into a UNNotificationAttachment on the image task runner, and that step returns nil when the temporary PNG can't be written under the user data dir or +attachmentWithIdentifier:URL:options:error: fails. The reply on the UI thread put the result straight into @[ attachment ], so a nil there raised NSInvalidArgumentException and took down the browser process.

The notification is now scheduled without attachments when the icon couldn't be attached, and the failure is logged under --enable-logging notification debugging.

Checklist

Release Notes

Notes: Fixed a crash on macOS when a notification's icon could not be attached; the notification is now shown without the icon.

Backports

42-x-y
In-flight
PR Number
#53148
Waiting to be merged
43-x-y
In-flight
PR Number
#53147
Waiting to be merged
44-x-y
In-flight
PR Number
#53146
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