Giter Site home page Giter Site logo

bugsplat-git / bugsplat-unity Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 3.0 114.29 MB

๐ŸŽฎ๐Ÿ’ฅ๐Ÿ‘พ BugSplat crash and error reporting for Unity games

License: MIT License

C# 95.00% Objective-C 4.52% Objective-C++ 0.48%
unity crash reporting error game development bugsplat hacktoberfest

bugsplat-unity's People

Contributors

bobbyg603 avatar munkiki7 avatar tustanivsky avatar zoolouie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bugsplat-unity's Issues

Add Option to not Capture Editor Errors

Let's implement a boolean "Capture Errors in Editor" that allows the user to specify whether or not they want error reporting in the Editor. Let's also display a checkbox that allows the user to set this value via the Editor inspector window.

Add SendPdbs

We broke symbol uploading when we moved away from a downloadable package. We need to include a copy of SendPdbs and its dependencies.

Spice Up README.md

![bugsplat-github-banner-unity](https://user-images.githubusercontent.com/20464226/149042143-91ff31c6-9ee2-41f6-97d3-6e2efd3d985c.png)
<br/><br/> 
# <div align="center">BugSplat</div> 
### **<div align="center">Crash and error reporting built for busy developers.</div>**
<div align="center"> <img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/bugsplatco?label=Follow%20BugSplat&style=social">  <img alt="Discord" src="https://img.shields.io/discord/664965194799251487?label=Join%20Discord&logo=Discord&style=social"> </div>

There's a whole world of shields (badges) we can add next to the Twitter and Discord ones. Maybe add a last commit or project size shield from - https://shields.io/category/rating.

  • To make our repo's stand out a bit more, let's give them a spice of life with some emoji's in the chapter text.

Here's an example from our production website ReadMe

### :blue_book: Documentation
Our private repository and documentation is available at GitHub. Visit https://docs.bugsplat.com/ for further info.

You can find all of the emoji's github allows here - https://gist.github.com/rxaviers/7360908

Support Android Symbol Uploads

We created a new endpoint for running dump-syms against an android .so files. We could use a new script that posts to this endpoint as part of the Android build.

Docs

Steps

  1. Extract files from .zip (if necessary)
  2. POST to https://app.bugsplat.com/oauth2/authorize with client_id, client_secret, grant_type=client_credentals, scope=restricted to obtain access_token. Note the domain of this request is app.bugsplat.com
  3. Foreach file, POST to https://{{database}}.bugsplat.com/post/android/symbols being sure to replace {{database}} with the users database. This POST needs form-data params database, appName, appVersion, and file where file is the .so file.
  4. A success response will return status 202 and url where the symbol upload can be verified

Remove SendPdbs

SendPdbs is a program that runs on Windows only. It's also a little awkward to include an executable in a Unity package. Additionally, we want to work toward supporting symbol uploads on all platforms. Let's remove SendPdbs and replace it with the new SymbolUploader from BugSplatDotNetStandard.

Add Emoji's to the chapter headers

To make our repo's stand out a bit more, let's give them a spice of life with some emoji's in the chapter text.

Here's an example from our production website ReadMe

### :blue_book: Documentation
Our private repository and documentation is available at GitHub. Visit https://docs.bugsplat.com/ for further info.

You can find all of the emoji's github allows here - https://gist.github.com/rxaviers/7360908

BugSplat Crash #1: System.IO.__Error.WinIOError

BugSplat Crash 1

Notes:
Could not find the Crashes directory

Customer Response:
the default description - mailto:Fred

Application Version:
0.1

Callstack:

System.IO.__Error.WinIOError
System.IO.FileSystemEnumerableIterator`1[TSource].HandleError
System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit
System.IO.FileSystemEnumerableIterator`1[TSource]..ctor
System.IO.FileSystemEnumerableFactory.CreateFileNameIterator
System.IO.Directory.InternalGetFileDirectoryNames
System.IO.Directory.InternalGetDirectories
System.IO.Directory.GetDirectories
System.IO.DirectoryInfo.GetDirectories
System.IO.DirectoryInfo.GetDirectories
BugSplatUnity.Runtime.Util.WrappedDirectoryInfo.GetDirectoriesC:/Users/bobby/source/repos/bugsplat-unity/Runtime/Util/WrappedDirectoryInfo.cs(65)
BugSplatUnity.Runtime.Reporter.WindowsReporter+d__17.MoveNextC:/Users/bobby/source/repos/bugsplat-unity/Runtime/Reporter/WindowsReporter.cs(129)
UnityEngine.SetupCoroutine.InvokeMoveNext<6be0105cc21f4f3e80fcf2fba69f97e8>
UnityEngine.MonoBehaviour:StartCoroutine
Crasher.Crasher:Start

Steps to reproduce

  1. Create a new project and import the sample from com.bugsplat.unity
  2. Delete the crashes folder for the current company, in my instance this folder was C:\Users\bobby\AppData\Local\Temp\DefaultCompany\test\Crashes
  3. Generate a Windows x86 or x86_64 build for the sample scene via build and run
  4. Run the sample and notice the error above gets generated because we can't find the Crashes folder

Expected result

We should detect that this folder doesn't exist and log that it doesn't exist and we're going to skip uploading any crashes

Add WebGL Support

We are unable to load BugSplatDotNetStandard in the browser in WebGL builds. Instead of wading into that swamp let's just swap the implementaton out at build time and use all the built in Unity stuff to send network requests.

Add an object that implements DontDestroyOnLoad

It's important that BugSplat's integration fits neatly into both existing games and ones that are just getting started. We should provide the option to keep the BugSplatUnity object around via DontDestroyOnLoad because that seems to be a very popular design pattern for game studios. We should also put out some sort of article/documentation explaining various design patterns, when to use them, and how BugSplat might fit into each pattern.

Connection state transition leaves Bugsplat unable to post exceptions

If a Unity client (Verified on iOS, IL2CPP, 2021.3 LTS) is subject to a network change; such as moving from WiFi to Cell, or Cell to WiFi, where the original connection is terminated; Bugsplat will be unable to post exceptions until the original network connection is restored.

This bug appears to be caused within BugSplatDotNetStandard.dll which is not distributed in an uncompiled form.

Attached is a sample exception which'll happen when the original network connection is out (however there is still a valid connection, on another network adapter).

SampleBugsplat.txt

Fix iOS Build

The iOS build currently breaks because of using UnityEngine.Windows; on non-Windows platforms.

Add Android native crash support

Provide the scaffolding around Crashpad for Android devices:

  • Option to toggle functionality on/off in Unity Editor
  • Link the Crashpad libraries
  • Include the Crashpad handler executable in the build
  • Add a script for generating and uploading sym files
    • Mention the script requires being run on Windows via WSL

Add iOS native crash support

Add full support for iOS crash reporting in Unity games:

  • Option to toggle functionality on/off in Unity Editor
  • Add bugsplat-ios to generated iOS project
  • Configure automatic symbol uploads

Add Log Statement Before BugSplat Posts

Sometimes it can take quite a while to for the response to come back from a crash post to the BugSplat servers. We should log something when the error has been caught by BugSplat before we try and post it to our servers. The message should be something along the lines of $"Error caught by BugSplat! Message: {ex.Message}"

Sample should not be upside on mobile

Zander gave me this snippet to try

Screen.autorotateToPortrait = false;
Screen.autorotateToPortraitUpsideDown = false;
Screen.orientation = ScreenOrientation.AutoRotation;

Fix Sample Errors

Seems like when we removed the Plugin Crash button something might've broke.

You probably need to assign the crashButtons variable of the PlatformDependentButtonRenderer script in the inspector.

Support Unity 2019 LTS

We should make whatever changes it takes to allow us to be compatible here. Things we've seen thus far are:

  • options ??= new ReportOptions() should be options = options ?? new ReportOptions();
  • Replace UnityWebRequest.Result with statusCode or similar to silence compiler errors

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.