Skip to content

Fix SentryUserInteractionWidget throwing when Sentry is not enabled#1363

Merged
marandaneto merged 4 commits into
getsentry:mainfrom
kuhnroyal:fix/interaction-disabled
Mar 28, 2023
Merged

Fix SentryUserInteractionWidget throwing when Sentry is not enabled#1363
marandaneto merged 4 commits into
getsentry:mainfrom
kuhnroyal:fix/interaction-disabled

Conversation

@kuhnroyal

Copy link
Copy Markdown
Contributor

📜 Description

SentryUserInteractionWidget always attempts to cast the hub.options to SentryFlutterOptions- this cast can fail if Sentry.isEnabled is false or due do bad configuration. A simple type check was added to avoid this.

💡 Motivation and Context

💚 How did you test it?

📝 Checklist

  • I reviewed submitted code
  • 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
  • All tests passing
  • No breaking changes

🔮 Next steps

Not sure what more to test.

@codecov

codecov Bot commented Mar 27, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: -1.14 ⚠️

Comparison is base (8ced2dc) 91.02% compared to head (8e75665) 89.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1363      +/-   ##
==========================================
- Coverage   91.02%   89.89%   -1.14%     
==========================================
  Files         160      179      +19     
  Lines        5113     5747     +634     
==========================================
+ Hits         4654     5166     +512     
- Misses        459      581     +122     
Impacted Files Coverage Δ
...er_interaction/sentry_user_interaction_widget.dart 95.08% <100.00%> (+0.04%) ⬆️

... and 19 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good catch @kuhnroyal
can you add a changelog entry? thanks

@kuhnroyal

Copy link
Copy Markdown
Contributor Author

good catch @kuhnroyal can you add a changelog entry? thanks

Done

@marandaneto
marandaneto enabled auto-merge (squash) March 28, 2023 10:44
@marandaneto
marandaneto merged commit 8e133ad into getsentry:main Mar 28, 2023
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.

2 participants