sentry-cocoa: Could not decode report: Data too long (React Native)

Platform

iOS

Installed

CocoaPods

Version

7.27.0

Steps to Reproduce

  • Trigger an error in a React Native application using Sentry with Sentry.nativeCrash()
  • No error shows up in Sentry dashboard

I have minimal data in my userInfo, but this objectPath in FixupContext keeps causing the data to be too long.

Expected Result

The error should show up in Sentry

Actual Result

It doesn’t!

Logs indicate that the data is too long. On a breakpoint, I get indications that there are a lot of empty \0 characters in the data that is trying to be sent. I believe these contribute to the problem.

I think it may also be related to the Sentry reduxEnhancer that is storing a bit of state data.

Adding a 0 to SentryCrashMAX_STRINGBUFFERSIZE seems to alleviate the problem, as does increasing MAX_DEPTH.

ERROR: SentryCrashReportFixer.c (267): char *sentrycrashcrf_fixupCrashReport(const char *): Could not decode report: Data too long
ERROR: SentryCrashC.c (277): char *sentrycrash_readReport(int64_t): Failed to fixup report ID da800000

image image-1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

As discussed:

Ideally, it would strip the excess data and report the error message, with a warning that the data was too big. But squashing the crash report entirely is really bad.

Yes, that’s what we are aiming for.