Code Monkey home page Code Monkey logo

mayday's Introduction

Mayday

Mayday is a lightweight crash reporter for Unreal Engine games that uploads the crash context and minidump to an HTTP(S) server of your choosing when your game encounters a crash.

The tool is statically compiled down to a reasonably-size (<3MB) executable that does not need require dependencies on the end-user's machine.

How to build

  • Install CMake 3.5, the OpenSSL library, and your favorite C++ 17 capable compiler. OpenSSL is available as a binary for Windows here.
  • Edit sources/config.h to provide your own settings.
  • Configure the CMake project and compile in Release.
  • Copy the compiled crash reporter from /build/<platform>Release/Mayday(.exe) as /Engine/Binaries/CrashReportClient(.exe) in your packaged game build directory.

Configuration

Configuration for the crash reporter is available in sources/config.h. Changes require rebuilding the executable.

MaydayReportDomain

Fill this value with your raw domain name, without http or https prefixes, or paths.

  • Example value : "unrealengine.com"

MaydayReportURL

Fill this value with your relative reporting URL.

  • Example value : "/mayday-crash-reports.php"

MaydayUserAgent

Fill this value with the HTTP user-agent string to report for filtering purposes in your reporting service.

  • Example value : "Mayday"

MaydayProjectName

Fill this value with the Unreal Engine project name. This needs to be the technical name used for the .uproject file.

  • Example value : "ShooterGame"

MaydayGameName

Fill this value with your complete game name. The value will be sent to your reporting service.

  • Example value : "War of Battle Shooter"

MaydayUseHTTPS

Control whether to connect to the domain with SSL on port 443 (HTTPS), or on port 80 in plaintext. Is it recommended to use encryption.

  • true : use HTTPS (default)
  • false : use plaintext

MaydayVerifyMethod

Control how to verify the host's certificate.

  • TcpSocket::SSLVerifyMethod::FullVerification : let OpenSSL run full certificate validation (default)
  • TcpSocket::SSLVerifyMethod::DomainAndCertificate : verify the domain name and the certificate chain using a limited built-in CA store - check "certs.h" to add more
  • TcpSocket::SSLVerifyMethod::AcceptSelfSigned : verify the domain name, but accept self-signed certificates

Reporting service

Mayday will report crash data through a single HTTP(S) POST request to the URL https://MaydayReportDomain/MaydayReportURL. Only three fields will be set in the request content.

game

The game field is the game name string set in MaydayGameName. For example, in PHP, this value would be recovered in the following way.

$gameName = $_POST['game'];

context

The context field stores a compressed, base-64 encoded, HTML-entity-encoded text file for the file generated by Unreal Engine as "CrashContext.runtime-xml". For example, in PHP, this value would be recovered in the following way.

$contextData = gzuncompress(base64_decode(html_entity_decode($_POST['context'])));

minidump

The minidump field stores a compressed, base-64 encoded, HTML-entity-encoded binary file for the file generated by Unreal Engine as "UE4Minidump.dmp". For example, in PHP, this value would be recovered in the following way.

$minidumpData = gzuncompress(base64_decode(html_entity_decode($_POST['minidump'])));

User privacy control

The reporter will read EnableCrashReports in Saved/Config/GameUserSettings.ini and determine from that value if the crash reporter is allowed to run. This makes it easy to add a control for end-users for privacy purposes. It is recommended to implement such a control. In the absence of the field or file, the default behavior will be to run the tool.

TODO

Pull requests are welcome to improve the project. In particular, the following tasks would be very useful :

  • Linux support & testing
  • Add a mechanism to override config.h at configure or build time from a text file, to avoid persistent local changes
  • Investigate the use of multipart form encoding instead of base64 to reduce bandwidth ; implies moving from std::string to a proper data type, and probably means HttpRequest should specialize into a POST-specific, multipart-specific class
  • General testing and improvements

mayday's People

Contributors

hughmacdonald avatar strangergwenn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.