React Navigation routing performance tracking: 'Maximum call stack size exceeded' in the /utils library #5172
Closed
3 tasks done
Labels
Package: core
Issues related to the Sentry Core SDK
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/react
SDK Version
6.19.2
Framework Version
3.4.2 (react-native)
Link to Sentry event
https://sentry.io/share/issue/12e378b1436545c0828853d15354b7c7/
Steps to Reproduce
When using the Performance tracking in combination with React Native and the automatic instrumentation defined in https://docs.sentry.io/platforms/react-native/performance/instrumentation/automatic-instrumentation/ for the React Navigation routing, if you have "recursive objects" passed as route parameter, Sentry will badly crashes with "Maximum call stack size exceeded".
(NB: was asked to report in a new issue from #2470 (comment) )
Expected Result
Unfortunately Sentry logic isn't very protective and not preventing infinite loop in objects. an object that have nested inside some reference of a parent will infinitely make dropUndefinedKeys loop https://github.com/getsentry/sentry-javascript/blob/master/packages/utils/src/object.ts#L197
There is nothing "wrong" with the user land code actually it's crashing inside Sentry logic (at least for us) as soon as you pass a recursive object in navigation.
Not exactly sure how to fix this in the utils logic, but one policy could be to have a max depth in the recursion.
Actual Result
it badly crash the app of our users when the performance monitoring is active for them. see attached event.
The text was updated successfully, but these errors were encountered: