fix(android): write lowercase booleans to the AndroidManifest - #2846
Merged
Merged
Conversation
5 tasks
DSN in PostGenerateGradlebooleans to the AndroidManifest
Comment on lines
573
to
+576
| _ => "debug" | ||
| }); | ||
|
|
||
| // The Sentry Gradle plugin only recognizes lowercase booleans when resolving the metadata at build time. |
There was a problem hiding this comment.
Bug: The check in SetupSymbolsUpload is outdated and doesn't validate the DSN, causing symbol uploads to be configured even when the native SDK is not included.
Severity: MEDIUM
Suggested Fix
Update the conditional check in the SetupSymbolsUpload method to use AndroidSdkEnabled. This property correctly validates that a DSN is present by calling _options.IsValid(), aligning its behavior with other methods like AddAndroidSdkDependencies and ensuring symbol uploads are only configured when the native SDK is properly enabled.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/Sentry.Unity.Editor/Android/AndroidManifestConfiguration.cs#L573-L576
Potential issue: The `SetupSymbolsUpload` method contains an outdated conditional check,
`_options is not { Enabled: true, AndroidNativeSupportEnabled: true }`. Unlike other
related methods that were updated to use `AndroidSdkEnabled` (which validates the DSN
via `_options.IsValid()`), this check does not validate the DSN. As a result, if
`Enabled` and `AndroidNativeSupportEnabled` are true but the DSN is empty, the symbol
upload task will be configured even though the native SDK dependencies are not included
in the build. This creates an inconsistency introduced by the new changes.
mujacica
approved these changes
Sep 19, 2026
3 tasks
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.
Resolves #2843
Works around getsentry/sentry-android-gradle-plugin#1454
But is good cleanup, so, here we go.