New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to mclo.gs crash report upload, replace GTNH-specific code with configuration, and fix stacktrace deobfuscator #11
Conversation
paste.ubuntu.com requires a login for viewing the paste and that is annoying. mclo.gs is made for Minecraft logs. It does some special highlighting and censors certain information that is not relevant. Drawback is that logs are only valid for 90 days after last viewing.
… in various parts of the mod
src/main/java/vfyjxf/bettercrashes/upload/CrashReportUpload.java
Outdated
Show resolved
Hide resolved
src/main/java/vfyjxf/bettercrashes/upload/CrashReportUpload.java
Outdated
Show resolved
Hide resolved
Thanks for the feedback! Should all have been addressed now. |
One minor thing: You're applying the |
@glowredman Great feedback!
From my side, there was no reasoning for choosing those specific mappings other than
Having that file available directly is a great suggestion, that'll allow me to throw out all the zip extraction code! In addition, it will save the Forge Maven some traffic. URL looks pretty stable to me as well. But as you mention, those are some older/different mappings.
I was aware that the Again, I'd like to rely on your judgement, so consider my points above and let me know what you think is the better approach. |
The buildscript can be a bit confusing wrt mappings, we use the forge embedded mappings for methods&classes, but stable_12 for parameter names. |
Ahh OK. So then I don't see any downsides here (I can even simplify the code 😃) and will implement those changes. |
This removes the necessity to extract a zip archive.
Updated the mapping download location and dropped zip extraction code. Please take a look again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Welp, I just wanted to quickly switch the service to which crashes get uploaded to...😭
This includes multiple thematically different changes. I hope it's still reviewable in a single PR.
1. Update buildscript
BetterCrashes hasn't been changed in a while, so there was a bit of extra work to do outside of just updating
build.gradle
. Please note the changes to the other files in the "Update buildscript" commit.2. Switch from paste.ubuntu.com to mclo.gs
BetterCrashes previously had the feature to upload crashlogs to paste.ubuntu.com. The problem with that service is that it requires a login in order to view the paste, which prompted me to seek an alternative service. My choice fell on mclo.gs which is used by PrismLauncher. It's a service made specifically for sharing MC crashlogs. It does some highlighting and concealing sensitive parts of the logs. API was very easy to work with.
Only drawback I found was that crashlogs are only stored for 90 days after the last view. Please let me know if you think that's a deal breaker.
Here is an example log on mclo.gs: https://mclo.gs/zd1mS7E
3. Replace GTNH-specific code with configuration
There previously was some GTNH-specific code that I didn't really see the merit of, so I replaced it with additional configuration parameters that make BetterCrashes more useable outside of GTNH.
There will be a followup PR that updates the mod config in the main modpack repo.
New config options:
crashLogPasteService
: currently only a single paste service is supported, but it'll be very easy to support multiple if the need arisesissueTrackerURL
: adds a button to the crash screen that takes the player to a bug trackerstacktraceDeobfuscation
: enables configuration of the integrated stacktrace deobfuscatorunsupportedMods
: list of mods which the pack authors deem unsupported. This makes BetterCrashes prompt the player to make special mention of those mods in their bug report4. Enable the stacktrace deobfuscator
BetterCrashes shipped with some functionality to deobfuscate stacktraces. Turns out that most of it was non-functional, so I fixed it. Due to the license of MCP, the mappings can't be redistributed with the mod itself and thus have to be downloaded at runtime. This updates the download location from the old defunct mcpbot location to Forge Maven and adds a hash check. The download will be triggered the first time the crash screen appears and the mapping will be saved in a file called
bettercrashes-stackdeobfuscator-methods.csv
in.minecraft
.