fix(reporter): Discord/GitHub-issue/forum buttons silently did nothing - #66
Open
soloturn wants to merge 1 commit into
Open
fix(reporter): Discord/GitHub-issue/forum buttons silently did nothing#66soloturn wants to merge 1 commit into
soloturn wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Found by manually clicking these buttons in the reporter dialog: nothing visibly happened. Root cause - GlobalProperties.get() legitimately returns null for JOIN_DISCORD_LINK/REPORT_ISSUE_LINK/SUPPORT_FORUM_LINK whenever a downstream app doesn't configure them (cr-core's own defaults never set these - they're app-specific), and the old openInBrowser(String url) passed that null straight into `new URI(null)`, which throws NullPointerException. That's not one of the two checked exceptions the old code caught (IOException, URISyntaxException), so it propagated out of the button's ActionListener uncaught on the EDT - silently swallowed, no popup, no trace anywhere the click happened. New BrowserLauncher.open() replaces the two copies of openInBrowser (FinalActionsPanel, UploadPanel) with one implementation that never throws: a missing/blank url, an invalid URI, or Desktop.browse itself failing are all caught and reported the same way uploadFailed() now reports PasteBin failures - printed to stderr and shown in a JOptionPane - instead of disappearing. The actual open action is injected via a Consumer<URI> seam so BrowserLauncherTest can drive the null/blank/invalid/browser-throws cases directly without a real Desktop or popping up a real dialog. cr-core's own defaults now also set REPORT_ISSUE_LINK (CrashReporter's own issue tracker) and JOIN_DISCORD_LINK (Terasology's Discord, which CrashReporter shares) - so a standalone cr-core has somewhere real to go, not just a caught-and-reported error. Downstream apps that need a different destination (cr-destsol's own issue tracker) already override these. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
soloturn
force-pushed
the
soloturn-fix-broken-link-buttons
branch
from
August 22, 2026 12:24
61ead2f to
5bab2c8
Compare
This was referenced Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found while manually clicking the "Join Discord Server" / "File an issue on GitHub" / forum buttons in the reporter dialog: nothing visibly happened.
Root cause:
GlobalProperties.get()returnsnullforJOIN_DISCORD_LINK/REPORT_ISSUE_LINK/SUPPORT_FORUM_LINKwhenever a downstream app doesn't configure them - cr-core's own defaults never set these, since they're app-specific. The oldopenInBrowser(String url)passed that straight intonew URI(null), which throwsNullPointerException- not one of the two checked exceptions the old code caught (IOException,URISyntaxException) - so it propagated out of the button'sActionListeneruncaught on the EDT: silently swallowed, no popup, no trace anywhere the click happened.Fix:
BrowserLauncher.open()replaces the two duplicateopenInBrowsercopies (FinalActionsPanel,UploadPanel) with one implementation that never throws: a missing/blank url, an invalid URI, orDesktop.browseitself failing are all caught and reported the same wayuploadFailed()reports PasteBin failures - printed to stderr and shown in aJOptionPane- instead of disappearing.cr-core's own defaults now setREPORT_ISSUE_LINKto CrashReporter's own issue tracker andJOIN_DISCORD_LINKto Terasology's Discord (which CrashReporter shares), so a standalonecr-core(like the interactive test) has somewhere real to go rather than nothing. Downstream apps that need something different (e.g. cr-destsol's own issue tracker) already override these.Test plan
BrowserLauncherTest- drives the null/blank/invalid-URI/browser-throws cases via an injectedConsumer<URI>seam, no realDesktopor popup needed../gradlew build- clean.Related
merge-train.