RangeError: Invalid string length on large reports

  • Hi,

    We are trying to deliver a big report. We have a template with child templates in order to avoid v8 length limit.
    We get this error:
    "RangeError: Invalid string length", " at Array.join (<anonymous>)", " at /var/task/node_modules/async-replace-with-limit/async-replace.js:83:31", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:726:13", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:52:16", " at replenish (/var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:314:29)", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:326:29", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:44:16", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:723:17", " at /var/task/node_modules/async-replace-with-limit/node_modules/async/lib/async.js:167:37", " at /var/task/node_modules/async-replace-with-limit/async-replace.js:71:21", " at tryCatcher (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/util.js:16:23)", " at Promise.successAdapter [as _fulfillmentHandler0] (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/nodeify.js:23:30)", " at Promise._settlePromise (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/promise.js:566:21)", " at Promise._settlePromise0 (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/promise.js:614:10)", " at Promise._settlePromises (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/promise.js:694:18)", " at _drainQueueStep (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:138:12)", " at _drainQueue (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:131:9)", " at Async._drainQueues (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:147:5)", " at Immediate.Async.drainQueues (/var/task/node_modules/jsreport-child-templates/node_modules/bluebird/js/release/async.js:17:14)", " at processImmediate (internal/timers.js:461:21)"

    Do you know what we should do ?

    Thanks a lot,

  • Hmm, so you expect your output HTML to be bigger than the v8 space limit? Not sure if this can be solved.

    Would you be able to share a simple demo? Like templates export or a repo?

  • I'm linking here a task we have already in the backlog regarding ability to produce bigger HTML outputs than 500mb

  • Hi Jan,

    Thanks for your reply.
    It's exactly our problem here.. Our output xml file could be big (1Go...)...
    Does jsreport implement a feature that merge several small xmls in a final one ?

  • No at this moment. The pipeline isn't designed for it.
    You better render such big xmls in a separate service now.

    However, we should add such feature later this year.

  • Seems so...

    Do you have some services to point me to?
    Thanks a lot

  • Just code it :).

  • Not the reply I was waiting for ^^

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.