Skip to content

chore(deps): update Android SDK to v8.51.0 - #1173

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
deps/scripts/update-android.sh
Open

chore(deps): update Android SDK to v8.51.0#1173
github-actions[bot] wants to merge 1 commit into
mainfrom
deps/scripts/update-android.sh

Conversation

@github-actions

@github-actions github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

Bumps scripts/update-android.sh from 8.50.1 to 8.51.0.

Auto-generated by a dependency updater.

Changelog

8.51.0

Features

  • Use Android's ProfilingManager (Perfetto) for continuous profiling on API 35+ devices (#5251)
    • On API 35+ devices, continuous profiling now automatically uses Android's system ProfilingManager with Perfetto-based stack sampling, providing lower-overhead and more accurate profiles. No configuration change is required.
    • Devices below API 35 keep using the legacy Debug-based profiler.
    • Added an enableLegacyProfiling option (default true) to disable the legacy Debug-based profiler. Setting it to false disables continuous profiling on API < 35 devices as well as transaction-based profiling (profilesSampleRate/profilesSampler) on all devices, since transaction-based profiling is not supported by Perfetto.
    • It can also be configured via the io.sentry.profiling.enable-legacy-profiling manifest flag.
    • See the Android profiling docs for details.

Behavioral Changes

  • The outbox and cache directories are no longer created by Sentry.init (#5792)
    • They are now created lazily by whichever component first writes into them, off the init thread. As a result, the directories at SentryOptions.getOutboxPath() and SentryOptions.getCacheDirPath() are not guaranteed to exist once Sentry.init returns.
    • If you write envelopes into the outbox path yourself instead of going through the SDK — as hybrid SDKs do for captureEnvelope — create the directory first, e.g. new File(outboxPath).mkdirs().

Improvements

  • Skip building Android manifest metadata debug log messages when debug logging is disabled, reducing allocations during SDK init (#5790)

Fixes

  • Use the original app build's ProGuard UUID for ANR profile chunks (#5852)
  • Fix potential ANR/deadlock in Session Replay when checkCanRecord runs on the replay executor thread (#5837)
  • Prevent concurrent PixelCopy access during Session Replay masking and bitmap cleanup (#5808)
  • Release MediaMuxer when the replay video encoder fails to start to avoid a resource leak (#5607)
  • Set the correct platform (android instead of java) on ANR profile chunks so they are billed as UI Profile Hours rather than Continuous Profile Hours (#5836)
  • Skip encoding and capturing buffered session replay segments while rate-limited, so we don't waste resources on envelopes the transport will drop (#5813)
    • These skipped replays are now reported as ratelimit_backoff discarded events in client reports, so they no longer disappear from drop statistics. One event is recorded per buffer flush rather than per segment.
    • Buffer mode is also kept while rate-limited instead of switching to session mode, so the rolling buffer stays warm and the next error after the rate limit expires can send a complete replay.

Performance

  • Create the outbox and cache directories lazily in their consumers instead of during SDK init, moving the mkdirs() calls off the init (main) thread (#5792)
  • Reduce the number of SDK threads: LifecycleWatcher now schedules the session-end task on the shared timer executor instead of creating a dedicated java.util.Timer thread (#5819)
  • Reduce the number of SDK threads: RateLimiter now schedules its rate-limit-lifted notifications on the shared timer executor instead of creating a dedicated java.util.Timer thread (#5814)
  • Speed up deserialization of arbitrary JSON objects by typing numbers without throwing exceptions (#5783)

Dependencies

@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Mar 20, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch 3 times, most recently from d4eec0d to d214afa Compare March 24, 2026 12:43
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.36.0 chore(deps): update Android SDK to v8.37.0 Mar 26, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from d214afa to 88c515f Compare March 26, 2026 03:55
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.37.0 chore(deps): update Android SDK to v8.37.1 Mar 27, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch 7 times, most recently from bbca653 to 858847d Compare April 2, 2026 14:17
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 858847d to 004996a Compare April 7, 2026 10:42
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.37.1 chore(deps): update Android SDK to v8.38.0 Apr 8, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 004996a to 90a5389 Compare April 8, 2026 21:59
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.38.0 chore(deps): update Android SDK to v8.39.0 Apr 17, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 90a5389 to e636389 Compare April 17, 2026 04:00
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.39.0 chore(deps): update Android SDK to v8.39.1 Apr 18, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch 2 times, most recently from d92dff6 to 37553fe Compare April 23, 2026 04:01
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.39.1 chore(deps): update Android SDK to v8.40.0 Apr 23, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 37553fe to 28f2eb0 Compare April 23, 2026 15:53
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch 2 times, most recently from a7f71ca to 4996d09 Compare May 1, 2026 04:18
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.40.0 chore(deps): update Android SDK to v8.41.0 May 7, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 4996d09 to 4e1e1aa Compare May 7, 2026 04:14
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 4e1e1aa to f2f750c Compare May 15, 2026 17:26
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 59a9b55 to 8376130 Compare June 11, 2026 04:28
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.43.2 chore(deps): update Android SDK to v8.44.0 Jun 18, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 8376130 to 0d5e663 Compare June 18, 2026 04:28
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.44.0 chore(deps): update Android SDK to v8.44.1 Jun 20, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 0d5e663 to fb4892c Compare June 20, 2026 04:26
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.44.1 chore(deps): update Android SDK to v8.45.0 Jun 25, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch 2 times, most recently from 49011b6 to 546a567 Compare June 26, 2026 01:30
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.45.0 chore(deps): update Android SDK to v8.46.0 Jun 26, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 546a567 to fce6360 Compare June 26, 2026 07:08
Comment thread android/build.gradle
@@ -91,5 +91,5 @@ repositories {

dependencies {
implementation project(':capacitor-android')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Removing items from the integrations list while iterating over it will cause a ConcurrentModificationException when enableNativeCrashHandling is false, crashing the app on startup.
Severity: CRITICAL

Suggested Fix

Do not modify the list while iterating. Instead, collect the integrations to be removed in a separate list during the loop, and then call integrations.removeAll() after the loop is finished. Alternatively, use the removeIf() method with a predicate for a more concise solution.

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: android/build.gradle#L93

Potential issue: When the `enableNativeCrashHandling` option is set to `false`, the code
iterates through a list of integrations and attempts to remove items from it directly
within the loop. The list, returned by `options.getIntegrations()`, is a
`CopyOnWriteArrayList`. Modifying this list while iterating over it with a for-each loop
will throw a `ConcurrentModificationException`. This will cause a crash during the
Sentry SDK initialization, preventing the application from starting correctly under this
specific, valid configuration.

Also affects:

  • android/src/main/java/io/sentry/capacitor/SentryCapacitor.java:149~156

Did we get this right? 👍 / 👎 to inform future reviews.

@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from fce6360 to 9a239de Compare June 30, 2026 02:27
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.46.0 chore(deps): update Android SDK to v8.47.0 Jul 3, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 9a239de to 75ed20e Compare July 3, 2026 04:15
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.47.0 chore(deps): update Android SDK to v8.48.0 Jul 9, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch 2 times, most recently from 36b3504 to 7cc3b01 Compare July 14, 2026 01:56
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 7cc3b01 to c1bb04c Compare July 17, 2026 03:59
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.48.0 chore(deps): update Android SDK to v8.49.0 Jul 17, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from c1bb04c to e66b608 Compare July 22, 2026 13:42
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.49.0 chore(deps): update Android SDK to v8.50.0 Jul 23, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from e66b608 to a145bbb Compare July 23, 2026 04:01
Comment thread android/build.gradle Outdated
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from a145bbb to 61100a6 Compare July 24, 2026 04:00
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.50.0 chore(deps): update Android SDK to v8.50.1 Jul 24, 2026
@github-actions github-actions Bot changed the title chore(deps): update Android SDK to v8.50.1 chore(deps): update Android SDK to v8.51.0 Jul 30, 2026
@github-actions
github-actions Bot force-pushed the deps/scripts/update-android.sh branch from 61100a6 to fbd60dd Compare July 30, 2026 03:58
Comment thread android/build.gradle
dependencies {
implementation project(':capacitor-android')
implementation 'io.sentry:sentry-android:8.41.0'
implementation 'io.sentry:sentry-android:8.51.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The captureEnvelope method does not create the outbox directory before writing, a new requirement in sentry-java 8.51.0, which can lead to silent event loss.
Severity: HIGH

Suggested Fix

Before the call to InternalSentrySdk.captureEnvelope in SentryCapacitor.java, ensure the outbox directory exists. This can be done by getting the outbox path from the Sentry options and calling new File(outboxPath).mkdirs().

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: android/build.gradle#L94

Potential issue: The update to `sentry-java` version 8.51.0 requires that the outbox
directory is created before writing envelopes to it. The `captureEnvelope` method in
`SentryCapacitor.java` calls `InternalSentrySdk.captureEnvelope` without first creating
this directory. If the directory does not exist, the operation will fail. This failure
is caught and results in a rejected promise on the JavaScript side, causing events to be
silently dropped instead of being sent to Sentry. This is a functional regression that
leads to data loss.

Also affects:

  • android/src/main/java/io/sentry/capacitor/SentryCapacitor.java:259~270

Did we get this right? 👍 / 👎 to inform future reviews.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fbd60dd. Configure here.

Comment thread android/build.gradle
dependencies {
implementation project(':capacitor-android')
implementation 'io.sentry:sentry-android:8.41.0'
implementation 'io.sentry:sentry-android:8.51.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing outbox directory creation

High Severity

Bumping to Android SDK 8.51.0 drops the guarantee that the outbox directory exists after Sentry.init. This hybrid SDK’s captureEnvelope path still relies on that directory being present and never calls mkdirs() first, so envelopes written through InternalSentrySdk.captureEnvelope can fail and drop JS events until some other component creates the path.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fbd60dd. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant