Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events#5795
Add expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events#5795
expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events#5795Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
|
expoUpdatesListenerIntegration that records breadcrumbs for Expo Updates lifecycle events
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.
| const ctx = event.context; | ||
| handleStateChange(previousContext, ctx); | ||
| previousContext = ctx; | ||
| }); |
There was a problem hiding this comment.
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.
Triggered by project rule: PR Review Guidelines for Cursor Bot


📢 Type of change
📜 Description
Add
expoUpdatesListenerIntegrationthat records breadcrumbs for Expo Updates lifecycle eventsexpo.updatesbreadcrumbsexpo-updatesto be installed)Fixes #5425
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps