Skip to content

fix(core): Skip native frames while searching frame URLs. #3897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 18, 2021
Merged

fix(core): Skip native frames while searching frame URLs. #3897

merged 2 commits into from
Aug 18, 2021

Conversation

luin
Copy link
Contributor

@luin luin commented Aug 17, 2021

When the exceptions are thrown from native code (see To reproduce below), InboundFilters#_getLastValidUrl() returns [native code] instead of a valid URL, causing InboundFilters#_isAllowedUrl() fail.

This PR skips native frames to solve the issue.

Package + Version

@sentry/browser@6.11.0

To reproduce

Visit https://codepen.io/luin/pen/qBmGgwv on Safari. It contains a regexp that Safari doesn't support. The error stack will show on the alert box. Notice that the first frame is [native code].


  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

@luin luin requested a review from kamilogorek as a code owner August 17, 2021 16:00
@kamilogorek kamilogorek merged commit 19ef32c into getsentry:master Aug 18, 2021
@kamilogorek
Copy link
Contributor

Thanks!

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