-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
How to generate source maps for Hermes iOS #3087
Comments
Since both Sentry and If I'm looking correctly you are uploading Hermes bundle and combined source map. My guess is this is the It looks like you are not emitting Hermes source maps during the build. This has a side effect -> only the packager source map will work even though you are using Hermes. If you use |
Still having trouble both locally and with betas. 🤔 Will try to break down what I tried out so far: As far as I understand we are not using We didn't have the Theoretically that was the thing that should work right? What we get now though is the following: debugging locally: npx metro-symbolicate dist/main.jsbundle.map < stacktrace.txt
// result
Error: Sentry test error
at onPress (http:null:null:null)
at onPressWrapped (http:null:null:null)
at onPress (http:null:null:null)
at _performTransitionSideEffects (http:null:null:null)
at _receiveSignal (http:null:null:null)
at onResponderRelease (http:null:null:null)
at apply (native)
at invokeGuardedCallbackProd (http:null:null:null)
at apply (native)
at invokeGuardedCallback (http:null:null:null)
at apply (native)
at invokeGuardedCallbackAndCatchFirstError (http:null:null:null)
at executeDispatch (http:null:null:null)
at executeDispatchesInOrder (http:null:null:null)
at executeDispatchesAndRelease (http:null:null:null)
at executeDispatchesAndReleaseTopLevel (http:null:null:null)
at forEach (native)
at forEachAccumulated (http:null:null:null)
at runEventsInBatch (http:null:null:null)
at runExtractedPluginEventsInBatch (http:null:null:null)
at anonymous (http:null:null:null)
at batchedUpdates$1 (http:null:null:null)
at batchedUpdates (http:null:null:null)
at _receiveRootNodeIDEvent (http:null:null:null)
at receiveTouches (http:null:null:null)
at apply (native)
at __callFunction (http:null:null:null)
at anonymous (http:null:null:null)
at __guard (http:null:null:null)
at callFunctionReturnFlushedQueue (http:null:null:null)%
Am I on the right direction or did I miss something? |
On the beta side of things (same process as above) on this event it points to the correct file but it is some lines off. It should have been ![]() and seems like it generated two events instead of one 🤔 : first: https://artsynet.sentry.io/issues/4223840389/events/9036f990f05a4c3e8cfda9828f97ccf8/ |
@gkartalis Yes, you are definitely on the right path and the steps you have done are correct. Unfortunately, there was a bug in RN 0.69 and you need to explicitly |
Tried it out with a fresh beta 🤔. Adding the USE_HERMES=true flag didn't change anything on sentry. Although for some extra context the problem might be lying somewhere else, before hermes our iOS stacktrace was even more off than it is now. Now it is around 100lines off while before hermes it was pointing a wrong file (only on iOS). This is an example of how the same event looks like without hermes. Let me know if I should close this issue. |
Just to recap after adding I've noticed one more difference in your PR how the Xcode bundles the JS and how your script bundles the JS. In your script, you use You can use PS.: Yes, I believe we can close. |
Thanks a lot! Yes local symbolication works great! Will also try out the Thanks a lot for the help @krystofwoldrich |
@krystofwoldrich just an update 🤦♂️ The issue was our entry file. Thanks a lot again! Confirming that it works perfectly now. |
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 3.2.13
react-native
version: 0.69.10Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
Link to issue
Configuration:
(
@sentry/react-native
)I have following issue:
Hello,
we recently upgraded to 0.69.10 in https://github.com/artsy/eigen/
Our issue is that when we are uploading the ios source maps to Sentry they render like this:
![Screenshot 2023-05-11 at 17 41 22](https://private-user-images.githubusercontent.com/21178754/240311045-d0a3c497-92cd-4e28-96b3-d9909c00c0b5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE4NDU4MjYsIm5iZiI6MTcyMTg0NTUyNiwicGF0aCI6Ii8yMTE3ODc1NC8yNDAzMTEwNDUtZDBhM2M0OTctOTJjZC00ZTI4LTk2YjMtZDk5MDljMDBjMGI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI0VDE4MjUyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFiMzk3NDVmNDc0OGQzNmFlOGFhMTE0MTZhZDY2Y2UzMTQ2NWQ5YmVjOGE1Y2Y2ODRmODA3YTIzZmY1NWY0MTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.NN4Iw9XE4OFzDKOMyRpYkQPbRYPVmvbkFw-QOcvaMMo)
They point to a different file than the one that triggered the crash.
The way we bundle and upload the app is that we use fastlane that uses the yarn bundle:ios script which bundles the app and generates the jsbundle and bytecode and finally composing the sourcemaps.
We have this open PR where we are trying to fix it.
Before we enabled hermes iOS souremaps were still off by [x]
Steps to reproduce:
After composing the source maps we upload them to sentry.
when downloading the sourcemap that was uploaded to sentry and the raw stacktrace from the issue and adding it to a
stacktrace.txt
file in my project and doing the following:npx metro-symbolicate dist/main.jsbundle.map < stacktrace.txt
it parses the error weirdly and I get something like this:
Actual result:
Expected result:
Something more readable like:
The text was updated successfully, but these errors were encountered: