bugsplat-git / bugsplat-unity Goto Github PK
View Code? Open in Web Editor NEW๐ฎ๐ฅ๐พ BugSplat crash and error reporting for Unity games
License: MIT License
๐ฎ๐ฅ๐พ BugSplat crash and error reporting for Unity games
License: MIT License
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).
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.
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
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();
UnityWebRequest.Result
with statusCode
or similar to silence compiler errors![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.
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
Let's investigate both of the following and implement the better of the 2:
We should do that!
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.
We have a new version of android-dump-syms that dumps locally. This is a way better experience than round tripping and having the server dump the symbols, we should upgrade!
Issue:
See the following line in PostBuild.cs:
startInfo.Arguments = "/u [email protected]" + " /p Flintstone" + " /b Fred" + " /a " + Application.productName + " /v " + Application.version + " /d \"" + pluginsDir + "\"" + " /s";
This should be updated so it is dynamic to an end user using BugSplatOptions.
Provide the scaffolding around Crashpad for Android devices:
We broke symbol uploading when we moved away from a downloadable package. We need to include a copy of SendPdbs and its dependencies.
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.
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.
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.
.zip
(if necessary)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.comhttps://{{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.url
where the symbol upload can be verifiedThe iOS build currently breaks because of using UnityEngine.Windows;
on non-Windows platforms.
Note that I have a different file for this one that mentions game developers specifically,
Follow these instructions for this repo to add social sharing image - https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview
It feels like we need like 3 states, desktop with native crash buttons, mobile with native crash buttons, and exception buttons only
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.
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}"
Zander gave me this snippet to try
Screen.autorotateToPortrait = false;
Screen.autorotateToPortraitUpsideDown = false;
Screen.orientation = ScreenOrientation.AutoRotation;
TODO
Just requires updating bugsplat-net-standard to 2.1.2
General purpose field that can be used to collect system info
We have a development version in this repo currently and it should be updated.
Helps bring us to parity with our older offering.
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.GetDirectories | C:/Users/bobby/source/repos/bugsplat-unity/Runtime/Util/WrappedDirectoryInfo.cs(65) |
BugSplatUnity.Runtime.Reporter.WindowsReporter+d__17.MoveNext | C:/Users/bobby/source/repos/bugsplat-unity/Runtime/Reporter/WindowsReporter.cs(129) |
UnityEngine.SetupCoroutine.InvokeMoveNext | <6be0105cc21f4f3e80fcf2fba69f97e8> |
UnityEngine.MonoBehaviour:StartCoroutine | |
Crasher.Crasher:Start |
C:\Users\bobby\AppData\Local\Temp\DefaultCompany\test\Crashes
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
When a user goes to import the BugSplat package we should give them an option to also import an example scene (or similar) that demonstrates how to use the package.
Add full support for iOS crash reporting in Unity games:
Instead of exposing CaptureEditorLog and CapturePlayerLog let's just expose CaptureLog and add a summary that indicates the correct log will be captured depending on if the application is being run in the Editor or Player.
Or figure out how to properly omit this from the platform...
We should display some sort of system information in the environment field for exception posts.
Also add relevant doc updates.
Update README to give the user instruction on how to use the new sample crasher.
For instance, https://app.bugsplat.com/v2/crash?database=Fred&id=99306 just shows at Main Start
as the function.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.