Repository navigation
fix(android): Skip dist fallback when release has no version code - #6450
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
ApplicationExitInfoEventProcessor derived dist from the text after '+' in the release. Without a '+', indexOf returned -1 and the whole release became dist, which Relay rejects for characters like '@'. Co-Authored-By: Gene Wright <gene.wright@sentry.io>
📲 Install BuildsAndroid
|
sentry-junior
Bot
requested review from
markushi and
runningcode
and removed request for
a team
November 2, 2026 19:42
This branch has not been deployed
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.
📜 Description
When
options.distis unset,ApplicationExitInfoEventProcessorderivesdistfrom the version code after the+in the release (package@versionName+versionCode). This change only applies that fallback when the release actually contains a+. Otherwisediststays empty, which matches howMainEventProcessorhandles regular events.💡 Motivation and Context
For a release without a
+, such asio.sentry.samples@1.2,indexOf('+')returned-1, sosubstring(0)turned the entire release string intodist. Relay only allowsa-zA-Z0-9_.-indist, so it threw the value away withinvalid character '@'.The
try/catch (Throwable)is gone becausesubstringcan no longer throw on this path.setAppVersionAndBuildstill leavesapp_version/app_buildempty for releases without a+. That's the existing behavior covered byif release is in wrong format, does not crash and leaves app version and build empty, so I didn't change it here.+#6449💚 How did you test it?
I added unit tests for both ways the release can be resolved (persisted options and current options) with a release that has no version code. They run in CI.
📝 Checklist
sendDefaultPIIis enabled.via gene.wright.
--
View Session [Sentry]