Assets causing page crash error



  • Hi I have been using js reports for a few months now and its been working perfectly.

    I have a few schedules reports which are sent on the first of every month and this months reports werent sent. I then investigated the issue and just kept seeing the error page crashed which I know isnt very useful to anyone.

    I started to strip my code bit by bit and then realised it was the asset images which were causing the page to crash. When all the images were removed the reports started working again.

    I havent touched this code for months and it has been working fine every month leading up to this one. I was just wondering if anyone else has been experiencing this issue because it seems strange it has appeared without me touching the code.



  • Hi, the chrome page crash can mean it used all of the memory.
    As you found, this can be caused by the images.
    Images are a bit tricky, if you put an image with a modified width/height attributes to HTML, the chrome still embeds the full-size images to the pdf and this is consuming a lot of memory. If this is your case, I recommend resizing your physical images upfront to the desired size. You can do this manually or programmatically.
    See an example here:
    https://jsreport.net/learn/templating-engines#asynchronous-helpers


Log in to reply
 

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