Skip to content

fix(core): Fix includeWebFeedback crash by stubbing browser wrapper modules - #6150

Merged
antonis merged 5 commits into
mainfrom
fix/include-web-feedback-crash
May 19, 2026
Merged

fix(core): Fix includeWebFeedback crash by stubbing browser wrapper modules#6150
antonis merged 5 commits into
mainfrom
fix/include-web-feedback-crash

Conversation

@antonis

@antonisantonis commented May 15, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

When includeWebFeedback: false is set in the Metro config, the app crashes at startup with:

TypeError: buildFeedbackIntegration is not a function (it is undefined)

Root cause: The feedback resolver stubs @sentry-internal/feedback to an empty module, but @sentry/browser's barrel file imports ./feedbackSync.js and ./feedbackAsync.js, which callbuildFeedbackIntegration() at module evaluation time. Since the feedback package is empty, the function is undefined and the call crashes before any app code runs.

This differs from replay (includeWebReplay: false), which works because @sentry/browser only re-exports symbols from @sentry-internal/replay without calling them at evaluation time.

Fix: The feedback resolver now also stubs feedbackSync.js and feedbackAsync.js when imported from @sentry/browser, preventing them from evaluating and calling into the empty module. The buildSentryPackageExcludeResolver helper is changed from a RegExp to a shouldExcludeModule function to support this origin-aware matching.

💡 Motivation and Context

Fixes#6149

Introduced in #6025 — the includeWebFeedback option was modeled after includeWebReplay, but feedback has a different integration pattern in @sentry/browser (eager function call vs plain re-export).

💚 How did you test it?

  • Added 16 unit tests for the wrapper module exclusion (feedbackSync.js, feedbackAsync.js)
  • Added an integration-style test that simulates all @sentry/browser barrel imports and verifies only feedback-related modules are stubbed
  • All 169 tests pass (142 existing + 27 new)
  • Build and lint pass

📝 Checklist

🔮 Next steps

…per modules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actionsBot commented May 15, 2026

Copy link
Copy Markdown
Contributor

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).


  • fix(core): Fix includeWebFeedback crash by stubbing browser wrapper modules by antonis in #6150
  • fix(core): Deduplicate native HTTP breadcrumbs by antonis in #6132
  • chore(deps): bump brace-expansion from 5.0.5 to 5.0.6 by dependabot in #6183
  • chore(deps): bump ws from 8.16.0 to 8.20.1 by dependabot in #6184
  • fix(ios): Use conditional import for SentrySwizzle.h by antonis in #6186
  • fix(ios): use framework-style import for SentrySwizzle.h by alwx in #6181
  • chore(deps): bump actions/create-github-app-token from 3.1.1 to 3.2.0 by dependabot in #6178
  • chore(deps): bump github/codeql-action from 4.35.4 to 4.35.5 by dependabot in #6176
  • chore(deps): bump getsentry/craft from 2.26.3 to 2.26.5 by dependabot in #6179
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.26.3 to 2.26.5 by dependabot in #6177
  • fix(core): Resolve expo CLI directly instead of using npx in sourcemap upload by antonis in #6155
  • feat(core): Surface textComponentNames option in Metro config by antonis in #6169
  • chore(deps): update Sentry Android Gradle Plugin to v6.7.0 by github-actions in #6153
  • Filter ExceptionsManager.reportException duplicates in app-start init by alwx in #6145
  • chore(deps): update JavaScript SDK to v10.53.1 by github-actions in #6139
  • feat(core): Enable autoInjectSentryLabel by default in Metro config by antonis in #6141
  • feat(core): Respect Mask boundaries when reading sentry-label by antonis in #6142
  • fix(android): Handle boolean values in JSON options converter by antonis in #6130
  • Multi-instance <TimeToInitialDisplay> / <TimeToFullDisplay> coordination; a multi-signal TTID/TTFD system by alwx in #6090
  • chore(deps): update Bundler Plugins to v5.3.0 by github-actions in #6138
  • chore: Merge 8.11.1 back to main by antonis in #6135
  • chore: Update warning regarding iOS crash in sentry-cocoa 9.12.0 by antonis in #6136
  • chore(deps): update CLI to v3.4.2 by github-actions in #6129
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.26.2 to 2.26.3 by dependabot in #6126

Plus 11 more


🤖 This preview updates automatically when you update the PR.

@cursorcursorBot 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6d60b11. Configure here.

@antonis
antonis marked this pull request as ready for review May 15, 2026 11:47
@antonisantonis added the ready-to-merge Triggers the full CI test suite label May 15, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time492.17 ms529.51 ms37.34 ms
Size48.30 MiB53.54 MiB5.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
3d377b5+dirty406.18 ms453.52 ms47.34 ms
8929511+dirty405.33 ms452.16 ms46.83 ms
100ce80+dirty463.66 ms539.56 ms75.90 ms
3817909+dirty406.67 ms416.58 ms9.91 ms
3b6e9f9+dirty442.70 ms486.44 ms43.74 ms
4e0ba9c+dirty452.84 ms473.36 ms20.52 ms
5fe1c6c+dirty401.62 ms445.28 ms43.66 ms
44c8b3f+dirty414.20 ms457.28 ms43.08 ms
890d145+dirty504.54 ms491.55 ms-12.99 ms
3ce5254+dirty410.57 ms448.48 ms37.91 ms

App size

RevisionPlainWith SentryDiff
3d377b5+dirty43.75 MiB48.14 MiB4.39 MiB
8929511+dirty43.75 MiB48.16 MiB4.41 MiB
100ce80+dirty48.30 MiB53.46 MiB5.15 MiB
3817909+dirty43.75 MiB48.08 MiB4.33 MiB
3b6e9f9+dirty48.30 MiB53.54 MiB5.23 MiB
4e0ba9c+dirty48.30 MiB53.49 MiB5.19 MiB
5fe1c6c+dirty43.75 MiB48.14 MiB4.39 MiB
44c8b3f+dirty48.30 MiB53.46 MiB5.15 MiB
890d145+dirty43.75 MiB48.14 MiB4.39 MiB
3ce5254+dirty43.75 MiB48.12 MiB4.37 MiB

@sentry

sentryBot commented May 15, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App NameApp IDVersionConfiguration
Sentry RNio.sentry.reactnative.sample8.11.1 (88)Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions

github-actionsBot commented May 15, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

PlainWith SentryDiff
Startup time3839.67 ms1227.82 ms-2611.84 ms
Size5.15 MiB6.68 MiB1.53 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
5fe1c6c+dirty1220.79 ms1217.63 ms-3.16 ms
7d8c8bd+dirty3837.24 ms1215.51 ms-2621.73 ms
df5d108+dirty1225.90 ms1220.14 ms-5.76 ms
23598c3+dirty1207.00 ms1209.90 ms2.90 ms
bc0d8cf+dirty3830.33 ms1220.52 ms-2609.81 ms
5a21b51+dirty3823.11 ms1214.46 ms-2608.65 ms
3817909+dirty1183.90 ms1187.50 ms3.60 ms
d2eadf8+dirty3842.42 ms1228.91 ms-2613.50 ms
5c1e987+dirty1204.30 ms1222.15 ms17.85 ms
7d6fd3a+dirty1223.29 ms1229.57 ms6.28 ms

App size

RevisionPlainWith SentryDiff
5fe1c6c+dirty3.38 MiB4.77 MiB1.39 MiB
7d8c8bd+dirty5.15 MiB6.68 MiB1.53 MiB
df5d108+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
5a21b51+dirty5.15 MiB6.67 MiB1.51 MiB
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
d2eadf8+dirty5.15 MiB6.67 MiB1.51 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
7d6fd3a+dirty3.38 MiB4.77 MiB1.39 MiB

Previous results on branch: fix/include-web-feedback-crash

Startup times

RevisionPlainWith SentryDiff
e8df448+dirty3837.14 ms1222.50 ms-2614.64 ms

App size

RevisionPlainWith SentryDiff
e8df448+dirty5.15 MiB6.68 MiB1.53 MiB

@github-actions

github-actionsBot commented May 15, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time3830.49 ms1212.60 ms-2617.89 ms
Size5.15 MiB6.68 MiB1.53 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
5fe1c6c+dirty1201.36 ms1209.15 ms7.78 ms
7d8c8bd+dirty3847.98 ms1230.77 ms-2617.21 ms
df5d108+dirty1207.34 ms1210.50 ms3.16 ms
23598c3+dirty1223.59 ms1229.13 ms5.53 ms
bc0d8cf+dirty3834.64 ms1223.91 ms-2610.73 ms
5a21b51+dirty3837.87 ms1223.47 ms-2614.40 ms
3817909+dirty1210.76 ms1215.64 ms4.89 ms
d2eadf8+dirty3841.53 ms1216.15 ms-2625.39 ms
5c1e987+dirty1208.43 ms1220.72 ms12.29 ms
7d6fd3a+dirty1210.89 ms1217.63 ms6.74 ms

App size

RevisionPlainWith SentryDiff
5fe1c6c+dirty3.38 MiB4.77 MiB1.39 MiB
7d8c8bd+dirty5.15 MiB6.68 MiB1.53 MiB
df5d108+dirty3.38 MiB4.73 MiB1.35 MiB
23598c3+dirty3.38 MiB4.80 MiB1.42 MiB
bc0d8cf+dirty5.15 MiB6.67 MiB1.51 MiB
5a21b51+dirty5.15 MiB6.67 MiB1.51 MiB
3817909+dirty3.38 MiB4.73 MiB1.35 MiB
d2eadf8+dirty5.15 MiB6.67 MiB1.51 MiB
5c1e987+dirty3.38 MiB4.73 MiB1.35 MiB
7d6fd3a+dirty3.38 MiB4.77 MiB1.39 MiB

Previous results on branch: fix/include-web-feedback-crash

Startup times

RevisionPlainWith SentryDiff
e8df448+dirty3822.83 ms1219.24 ms-2603.59 ms

App size

RevisionPlainWith SentryDiff
e8df448+dirty5.15 MiB6.68 MiB1.53 MiB

@github-actions

github-actionsBot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

PlainWith SentryDiff
Startup time483.90 ms519.25 ms35.35 ms
Size48.30 MiB53.54 MiB5.23 MiB

Baseline results on branch: main

Startup times

RevisionPlainWith SentryDiff
4e0ba9c+dirty421.39 ms455.80 ms34.41 ms
5fe1c6c+dirty365.84 ms408.62 ms42.78 ms
d2eadf8+dirty468.02 ms530.37 ms62.35 ms
c004dae+dirty404.60 ms430.67 ms26.07 ms
d038a14+dirty405.08 ms444.36 ms39.28 ms
0d9949d+dirty414.88 ms428.68 ms13.81 ms
bc0d8cf+dirty407.66 ms461.35 ms53.69 ms
7d6fd3a+dirty435.06 ms458.78 ms23.72 ms
2c735cc+dirty435.20 ms459.48 ms24.28 ms
ad66da3+dirty411.49 ms449.38 ms37.89 ms

App size

RevisionPlainWith SentryDiff
4e0ba9c+dirty48.30 MiB53.49 MiB5.19 MiB
5fe1c6c+dirty43.94 MiB49.00 MiB5.06 MiB
d2eadf8+dirty48.30 MiB53.48 MiB5.18 MiB
c004dae+dirty48.30 MiB53.49 MiB5.19 MiB
d038a14+dirty48.30 MiB53.49 MiB5.19 MiB
0d9949d+dirty43.94 MiB48.99 MiB5.05 MiB
bc0d8cf+dirty48.30 MiB53.48 MiB5.18 MiB
7d6fd3a+dirty43.94 MiB49.00 MiB5.06 MiB
2c735cc+dirty43.94 MiB48.94 MiB5.00 MiB
ad66da3+dirty48.30 MiB53.49 MiB5.19 MiB

Previous results on branch: fix/include-web-feedback-crash

Startup times

RevisionPlainWith SentryDiff
e8df448+dirty299.08 ms326.67 ms27.59 ms

App size

RevisionPlainWith SentryDiff
e8df448+dirty48.30 MiB53.54 MiB5.23 MiB

@lucas-zimermanlucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@antonis
antonis enabled auto-merge (squash) May 19, 2026 09:10
@antonisantonis removed the ready-to-merge Triggers the full CI test suite label May 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against 118a32c

@antonis
antonis merged commit 1122a96 into mainMay 19, 2026
52 of 65 checks passed
@antonis
antonis deleted the fix/include-web-feedback-crash branch May 19, 2026 09:50
antonis added a commit to getsentry/sentry-docs that referenced this pull request May 21, 2026
…17775)
## DESCRIBE YOUR PR
Restores the `includeWebFeedback` option to the Metro "Reduce Bundle
Size" docs, reverting the removal from
#17774.
The SDK fix for the crash has landed in
getsentry/sentry-react-native#6150.
**Do not merge until the SDK fix is released.**
## IS YOUR CHANGE URGENT?
- [ ] Urgent deadline:
- [ ] Other deadline:
- [x] None: Not urgent, can wait up to 1 week+
⚠️ Should be merged after
getsentry/sentry-react-native#6150 is released
## PRE-MERGE CHECKLIST
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for freeto 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.

Docs example for includeWebFeedback/includeWebReplay crashes at startup

2 participants

@antonis@lucas-zimerman