It was unclear to us until we looked through the atom source code that crashReporter.start must be ran in each renderer process
2.3 KiB
crash-reporter
An example of automatically submitting crash reporters to a remote server:
crashReporter = require('crash-reporter');
crashReporter.start({
productName: 'YourName',
companyName: 'YourCompany',
submitUrl: 'https://your-domain.com/url-to-submit',
autoSubmit: true
});
crashReporter.start(options)
optionsObjectproductNameString, default: ElectroncompanyNameString, default: GitHub, IncsubmitUrlString, default: http://54.249.141.255:1127/post- URL that crash reports would be sent to as POST
autoSubmitBoolean, default: true- Send the crash report without user interaction
ignoreSystemCrashHandlerBoolean, default: falseextraObject- An object you can define which content will be send along with the report.
- Only string properties are sent correctly.
- Nested objects are not supported.
Developers are required to call this method before using other crashReporter APIs.
Note: On OS X, electron uses a new crashpad client, which is different
with the breakpad on Windows and Linux. To enable crash collection feature,
you are required to call crashReporter.start API to initialize crashpad in
main process and in each renderer process that you wish to collect crash reports.
crashReporter.getLastCrashReport()
Returns the date and ID of the last crash report, when there was no crash report
sent or the crash reporter is not started, null will be returned.
crashReporter.getUploadedReports()
Returns all uploaded crash reports, each report contains date and uploaded ID.
crash-reporter payload
The crash reporter will send the following data to the submitUrl as POST:
reptString - e.g. 'electron-crash-service'verString - The version of ElectronplatformString - e.g. 'win32'process_typeString - e.g. 'renderer'ptimeNumber_versionString - The version inpackage.json_productNameString - The product name in the crashReporteroptionsobjectprodString - Name of the underlying product. In this case Electron_companyNameString - The company name in the crashReporteroptionsobjectupload_file_minidumpFile - The crashreport as file- All level one properties of the
extraobject in the crashReporteroptionsobject