chore(deps): update Android SDK to v8.55.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
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.

Bumps scripts/update-android.sh from 8.50.1 to 8.55.0.
Auto-generated by a dependency updater.
Changelog
8.55.0
Features
Session.State.Unhandledfor unhandled errors that do not terminate the process (#5919)Improvements
Fixes
Sentry.withScopeandSentry.withIsolationScopedata to events captured inside the callback whenglobalHubModeis enabled (#6004)globalHubModeis enabled by default on Android, where tags, extras, contexts and level set inside the callback were silently droppedSentry.setCurrentScopesor theSentryContextcoroutine integration, are now also honoured whenglobalHubModeis enabledSentry.pushScope,Sentry.pushIsolationScopeandSentry.popScoperemain no-ops whenglobalHubModeis enabledprofiler_idfrom transactions and spans when no Perfetto profile covers them, e.g. when Android'sProfilingManagerrate limits the profiling request (#6015)Internal
InternalSentrySdk.captureEnvelopeNonTerminatingfor hybrid SDKs (e.g. Flutter) so unhandled exceptions that don't terminate the process no longer end the session ascrashed(#5921)InternalSentrySdk.updateSessionForDroppedEventNonTerminatingso hybrid SDKs can still update the session when an error is dropped by sampling (#5990)Dependencies
8.54.0
Features
app.vitals.start.screenandapp.vitals.start.typeon standaloneapp.startchildren (#6005)SentryFeedbackOptions.setEnableAttachScreenshot(false)or theio.sentry.feedback.enable-attach-screenshotmanifest flag.androidx.activity>=1.8.2dependencySentry.replay()(#5978)start()andstartBuffering()calls bypass the configured replay sample rates; sampling still controls automatic startup.start()starts a full-session replay and does nothing if one is already recording.startBuffering()keeps a rolling buffer that is sent onflush()or an error, then continues in session mode.stop()ends the current replay; the nextstart()creates a new replay session.pause()suspends recording untilresume()and remains paused across background and foreground transitions and automatic replay restarts in the same process.resume()continues the same manually paused replay.flush()sends the current replay data, or starts a full-session replay when recording is stopped.Fixes
null.prefix before default-package class names when parsing Java and JNI frames from Android ANR thread dumps (#5979)Performance
Dependencies
8.53.0
Features
ISpan(#5929)ISpan.startChildoverloads withSpanOptionspublic (#5927)Sentry.feedback().enableOnShake(),Sentry.feedback().disableOnShake(), andSentry.feedback().isOnShakeEnabled()to toggle and query shake-to-report at runtime (#5827)Improvements
ApiStatus.Experimentalannotation fromSentrySQLiteDriver(#5938)Fixes
Scope.clear()(#5902)Throwableidentities when R8 optimizes Android apps (#5881)Performance
Process.getElapsedCpuTime()instead of parsing/proc/self/stat(33.6kB to 16 bytes per sample on a Pixel 3) (#5926)Dependencies
8.52.0
Fixes
ClientReportRecordernow reads the item count from the envelope item header instead of deserializing the payload, which under sustained rate limiting could pin CPU cores while repeatedly throwing exceptionsISentryExecutorServiceas cancelled (#5874)NoOpSentryExecutorServicepreviously returned aFuturethat was never run and never cancelled, so callers could not tell a dropped task from a queued one andget()would block until its timeoutPerformance
SentryFrameMetricsCollectorduringSentry.init(#5886)shutdownTimeoutMilliswhen closing the SDK with a pending transaction timeout or session-end task (#5851)RGB_565instead ofARGB_8888for screenshot and replay capture bitmaps, halving per-frame memory usage (#5821)SentryPerformanceProvider, which was allocated on every cold start inContentProvider.onCreatewithout ever being acquired (#5871)HostnameCacheworker thread now times out while idle instead of staying alive for the whole process lifetime (#5817)Dependencies
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