-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
react-native on android in production make error that can't read #731
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
Comments
@vehas – the stack trace is what React Native gives us through its own error handler. We certainly don't re-write the stack trace to say This is probably just a limitation of React Native production builds on Android. Anecdotally, iOS seems to give much more. |
@vehas how did you work around this? got the same issue on my LG G3 |
@benvinegar I don't think it because of React Native on Android, in fact I managed to get the log of a crash on production Android app. It looks like this
I think above log is okay because I tried the same crash on iOS production build and here is the iOS crash log
|
Note that that those values don't include filenames (e.g. An error object is passed through the handler via Unfortunately I'm not an Android developer, so there's not much I can do here other than to say – if you find something that's incorrect, that can be addressed from the JavaScript layer, I'd be glad to accept PRs. One thing you could try is making a dump of the raw error from the React Native plugin and see if it differs from the crash that appears in Sentry. |
@benvinegar I got your point, but it's a single bundle of javascript code so that IMO there is no need for Because our company uses Sentry for RN on production so we will try our best to figure out what we can do about this. |
We faced the same issue, and this fix denstepa@885f0a1 helped us to get stacktraces and source maps working for android in production mode. The problem was with path to file that was I will try to check if it could causes problems in other browsers etc and will do pull request a bit later |
@denstepa keep us in the loop, thanks |
I tried out @denstepa's fix (with RN 0.40.0). It kinda works but the Sentry UI gets confused trying to map it to the original source and messes up the top frame of the stack trace. The raw JSON looks a bit better but the |
@danieldkim I think it will be better if we can test @denstepa's fix with RN <0.40.x since there are breaking changes in 0.40.x. |
OK that's fine but I don't think there any breaking changes in that 0.40.0 that would affect this issue. |
Hey everyone here – I would love to take this fix upstream, but I need:
Can someone help? |
@benvinegar I can help you to create minimum RN project that can reproduce the bug. Is it what you're looking for? |
@benvinegar I'm not sure how to create the test frames, but I can confirm that the fix is working for me. I'm currently using @denstepa's fix in my Android app in prod (running react native 0.37). |
@benvinegar I also confirm that the fix is working for me |
@khanghoang – I'm just looking for a set of frames, e.g. dumped/printed from a RN app on Android, that I can use to create an automated test case to prevent future regressions. e.g. like those found here. If anyone can provide this, I will gladly merge in the fix, the test, and publish a new version. |
@benvinegar Here is a stacktrace from my app
|
@benvinegar I have an android app which also has this issue. I'm happy to provide the dump/printed if you could guide me how to get it? |
Does everybody else's traces look like the one posted by @misterecco? |
1. Don't treat presence of "native" string everywhere as meaning "native code" 2. Properly parse when not protocol / only leading forward slash fixes #731
Participants on this thread: could you check out #875 and let me know if that works for you? The test is using the sample stack trace from @misterecco. |
@benvinegar the problem is still there :( |
@khanghoang – using #875? Can you dump the stack trace somewhere? |
Basically, I can't accept @denstepa's fix until I (or someone else) can write a test that demonstrates/explains why we are matching this:
It's probably related |
@denstepa can you help us write a test to get this deployed? |
@benvinegar yes, I used #875 and it still didn't work |
1. Don't treat presence of "native" string everywhere as meaning "native code" 2. Properly parse when not protocol / only leading forward slash fixes #731
@benvinegar It looks to me that the issue is that the This is the one when the bundle lives in asset
This is the one when the bundle lives in cache
|
@benvinegar +1. I have this on Android.
For iOS it's okey:
|
@benvinegar The fix added in 3.14.0 release doesn't seem to work. I'm sorry if it's because of the stacktrace I posted before (which was most probably not obtained correctly). Here are two raw stacktraces straight from logcat. I hope they will be more useful in resolving the issue (@denstepa's fork still seems to be working fine). I'm using react native v0.42.3 |
I am still facing the issue. Would like to check on the status of this. Using: Would be glad to give any additional info required. Thanks :) |
I am facing this issue as well. It's really a blocker for us right now, given that we cant get crash reports on sentry for android without this working. I'm going to look for a solution, let me know if you guys find anything. |
Same here, I tried @denstepa's fix as well. Not working |
@denstepa's fix mostly works, but the only thing that appears to be off, is that the very top of the callstack, where the exception occurs, is off. It points to the wrong line of code. All of the other parts of the stack trace point to the correct line of code. So maybe his fix works, but there is some other bug as well? |
…using denstepa's solution: getsentry#731
I can confirm what @alexkring says. Using the Nextdoor/raven-js fork I actually get a stacktrace instead of the |
This has been fixed and will be in the next release. |
i got this in some part of json file in sentry server which send from
raven 3.70 android 6.0.1 Mi4 model
the first one show only
[native code]
message vs show path and module in the simulater devicecompare with this json in simulator ( api 23, android 6.0.0 )
The text was updated successfully, but these errors were encountered: