cannot generate a report due to image undefined



  • as you can see in the logs below, if jsreport tries to download a file, it freezes the running report and logs the error at a pretty late time if i may add

    2022-06-07T09:48:37.151Z - warn: Rendering request 1 finished with error in 3001503 ms
    2022-06-07T09:48:37.153784193Z 2022-06-07T09:48:37.153Z - warn: Error when processing render request 1 Error while executing docx recipe. Request failed with status code 404 Error: Error while executing docx recipe. Request failed with status code 404
    2022-06-07T09:48:37.153814623Z     at module.exports (/app/node_modules/jsreport-core/lib/util/createError.js:11:13)
    2022-06-07T09:48:37.153820671Z     at Reporter.createError (/app/node_modules/jsreport-core/lib/reporter.js:332:12)
    2022-06-07T09:48:37.153823883Z     at Object.execute (/app/node_modules/jsreport-docx/lib/recipe.js:58:20)
    2022-06-07T09:48:37.153826644Z     at processTicksAndRejections (node:internal/process/task_queues:96:5)
    2022-06-07T09:48:37.153829171Z     at async module.exports (/app/node_modules/jsreport-core/lib/render/render.js:150:5)
    2022-06-07T09:48:37.153831755Z caused by: Error: Request failed with status code 404
    2022-06-07T09:48:37.153834319Z     at createError (/app/node_modules/jsreport-docx/node_modules/axios/lib/core/createError.js:16:15)
    2022-06-07T09:48:37.153836840Z     at settle (/app/node_modules/jsreport-docx/node_modules/axios/lib/core/settle.js:17:12)
    2022-06-07T09:48:37.153839482Z     at IncomingMessage.handleStreamEnd (/app/node_modules/jsreport-docx/node_modules/axios/lib/adapters/http.js:236:11)
    2022-06-07T09:48:37.153842063Z     at IncomingMessage.emit (node:events:402:35)
    2022-06-07T09:48:37.153844592Z     at endReadableNT (node:internal/streams/readable:1343:12)
    2022-06-07T09:48:37.153882671Z     at processTicksAndRejections (node:internal/process/task_queues:83:21)```


  • That is currently designed behavior to fail when an image cannot be downloaded.
    The failure should be immediate when the response has "not ok" status.


Log in to reply
 

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