chore(deps): update Android SDK to v8.51.0 - #1173
Conversation
d4eec0d to
d214afa
Compare
d214afa to
88c515f
Compare
bbca653 to
858847d
Compare
858847d to
004996a
Compare
004996a to
90a5389
Compare
90a5389 to
e636389
Compare
d92dff6 to
37553fe
Compare
37553fe to
28f2eb0
Compare
a7f71ca to
4996d09
Compare
4996d09 to
4e1e1aa
Compare
4e1e1aa to
f2f750c
Compare
59a9b55 to
8376130
Compare
8376130 to
0d5e663
Compare
0d5e663 to
fb4892c
Compare
49011b6 to
546a567
Compare
546a567 to
fce6360
Compare
| @@ -91,5 +91,5 @@ repositories { | |||
|
|
|||
| dependencies { | |||
| implementation project(':capacitor-android') | |||
There was a problem hiding this comment.
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.
fce6360 to
9a239de
Compare
9a239de to
75ed20e
Compare
36b3504 to
7cc3b01
Compare
7cc3b01 to
c1bb04c
Compare
c1bb04c to
e66b608
Compare
e66b608 to
a145bbb
Compare
a145bbb to
61100a6
Compare
61100a6 to
fbd60dd
Compare
| dependencies { | ||
| implementation project(':capacitor-android') | ||
| implementation 'io.sentry:sentry-android:8.41.0' | ||
| implementation 'io.sentry:sentry-android:8.51.0' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
| dependencies { | ||
| implementation project(':capacitor-android') | ||
| implementation 'io.sentry:sentry-android:8.41.0' | ||
| implementation 'io.sentry:sentry-android:8.51.0' |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit fbd60dd. Configure here.


Bumps scripts/update-android.sh from 8.50.1 to 8.51.0.
Auto-generated by a dependency updater.
Changelog
8.51.0
Features
ProfilingManager(Perfetto) for continuous profiling on API 35+ devices (#5251)ProfilingManagerwith Perfetto-based stack sampling, providing lower-overhead and more accurate profiles. No configuration change is required.Debug-based profiler.enableLegacyProfilingoption (defaulttrue) to disable the legacyDebug-based profiler. Setting it tofalsedisables 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.io.sentry.profiling.enable-legacy-profilingmanifest flag.Behavioral Changes
Sentry.init(#5792)SentryOptions.getOutboxPath()andSentryOptions.getCacheDirPath()are not guaranteed to exist onceSentry.initreturns.captureEnvelope— create the directory first, e.g.new File(outboxPath).mkdirs().Improvements
Fixes
checkCanRecordruns on the replay executor thread (#5837)MediaMuxerwhen the replay video encoder fails to start to avoid a resource leak (#5607)androidinstead ofjava) on ANR profile chunks so they are billed as UI Profile Hours rather than Continuous Profile Hours (#5836)ratelimit_backoffdiscarded events in client reports, so they no longer disappear from drop statistics. One event is recorded per buffer flush rather than per segment.Performance
mkdirs()calls off the init (main) thread (#5792)LifecycleWatchernow schedules the session-end task on the shared timer executor instead of creating a dedicatedjava.util.Timerthread (#5819)RateLimiternow schedules its rate-limit-lifted notifications on the shared timer executor instead of creating a dedicatedjava.util.Timerthread (#5814)Dependencies