Open saarazari5 opened 6 days ago
Hi @saarazari5, thank you for the message,
could you share a bit more details about the issue?
Note that the debugIDs are only generated and added to the events in production bundles.
How do you check the event payload?
bundle image does not have a reference anymore
It that during the source maps upload? Could you share the upload command output?
Hi @saarazari5, thank you for the message,
could you share a bit more details about the issue?
Note that the debugIDs are only generated and added to the events in production bundles.
How do you check the event payload?
bundle image does not have a reference anymore
It that during the source maps upload? Could you share the upload command output?
Hi @krystofwoldrich , thank you for the quick replay, of course:
1) how does sentry separate between a production bundle and dev bundle? since it seems like for some events it did sent debug_id even though the flow was the same.
2) I checked the event payload by pressing "View Json" button on the sentry.io platform
3) during the source map uploads its seems like everything is correct, you can see the output in the image i also checked that the artifacts were indeed uploaded to sentry by going to the project settings.
the issue seems to be that the trace it self is not associated with the uploaded debug id , i also tried to force the mapping by proxy every access to __sentryDebugIds to return the generated debug_id, it didn't worked.
thank you!
@krystofwoldrich for more context- in our react native app, we are loading multiple hermes bundles, and now we are trying to fix our bundles sourcemaps. we want to be able to reproduce it from dev, because the production cycles are too long. how can we simulate production for sentry? maybe we can patch something locally to make it work?
Thank you @saarazari5 and @Niryo for the details.
how does sentry separate between a production bundle and dev bundle?
The Debug ID is generated for statically generated bundles, that means Debug ID is not generated when bundle is requested over the development server.
When the Debug ID is generated you should see Bundle Debug ID: <debug_id>
in the Metro logs.
Together with the Debug ID comment at the end of the plain text bundle and debugId
property in the source maps. The bundle should also contain a Debug ID polyfill at the top of the file. Below is unminified version of it.
Are _sentryDebugIds
and _sentryDebugIdIdentifier
globals containing any Debug IDs at runtime?
I checked the event payload by pressing "View Json" button on the sentry.io platform
Perfect, thank you.
Are
_sentryDebugIds
and_sentryDebugIdIdentifier
globals containing any Debug IDs at runtime?
yes indeed, it does print the generated debug_id. when testing in production environment, for some events, the debug_id is sent inside debug_meta however sentry still don't show the unminify code correctly. its show irrelevant code:
you can see that for those different events (which crash at different places in the code) the relevant bundle frames always leads to the same place in the bundle : store.ts.
thanks!
@krystofwoldrich maybe you can take a look at this event? we do see the debug_id in the raw json, and we do see a source map that contains this id, but for some reason sentry still wasn't able to translate the stack trace of this event
Thank you @saarazari5 and @Niryo for the details,
in the example that @saarazari5 shared I see that there are 3 hermes bundles in the stack trace, but only one file is referenced in the event JSON debug images.
That seems to be the issue, we will investigate this further.
Just to confirm, when you symbolicate the stack trace locally, do you use 3 difference source maps one for each bundle?
Thank you @saarazari5 and @Niryo for the details,
in the example that @saarazari5 shared I see that there are 3 hermes bundles in the stack trace, but only one file is referenced in the event JSON debug images.
That seems to be the issue, we will investigate this further.
Just to confirm, when you symbolicate the stack trace locally, do you use 3 difference source maps one for each bundle?
we actually only tried to test it on one bundle, since separating our big bundle to multiple ones is a new feature, we assumed that if we will only reference one of the bundles it will show the original source code of all the frames in the stack that come from this bundle alone, as for the rest of the unreferenced bundles we assumed that if we dont generate debug id and artifacts for them it should not effect the bundle that we want to test.
What React Native libraries do you use?
Hermes
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
5.35.0
How does your development environment look like?
OS: mac os sonoma Node: 20.18.0 Yarn: 4.3.1 react-native: 10.2.7 hermesEnabled: true newArchEnabled: false
Sentry.init()
using sentry-cli
Steps to Reproduce
Expected Result
event should contain debug-id in its payload.
Actual Result
no debug-id is attached to the payload unless you remove usage of deprecated
...eventProcessors.getGlobalEventProcessors()
fromprepareEvent.js
.also, after removing the usage mentioned, it does add the debug_id payload but bundle image does not have a reference anymore `