Skip to content
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

Recursion Limit Hit #713

Closed
3 tasks done
lisabaut opened this issue Nov 6, 2019 · 6 comments · Fixed by #749
Closed
3 tasks done

Recursion Limit Hit #713

lisabaut opened this issue Nov 6, 2019 · 6 comments · Fixed by #749

Comments

@lisabaut
Copy link

lisabaut commented Nov 6, 2019

OS:

  • MacOS

Platform:

  • Android

SDK:

  • @sentry/react-native

react-native version:
0.61.2

Init Code:

import * as Sentry from '@sentry/react-native';

Sentry.init({
  dsn: 'https://...@sentry.io/...',
  debug: true
});

I have the following issue:

When passing a deep nested object with scope.setExtras to the local scope like:

 Sentry.withScope(scope => {
    scope.setTag('my tag', 'my value');
    scope.setExtras(deepNestedObject); // <-- !
    Sentry.captureMessage('my error message);
});

the object's data structure is displayed nicely within the report details view in the Sentry UI below the "Additional Data" section.

Unfortunately it stops showing further key-value pairs below the third nested object level.
Instead each value is displayed with <recursion limit hit>.

Within the docs for react native SDK I was not able to find a possibility to increase the display depth for nested objects.

This issue does not provide a solution unfortunately.

This issue with a similar topic refers to the Javascript SDK and points to the Sentry JavaScript docs.

But Sentry.Integrations.ExtraErrorData does not exist in the @sentry/react-native package

and this code does not work for me in react-native:

import * as Sentry from '@sentry/react-native';
import * as Integrations from '@sentry/integrations';

Sentry.init({
  dsn: 'https://...@sentry.io/...',
  integrations: [new Integrations.ExtraErrorData({ depth: 10 })],
  debug: true
});

Question:

How can I increase the depth level in @sentry/react-native for displaying deep nested objects in the "Additional Data" section?
Thanks.

@whatwg6
Copy link

whatwg6 commented Nov 8, 2019

same issue

@vasilich6107
Copy link

Any news?

@lobsterkatie
Copy link
Member

The <recursion limit hit> comes from the Java SDK (which underlies this SDK's Android reporting) and is unfortunately not currently configurable. There's an issue tracking that question here.

@alew97
Copy link

alew97 commented Feb 5, 2021

I saw @lobsterkatie 's response on getsentry/sentry-java#543 about RN sentry no longer relying on the Java SDK which defines the max nesting level of 3. However I still don't know how to increase this limit, what if i want a nesting level of 10? As @lisabaut pointed out in the original post, the ExtraErrorData integration does not work in React Native.

any tips from anyone?

@lobsterkatie
Copy link
Member

@jennmueng You're the most up on the current RN SDK. Do you know which of the wrapped SDKs sets the max depth? If not I can dig into it.

@jennmueng
Copy link
Member

@lobsterkatie @alew97 It's set on JS, now Android and Cocoa shouldn't touch the nesting depth anymore if I recall correctly. So if you just set normalizeDepth it should be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants