Closed johnhok closed 1 week ago
RangeError: Invalid string length
indicates that the string is too large, causing the JavaScript engine to throw an exception. Since the traceJSON
result is not critical for most use cases, you can temporarily resolve this issue by commenting out the JSON.stringify
statement and replacing it with something like:
const traceJSON = '{}';
I will add a guard check to this statement later.
Are you planning on bumping the memlab versions? I see you have the proper fix in place now. Thanks for the help!
@johnhok The fix is released in memlab@1.1.49
. Thanks for reporting this issue
Error
I'm getting this an
RangeError: Invalid string length
when I runmemlab
in a CI environment.It looks to be related to
JSON.stringify
in theLeakTraceDetailsLogger
.https://github.com/facebook/memlab/blob/16b4d9a3f1d383b02a67a4d87596f8a16c0d1f86/packages/core/src/logger/LeakTraceDetailsLogger.ts#L44
Notes
page-load[27.5MB](baseline)[s1] > action-on-page[62MB](target)[s2] > revert[59.1MB](final)[s3]
Does anyone have thoughts on alternative solutions to resolve this or have encountered a similar situation?