BugSplat supports collection of both electron.crashReporter and node.js crash reports. CrashReporter crashes are created via Breakpad and BugSplat requires symbol files in order to calculate the call stack.

BugSplat can be configured to automatically locate Electron symbol files. If your app is packaged with electron-builder or similar you will need to upload application specific symbol files in order to see full native callstacks. All symbol files must be uploaded to BugSplat via symupload. More information about uploading symbol files to BugSplat can be found here.

BugSplat-js can also be used to collect 'uncaughtException' and 'unhandledRejection' events in your application's JavaScript.


Before continuing with the integration please complete the following tasks:


Configure electron.crashReporter to post crash reports to BugSplat using the following steps. By enabling our Electron symbol support, Electron symbol files will be automatically downloaded by BugSplat. If you package your application with additional binaries you will need to upload the corresponding symbol files in order to correctly resolve call stacks. Please skip to step 3 if your app does not include additional binaries.

  1. Use the Breakpad symupload utility to upload symbol files to BugSplat. BugSplat has a fork of symupload for uploading large symbol files on OS X. More information on this fork can be found here.

  2. Verify that your application-specific symbol files show up on the Symbols page. Be sure to add symbols for each platform your app supports.

  3. Navigate to the Options page. Scroll down and click the checkbox next to "Include Electron Symbols", then click apply. BugSplat will now locate symbols for all Electron releases newer than v1.5.0. If you would like support for an older version of Electron please email support@bugsplat.com.

  4. Integrating BugSplat with Electron
  5. Require electron and call electron.crashReporter.start (as shown in the example below). Replace company name, product name, database name, application version, user email and comment. Note this initialization code will need to be added to each process you wish to capture errors from:

  6. const electron = require('electron')
      companyName: '<<company name>>',
      productName: '<<product name>>',
      submitURL: 'http://<<database name>>.bugsplat.com/post/bp/crash/postBP.php',
      autoSubmit: true,
      extra: {
          'prod': '<<product name>>',
          'key': '<<application version>>',
          'email': '<<user email>>',
          'comments': '<<comment>>'
  7. Generate a crash in one of the Electron processes to test your BugSplat integration:

  8. process.crash()
  9. Navigate to the Crashes page in BugSplat and you should see a new crash report for your application. Click the link in the Id column to see details about your crash on the Individual Crash page:

  10. Integrating BugSplat with Electron Integrating BugSplat with Electron

Node.js Configuration

  1. To collect Node.js errors in your application, run the following command in terminal or cmd at the root of your project to install BugSplat’s npm package:

  2. npm install --save bugsplat
  3. Require bugsplat at the entry point of your application (usually main.js) by adding the following code snippet. Be sure to replace DatabaseName, AppName and the version number with the correct values for your application:

  4. const bugsplat = require("bugsplat")("DatabaseName", "AppName", "");
  5. Add the bugsplat.post function as an event handler for uncaught exceptions:

  6. process.on("uncaughtException", bugsplat.post);
  7. If your application uses promises you will also want to listen for unhandled promise rejections. Please note that this will only work for native promises:

  8. process.on("uncaughtRejection", bugsplat.post);
  9. Provide a callback method that executes after the error has been posted to BugSplat. It is recommended that you exit your application if an uncaughtException occurs. You may also want to display an alert to your user with information regarding their problem:

  10. bugsplat.setCallback((error, responseBody) => { 
      // Display an alert and quit the application here
  11. Many Electron applications run multiple Node.js processes. For instance, the electron-quick-start application runs both a main and a renderer process. You will need to require bugsplat in each process you want to capture errors. To capture errors in the renderer process, add the following to renderer.js:

  12. window.onerror = (message, source, line, col, err) => bugsplat.post(err);
  13. Sometimes it is desirable to reload or quit the application when an error occurs in the renderer process. BugSplat’s callback function can be used to invoke functions in the main thread. The following is an example of how to invoke the main process from the renderer:

  14. renderer.js

    const electron = require('electron')
    const ipcRenderer = electron.ipcRenderer
    const bugsplat = require("bugsplat")("DatabaseName", "AppName", "")
    bugsplat.setCallback((error, responseBody) => {


    const electron = require('electron')
    const ipcMain = electron.ipcMain
    ipcMain.on('rendererCrash', function () {
      // Display an error and reload or quit the app here
  15. Test BugSplat by throwing a new error in either the main or renderer process:

  16. throw new Error("BugSplat!");
  17. Navigate to the Crashes page in BugSplat and you should see a new crash report for the application you just configured. Click the link in the Id column to see details about your crash on the Individual Crash page:

  18. Integrating BugSplat with Electron Integrating BugSplat with Electron

That’s it! Your Electron application is now configured to post crash reports to BugSplat.

Node.js API

In addition to the configuration demonstrated above, there are a few public methods that can be used to customize your BugSplat integration:

bugsplat.setAppKey(appKey); // A unique identifier for your application
bugsplat.setUser(user); // The name or id of your user
bugsplat.setEmail(email); // The email of your user 
bugsplat.setDescription(description); // Additional info about your crash that gets reset after every post
bugsplat.addAdditionalFile(pathToFile); // Path to a file to be added at post time (limit 1MB)
bugsplat.setCallback(callback); // Function that accepts 2 parameters (err, responseBody) that runs after post
bugsplat.post(error); // Post an arbitrary Error object to BugSplat


BugSplat loves open source software! If you have suggestions on how we can improve this integration, please reach out to support@bugsplat.com, create an issue in our GitHub repo or send us a pull request.