Repository navigation
fix: crashReporter.setUploadToServer() having no effect after start - #54506
Merged
Merged
Conversation
MarshallOfSound
approved these changes
Sep 28, 2026
|
Release Notes Persisted
|
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #54518 |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #54519 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
crashReporter.setUploadToServer()did not change whether crash reports were uploaded oncecrashReporter.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 afterstart(). SogetUploadToServer()reported the new value while reports written aftersetUploadToServer(false)were still uploaded, and reports written aftersetUploadToServer(true)on a reporter started withuploadToServer: falsewere not. This applies to macOS, Windows and Linux alike.setUploadToServer()now also writes the value to the Crashpad database throughcrash_reporter::SetUploadConsent(), the same callstart()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
npm testpasses (spec/api-crash-reporter.spec.tson Linux; the two new cases fail without the change)Release Notes
Notes: Fixed an issue where
crashReporter.setUploadToServer()had no effect aftercrashReporter.start()was called.