is regression issue is fixed in jsreport 3.3.0?



  • Hi sir,

    We are using jsreport 3.2.0 version and mongodb as our store for storing templates(ealier it was aws s3).Also we are rendering our report using report extension method for async rendering.And there was regression issue in 3.2.0 that means the requested data becomes empty in before render function .So you were asked me to add numberOfWorkers to 1.Now requested data is not empty due to single numberOfWorkers.

    My question is,

    *Why jsreport throw timeOut issue if we run same report from multiple system at the same time.(numberOfWorker is 1).?

    • Since our application is multi-tenant application so there is huge chance to run same report by mutiple users at same time.How can i fix this issue?
    • If i try to increase number of worker then what will be its maximum value.(Our application is multi-tenant application).
    • Is the above mentioned issues are mainly due to regression also this new version 3.3.0 will resolve my above problems?

    *What happens If we try to run same report multiple times without waiting to render the repo
    rt.Will it crash the jsreport rendering due to many request for the same report?

    • In our application we notify the client using aws websocket (in order to acknowledge the client that report rendering is complete) and we are handling this from afterRender function of jsreport .So in this senario what happens if we run same report multiple times before compleing any report?

    Also can you please tell me why iam getting below error?

    0_1642180397273_upload-a4900e1d-ba91-4f2d-93b6-eb672288241d

    message
    "2022-01-14T17:14:54.523Z - info: Initializing jsreport (version: 3.2.0, configuration file: jsreport.config.json, nodejs: 16.13.1)"
    2022-01-14T17:14:54.532Z - info: Searching for available extensions in /app/
    "2022-01-14T17:14:54.535Z - info: Extensions location cache not found, crawling directories"
    2022-01-14T17:14:56.117Z - info: Found 37 extension(s)
    2022-01-14T17:14:56.214Z - debug: Writing extension locations cache to /tmp/jsreport/core/locations.json
    2022-01-14T17:14:56.215Z - debug: Discovered 37 extensions
    2022-01-14T17:14:56.614Z - info: Using extension authentication@3.1.0
    2022-01-14T17:14:57.311Z - debug: Extension authentication@3.1.0 was disabled
    2022-01-14T17:14:57.312Z - info: Using extension base@3.0.0
    2022-01-14T17:14:57.319Z - info: Using extension child-templates@3.0.1
    2022-01-14T17:14:57.320Z - info: Using extension cli@3.0.0
    2022-01-14T17:14:57.323Z - info: Using extension components@3.1.0
    2022-01-14T17:14:57.325Z - info: Using extension data@3.0.1
    2022-01-14T17:14:57.326Z - info: Using extension express@3.2.0
    2022-01-14T17:14:58.312Z - info: Using extension freeze@3.0.1
    2022-01-14T17:14:58.314Z - info: Using extension fs-store@3.0.0
    2022-01-14T17:14:58.702Z - debug: Extension fs-store@3.0.0 was disabled
    2022-01-14T17:14:58.702Z - info: Using extension handlebars@3.0.0
    2022-01-14T17:14:58.704Z - info: Using extension import-export@3.0.2
    2022-01-14T17:14:58.718Z - info: Using extension jsrender@3.0.0
    2022-01-14T17:14:58.719Z - info: Using extension licensing@3.0.1
    2022-01-14T17:14:58.802Z - info: Using extension localization@3.1.0
    2022-01-14T17:14:58.803Z - info: Using extension mongodb-store@3.0.0
    2022-01-14T17:14:59.506Z - info: Connecting mongo to mongodb://administrator:abcd1234@docdb.cgjgb1ms9vzj.ap-south-1.docdb.amazonaws.com:27017/Logipulse-reports?retryWrites=false
    2022-01-14T17:14:59.716Z - info: Connection successful
    2022-01-14T17:14:59.723Z - info: Using extension npm@3.1.0
    2022-01-14T17:14:59.726Z - info: Using extension pdf-utils@3.1.0
    2022-01-14T17:14:59.728Z - info: Using extension reports@3.0.0
    2022-01-14T17:14:59.732Z - info: Using extension tags@3.0.0
    2022-01-14T17:14:59.802Z - info: Using extension text@3.0.0
    2022-01-14T17:14:59.804Z - info: Using extension version-control@3.0.1
    2022-01-14T17:14:59.821Z - info: Using extension assets@3.1.0
    2022-01-14T17:14:59.903Z - info: Using extension authorization@3.1.0
    2022-01-14T17:14:59.907Z - debug: Extension authorization@3.1.0 was disabled
    2022-01-14T17:14:59.907Z - info: Using extension browser-client@3.1.0
    2022-01-14T17:14:59.910Z - info: Using extension chrome-pdf@3.1.0
    "2022-01-14T17:14:59.913Z - debug: Chrome strategy is chrome-pool, numberOfWorkers: 1"
    "2022-01-14T17:14:59.914Z - debug: Chrome custom launch options are executablePath=/usr/lib/chromium/chrome, args=--no-sandbox,--disable-dev-shm-usage"
    2022-01-14T17:14:59.914Z - info: Using extension docx@3.1.0
    2022-01-14T17:14:59.917Z - info: Using extension fs-store-aws-s3-persistence@3.0.1
    2022-01-14T17:15:00.509Z - info: Using extension html-to-xlsx@3.1.0
    2022-01-14T17:15:00.820Z - info: html-to-xlsx detected chrome as available html engine
    2022-01-14T17:15:00.901Z - info: Using extension pptx@3.1.0
    2022-01-14T17:15:00.905Z - info: Using extension scheduling@3.0.1
    2022-01-14T17:15:01.114Z - info: Using extension scripts@3.1.0
    2022-01-14T17:15:01.116Z - info: Using extension static-pdf@3.0.0
    2022-01-14T17:15:01.117Z - info: Using extension studio@3.2.0
    2022-01-14T17:15:01.746Z - info: Using extension xlsx@3.1.0
    2022-01-14T17:15:01.909Z - info: Using extension public-templates@3.0.0
    2022-01-14T17:15:01.910Z - debug: Extension public-templates@3.0.0 was disabled
    2022-01-14T17:15:01.910Z - info: Using extension sample-template@3.1.0
    2022-01-14T17:15:01.913Z - info: Using extension studio-theme-dark@3.0.1
    2022-01-14T17:15:01.915Z - info: Using general timeout for rendering (reportTimeout: 600000)
    2022-01-14T17:15:01.915Z - info: Using mongodb provider for template store.
    2022-01-14T17:15:02.074Z - debug: studio default theme is: light
    "2022-01-14T17:15:02.612Z - warn: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
    at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
    at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
    at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
    at async profilesCleanup (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)
    at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:180:5)
    at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
    at async MainReporter.init (/app/node_modules/@jsreport/jsreport-core/lib/main/reporter.js:244:7)
    2022-01-14T17:15:02.614Z - info: Creating default express app.
    2022-01-14T17:15:02.648Z - info: jsreport server successfully started on http port: 8084
    2022-01-14T17:15:02.703Z - info: Verifying license key free
    2022-01-14T17:15:03.387Z - info: Starting one month enterprise trial
    2022-01-14T17:15:03.424Z - debug: Creating samples is disabled
    2022-01-14T17:15:03.427Z - info: Initializing worker threads
    "2022-01-14T17:15:03.429Z - debug: Extensions in workers: base, child-templates, components, data, express, handlebars, jsrender, localization, npm, pdf-utils, reports, text, version-control, assets, browser-client, chrome-pdf, docx, html-to-xlsx, pptx, scripts, static-pdf, studio, xlsx"
    2022-01-14T17:15:04.422Z - info: 1 worker threads initialized in 995ms
    2022-01-14T17:15:04.423Z - info: Starting temp files cleanup with 600000ms threshold
    2022-01-14T17:15:04.424Z - info: reporter initialized
    2022-01-14T17:15:19.830Z - debug: OData query on folders
    2022-01-14T17:15:19.895Z - debug: OData query on assets
    2022-01-14T17:15:20.365Z - debug: OData query on templates
    2022-01-14T17:15:20.592Z - debug: OData query on templates
    2022-01-14T17:15:20.787Z - debug: OData query on scripts
    2022-01-14T17:15:21.012Z - debug: OData query on assets
    "2022-01-14T17:16:02.406Z - warn: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
    at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
    at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
    at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
    at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)
    "2022-01-14T17:17:02.232Z - warn: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
    at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
    at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
    at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
    at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)

    0_1642181305116_upload-f100762c-fd96-4a2d-b3af-a510529ec25f

    message
    "2022-01-14T17:28:02.190Z - warn: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
    at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
    at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
    at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
    at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)
    2022-01-14T17:28:37.844Z - debug: OData update on templates

    Below error is repeating if i try to run already working report why iam getting the below error?

    message
    "2022-01-14T17:33:02.168Z - warn: Profile cleanup failed for some entities, last error: Cannot read properties of null (reading '_id') stack=TypeError: Cannot read properties of null (reading '_id')"
    at Object.remove (/app/node_modules/@jsreport/jsreport-mongodb-store/lib/gridFSBlobStorage.js:29:27)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AsyncFunction.<anonymous> (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:174:9)
    at async ListenerCollection.fire (/app/node_modules/@jsreport/jsreport-core/lib/shared/listenerCollection.js:157:21)
    at async Object.remove (/app/node_modules/@jsreport/jsreport-core/lib/main/store/collection.js:148:5)
    at async Timeout.profilesCleanup [as _onTimeout] (/app/node_modules/@jsreport/jsreport-core/lib/main/profiler.js:213:11)

    • Also is it possible to install aws amplify to call graphql api of appsync from jsreport beacuse while calling GET method directly from rest api it will return all field.But using appsync we can query the required field from rest api?
    • Also is there any problem to call GET method directly from rest api will it affect the rendering time/performance of report?Can you please show me any example to call appsync from jsreport using aws amplfy?
    • Also why iam getting below error every time while rendering?

    0_1642416383260_upload-b9b358e0-75f0-4d6a-8437-0e5689b649d1



  • is regression issue is fixed in jsreport 3.3.0?

    Yes, it's fixed there. You can find the release notes on github
    https://github.com/jsreport/jsreport/releases

    Why jsreport throw timeOut issue if we run same report from multiple system at the same time.(numberOfWorker is 1).?

    The numberOfWorker specifies the level of parallelism. You need to increase it to avoid other requests waiting.

    If i try to increase number of worker then what will be its maximum value.(Our application is multi-tenant application).

    That is up to you. With a single processor and low memory, it doesn't make sense to use a high level of parallelism because it could overload the server.

    Also can you please tell me why iam getting below error? Protocol error...

    This error signals chrome process printing pdf badly crashed. It could have happened because the server was temporary overloaded.

    Also is it possible to install aws amplify to call graphql api of appsync from jsreport beacuse while calling GET method directly from rest api it will return all field.But using appsync we can query the required field from rest API?

    It should work, but I don't have experience there.


Log in to reply
 

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