Here are steps to decode Electron crashReporter dump on macOS:
- Download and install breakpad
- Download *-symbols.zip for your Electron release
- Setup a simple express app:
const app = require('express')();
const path = require('path');
const fs = require('fs');
const multer = require('multer');
const crashReportsPath = path.join(__dirname, 'reports')
const upload = multer({ dest: crashReportsPath }).single('upload_file_minidump')
app.post('/crash-report', upload, function (req, res) {
req.body.filename = req.file.filename;
const crashLog = JSON.stringify(req.body, undefined, 2);
fs.writeFile(req.file.path + '.json', crashLog, function (err) {
if (err) return console.error('Error saving crash report: ' + err.message)
console.log('Saved crash report:\n\t' + crashLog)
})
res.end();
})
app.listen(3000);
- Setup
crashReporter
in your application
const {crashReporter} = require('electron')
crashReporter.start({
productName: 'YourName',
companyName: 'YourCompany',
submitURL: 'http://localhost:3000/crash-report',
autoSubmit: true
})
- Inside
breakpad
directory runsrc/processor/minidump_stackwalk -s PATH_TO_DUMP_IN_crashReportsPath_DIRECTORY PATH_TO_electron.breakpad.sym