Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

RangeError: Invalid string length #335

@hogggy

Description

@hogggy

We are getting this error RangeError: Invalid string length. This happens almost every time an error is reported and attempted to be sent to sentry. Here is the stack trace:

RangeError: Invalid string length
  ?, in join
  ?, in Object.stringify
  File "/app/node_modules/json-stringify-safe/stringify.js", line 5, col 15, in stringify
    return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces)
  File "/app/node_modules/raven/lib/client.js", line 289, col 19, in Raven.send
    var skwargs = stringify(kwargs);
  File "/app/node_modules/raven/lib/client.js", line 276, col 12, in Raven.process
    this.send(kwargs, cb);
  File "/app/node_modules/raven/lib/client.js", line 336, col 12, in null.<anonymous> self.process(eventId, kw, cb);
  File "/app/node_modules/raven/lib/parsers.js", line 52, col 5, in null.<anonymous> 
   cb(kwargs);
  File "/app/node_modules/raven/lib/utils.js", line 214, col 5, in null.<anonymous> 
    cb(frames);
  File "/app/node_modules/raven/lib/utils.js", line 153, col 35, in null.<anonymous>
    if (--numFilesToRead === 0) cb(sourceFiles);
  File "fs.js", line 446, col 3, in FSReqWrap.readFileAfterClose [as oncomplete]

Here is my sentry config.

{
    maxBreadcrumbs: 10,
    environment: process.env.NODE_ENV,
    autoBreadcrumbs: {
        'console': false,
        'http': true,
    }
}

I think this is an out of memory issue in the stringify function. This is preventing the correct error from being sent to sentry.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions