-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
@sentry/react-native - Hermes Support #649
Comments
1.x.x
- Hermes Support1.x.x
- Hermes Support
1.x.x
- Hermes Support
@HazAT: Please let me know if there's anything we can do on the React Native side to make this easier. |
@motiz88 Thanks again :) Is there any way to output the minified js bundle that hermes uses internally? We initially thought the |
x_facebook_sources is indeed designed for this (and is inherently more robust and complete than inspecting the bundled JS) so let's make it work. Can you share a complete example where it doesn't work for you? |
@motiz88 Let me know if you need anything else. |
@HazAT React Native 0.61 updates Metro (transitively via the RN CLI) to a version that populates |
@motiz88 there is no |
@motiz88 I can confirm with |
Hi @HazAT, any timeline updates yet? |
Will this mean react-native-v8 will be suported? |
Hello @HazAT! Is there anything the community can help with? I think it's kind of a blocking issue for a lot of RN developers as it's impossible to use Sentry with Hermes now. Could you please let us know how we can help or is there any timeline on fixing it from Sentry's side? |
@gaykov Thank you for offering your help 🙏 |
So a quick description of the problem from me (who built a lot of the current version of the source map processing) for why Hermes is different: Under normal circumstances we use the source map and minified file to look up a location in the source map, then reverse tokenize from that location in the minified source to the last function declaration that matches the function name in the backtrace. Then we use the source map to map this back into the original token at that location. This is described in greater detail here: https://blog.sentry.io/2019/07/16/building-sentry-source-maps-and-their-problems With Hermes this approach no longer works because Hermes doesn't actually have source maps or minified source code. Instead if has something similar to source maps where the column offset is a bytecode instruction. Since there is no minified source, there is nothing to step back on. Additionally it requires changes to how the filenames are processed in the stack traces because there is again no actual minified file that shows up there. If someone is interested in helping out on the implementation of this I can go into further detail on discord and explain the current ideas I have for dealing with it. |
Short update, @Swatinem did an amazing job, we have Hermes internally implemented and tested. Kudos to @bruno-garcia @marandaneto PR links: |
Thank you all for your patience! |
@HazAT thanks for the updates! Maybe i'm doing something wrong but i just updated to 1.3.0 and i'm getting the following error when compiling: Do we need to have a
Works fine with Update:
|
Looks like I have issues with the dependency
|
@mxmzb we're merged packages on jcenter and that seems to have unlisted our package. |
it should be fixed :) |
I am still getting the same gibberish even after upgrading and uploading the new release with updated sourcemaps. Any tips if I am missing something? Is there a specific sentry server version needed to support this? Things I did:
|
@capJavert hey, it might be related to #772 |
Not really, My sourcemaps are generated and uploaded and look fine but for some reason when erroris logged in Sentry its still like the image above. |
@capJavert Can you please link to this issue on sentry.io? |
Nope, we use private instance of sentry inside the company. So the screenshot is from there. That is why I asked if some specific version of sentry server is required for this feature. |
I am pretty sure we didn't release an official image containing support for Hermes. You need to use the latest master or wait for the new release (I can't tell you when this will be). |
But it says so in the release notes: https://github.com/getsentry/sentry-react-native/releases/tag/1.3.0 |
@HazAT was talking about Sentry. There are lots of changes on the backend to support this. https://hub.docker.com/r/getsentry/sentry You will need to update your on-prem installation to have the latest version of Sentry, and the latest SDK (seems you've got that covered). |
@bruno-garcia Oh, I see, thanks for clarifying! |
Hi @HazAT , Into the next release of react-native also in ios hermes will avaiable, react-native-sentry is ready for this? |
If the sourcemaps use a compatible format, its just a matter of tooling to make sure we use it for symbolication. Maybe file a new issue for this? |
Created an Issue to investigate and ensure we support this: #1262 |
The current version as of
1.0.1
we have very basic support for Hermes bundles meaning we are able to get function names but not showing the correct line number / source code for the crash.In order for us to support it fully, we need to do some changes on how we process minified sources and source maps on the server.
Keep an eye on this issue if you are interested in this topic.
1.0.1
The text was updated successfully, but these errors were encountered: