Code Monkey home page Code Monkey logo

electron-crash-report-server's Introduction

electron-crash-report-server is a Node.js (hapi) and PostgreSQL (massive) application for collecting crash reports from Electron applications.

install

Deploy

During setup change the AUTH_USER and AUTH_PASS environment variables. Once the app has deployed use those values to login.

docker

๐Ÿณ electron-crash-report-server is available on Docker Hub. Refer to the docker-compose.yaml file for usage.


If crash reports do not appear after the first deploy restart the app.

Read the development section for information about running in other environments.

usage

const { crashReporter } = require("electron");
crashReporter.start({
	// ...other options
	submitURL: "https://app-name-12345.herokuapp.com/",
});

Refer to the crashReporter documentation for the full details.

Important: Don't forget to start the crashReporter in the main process and each renderer that will create crash reports.

Check out the example electron app and demo server for a working example. The login and password for the demo are crash and electron.

If there are no sample reports use the example (or any other) app to add some reports to the demo server.

github & gitlab

electron-crash-report-server can create new issues on GitHub and/or GitLab when it receives a crash report. Using a private repository for these issues is recommended since stack traces and dump files may contain sensitive information about your users or application.

To get setup you need to add a few environment variables.

github & gitlab

Both services require you to set ECRS_URL; note the lack of trailing slash.

ECRS_URL = "https://pacific-falls-32011.herokuapp.com"

github

GITHUB_OWNER = "user_name"
GITHUB_REPO = "repo_name"
GITHUB_TOKEN = "user_token"

gitlab

GITLAB_ID = "repo_id"
GITLAB_TOKEN = "user_token"

email

electron-crash-report-server can send an email when it receives a crash report.

SMTP_LOGIN = "[email protected]"
SMTP_PASSWORD = "password is secret"
SMTP_SERVER = "smtp.mailgun.org"
SMTP_PORT = "587"
SMTP_TO = "[email protected]"
SMTP_FROM = "[email protected]"
SMTP_SUBJECT = "`ecrs: Crash report ${document.id}`"

๐Ÿšจ SMTP_SUBJECT is evaled at runtime so be careful what you include; a malicious user may be able to craft a crash report that executes code on your server.

development

Requirements: Node.js LTS 10.x and PostgreSQL 11.x.

git clone https://github.com/johnmuhl/electron-crash-report-server
cd electron-crash-report-server
createdb electron_crash_report_server_development
cp .env.example .env
yarn install
yarn start:dev
# make changes
yarn fmt
yarn test

bugs & features

Use the issue tracker to report bugs or discuss changes and features.

license

The Unlicense

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.