New Architecture native errors reporting #109
Unanswered
krystofwoldrich
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Thanks for raising this point @krystofwoldrich Error reporting is a known issue in the New Architecture space. As you said, ideally having the stacktrace propagated to JS would be beneficial. We're open to contribution or collaboration on this space. Specifically if folks at Sentry are interested in contributing on this part fo the New Architecture experience, we'd more than happy to support it (cc @marandaneto) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As discussed in the issue facebook/react-native#34923 (based on @getsentry adding support for the New Architecture getsentry/sentry-react-native#2226 (comment)), the new architecture native errors are quite unreadable with exception of iOS Turbo Modules.
The issue facebook/react-native#34923 describes Java RuntimeException that ends up as a Cpp crash without any information pointing toward the origin, toward Java.
Pure Cpp Modules, like the example added in RN 0.71 facebook/react-native@d07575b are in a very similar situation as the Java exception. With the difference that the error is propagated to JS, but also without any traces of the original error. I see that from the error name there should be at least the function name, but in my case, it ends up
<unknown>
.Example of the Cpp crash. Error

Exception in HostFunction: <unknown>
I personally like that the error is propagated back to the JS layer, I think it's very convenient for RN developers. I could imagine the original stack trace could be saved in the JS error in the
error.cause
property.I would like to discuss here, how this could be made better, what the solution could look like, what can be achieved etc...
Beta Was this translation helpful? Give feedback.
All reactions