Skip to content

Fix android react native release builds stacktrace #985

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 1 commit into from
Jun 28, 2017

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Jun 27, 2017

This is basically this PR with a test: #950
Thx @yury

It seems that if you build a react native android app in release, the stacktrace has a special format.
This PR fixes the regex we have.

Also discussed this with @mitsuhiko, this PR is the faster, a bit more hacky solution.
I didn't dare to refactor the whole computeStackTraceFromStackProp function.
Someday we could refactor it like:
before we iterate every line and check which regex matches, we could first detect what kind of stacktrace it is and then just use the specific regex.

Nevertheless, tested it also in a real react-native app and it works.

Before:
screen shot 2017-06-27 at 15 25 56

After:
screen shot 2017-06-27 at 15 36 54

@HazAT HazAT self-assigned this Jun 27, 2017
@HazAT HazAT requested a review from benvinegar June 27, 2017 13:27
Copy link
Contributor

@benvinegar benvinegar left a comment

Choose a reason for hiding this comment

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

Indentation looks funny, but it's tested, so +1.

@HazAT HazAT merged commit 41af72e into master Jun 28, 2017
@HazAT HazAT deleted the bugfix/fix-android-react-native-stacktrace branch June 28, 2017 06:26
berrytj added a commit to mdcollab/raven-js that referenced this pull request Jan 14, 2018
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