Skip to content

fix: crashReporter.setUploadToServer() having no effect after start - #54506

Merged
MarshallOfSound merged 1 commit into
mainfrom
fix/crash-reporter-upload-consent
Sep 28, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
fix/crash-reporter-upload-consent

Conversation

@codebytere

Copy link
Copy Markdown
Member

Description of Change

crashReporter.setUploadToServer() did not change whether crash reports were uploaded once crashReporter.start() had run. It only updated the consent flag on Electron's crash reporter client, which Crashpad reads once while it is being initialized; the handler decides per report from the uploads-enabled setting in the Crashpad database, and nothing wrote that setting again after start(). So getUploadToServer() reported the new value while reports written after setUploadToServer(false) were still uploaded, and reports written after setUploadToServer(true) on a reporter started with uploadToServer: false were not. This applies to macOS, Windows and Linux alike.

setUploadToServer() now also writes the value to the Crashpad database through crash_reporter::SetUploadConsent(), the same call start() goes through. Two specs crash the main process after toggling the setting in each direction; the spec crash server now records the reports it receives so the existing "should not send a minidump" assertion can fail.

Checklist

Release Notes

Notes: Fixed an issue where crashReporter.setUploadToServer() had no effect after crashReporter.start() was called.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 28, 2026

@deepak1556 deepak1556 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@MarshallOfSound MarshallOfSound removed the target/43-x-y PR should also be added to the "43-x-y" branch. label Sep 28, 2026
@MarshallOfSound
MarshallOfSound merged commit 013d90f into main Sep 28, 2026
102 checks passed
@release-clerk

release-clerk Bot commented Sep 28, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed an issue where crashReporter.setUploadToServer() had no effect after crashReporter.start() was called.

@MarshallOfSound
MarshallOfSound deleted the fix/crash-reporter-upload-consent branch September 28, 2026 17:36
@trop

trop Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #54518

@trop trop Bot added in-flight/44-x-y and removed target/44-x-y PR should also be added to the "44-x-y" branch. labels Sep 28, 2026
@trop

trop Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54519

@trop trop Bot added in-flight/45-x-y merged/45-x-y PR was merged to the "45-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed target/45-x-y PR should also be added to the "45-x-y" branch. in-flight/45-x-y in-flight/44-x-y labels Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants