Skip to content

Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events#5795

Merged
alwx merged 10 commits intomainfrom
alwx/feature/expo-updates-listener
Mar 18, 2026
Merged

Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events#5795
alwx merged 10 commits intomainfrom
alwx/feature/expo-updates-listener

Conversation

@alwx
Copy link
Contributor

@alwx alwx commented Mar 10, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events

  • Tracks update checks, downloads, errors, rollbacks, and restarts as expo.updates breadcrumbs
  • Enabled by default in Expo apps (requires expo-updates to be installed)

Fixes #5425

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@alwx alwx self-assigned this Mar 10, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events by alwx in #5795
  • chore(deps): update JavaScript SDK to v10.44.0 by github-actions in #5832
  • fix(tracing): Fix native frames measurements dropped for idle transactions by antonis in #5813
  • feat(core): Support SENTRY_ENVIRONMENT in bare React Native builds by antonis in #5823
  • chore(deps): bump tar to ^7.5.11 by antonis in #5824
  • chore(deps): bump actions/create-github-app-token from 2.2.1 to 3.0.0 by dependabot in #5822
  • chore(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 by dependabot in #5820
  • chore(deps): bump reactivecircus/android-emulator-runner from 2.35.0 to 2.37.0 by dependabot in #5818
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.23.2 to 2.24.1 by dependabot in #5821
  • chore(deps): bump getsentry/craft from 2.23.2 to 2.24.1 by dependabot in #5819
  • chore(deps): bump undici from 6.23.0 to 6.24.1 by dependabot in #5817
  • chore(deps): bump flatted from 3.3.1 to 3.4.1 by dependabot in #5816
  • Ref: remove yarn from stub update by lucas-zimerman in #5811
  • Ref(CI): Unify stub update with android update by lucas-zimerman in #5807

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request
Warnings
⚠️

🤖 Replay Stubs Check

No changes detected in replay-stubs.jar

All file contents are identical (verified by SHA-256 hash comparison).

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against a8679b4

@alwx alwx changed the title WIP: Expo Updates listener Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events Mar 12, 2026
@alwx alwx marked this pull request as ready for review March 12, 2026 13:58
Copy link

@cursor cursor bot left a comment

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.

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

const ctx = event.context;
handleStateChange(previousContext, ctx);
previousContext = ctx;
});
Copy link

Choose a reason for hiding this comment

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

Listener callback lacks try/catch, risking app crash

Medium Severity

The addListener callback from expo-updates is not wrapped in a try/catch. If event.context is unexpectedly null/undefined, or if any getData function throws (e.g., the non-null assertion ctx.rollback!.commitTime at line 98, or the as Error cast at lines 82/90), the exception propagates unhandled into expo-updates internals and could crash the host app. Per project rules, SDK instrumentation errors must never crash the host application — dangerous paths need try/catch with graceful fallback. This violates the rule from the rules file requiring error paths to be handled explicitly.

Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be valid 👍

Copy link
Collaborator

@lucas-zimerman lucas-zimerman left a comment

Choose a reason for hiding this comment

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

looking good! My comments are the same ones as the ones made by Antonis

@alwx alwx requested review from antonis and lucas-zimerman March 18, 2026 09:52
Copy link
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for iterating on this @alwx 🙇
Overall the PR looks good to me. I think what remains is to address the two cursor comments:

@alwx
Copy link
Contributor Author

alwx commented Mar 18, 2026

@antonis both are fixed now!

@alwx alwx requested a review from antonis March 18, 2026 11:16
Copy link
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀
Thank you for iterating on this @alwx 🙇

@alwx alwx merged commit 6d9272d into main Mar 18, 2026
40 of 45 checks passed
@alwx alwx deleted the alwx/feature/expo-updates-listener branch March 18, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Expo] Expo Updates improvements

3 participants