-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
On Linux, Electron uses breakpad, as opposed to crashpad which is the crash reporting tool on macOS and Windows. Breakpad requires manually initializing the crash reporter in every process to be monitored, including renderers. Initializing the crash reporter in the renderer currently requires calling crashReporter.start
from within the renderer, which can only be done from JavaScript. Initializing the crash reporter requires performing privileged operations, such as installing signal handlers and writing to the filesystem. Thus, when the crash reporter is initialized on Linux in the renderer process, if the sandbox is enabled, the renderer process crashes.
Chromium works around this by enabling the crash reporter before the sandbox is initialized. We'll need to do the same, which means the crash reporter will need to be initialized before JavaScript has the chance to run.
IMO, this is also a good thing for the API, because it would reduce the differences between the crash reporter API on Linux vs. macOS/Windows, and it would mean that crashReporter
could become a main-process-only module. It is, however, a breaking change.