PDF and XLS Reports are not rendering in lambda Error: Navigating frame was detached



  • All of a sudden the lambda stopped rendering the reports in PDF and XLS format. its throwing Error: Navigating frame was detached.

    Tried upgrading lambda to latest version as well but still getting the same issue



  • Please share the full error with some logs.

    What jsreport version do you use? How did you proceed with installing chrome dependency?
    Have you followed our tutorial? https://jsreport.net/learn/aws-lambda-serverless



  • I had the exact same error all of a sudden due to our AWS Lambda runtime config was set to use Auto - so it started to use nodejjs18.v28 automatically.

    I was able to check the CloudWatch log from the previous day, which is nodejs18.v26. arn:aws:lambda:us-east-1::runtime:0cdcfbdefbc5e7d3343f73c2e2dd3cba17d61dea0686b404502a0c9ce83931b9

    For the time being I forced the lambda runtime to lock ti ( aka manual) to the above ARN.

    I am stilling looking into fixing it for v28+, or all the way to nodejs20 .

    Gerry



  • I've tested the lambda with the latest node20 runtime and I was able to get it working after updating the chromium.
    I've updated the starter kit which should work now with node 20
    https://github.com/jsreport/jsreport-aws-lambda-starter-kit



  • I had the same issue, I was using the Puppeteer-core library in my lambda layer, and when the node version automatically updated to node 18.v28 from node 18.v26, my lambda started failing.

    One reason for this was my puppeteer-core version was 10.4.0 and after upgrading it to 22.4.0, it started working fine with node 18.v28.

    Do we have any document where AWS notifies about auto update of runtime version?



  • I am not aware of any AWS notification options for Lambda minror runtime updates.
    As for me, I have migrated to use Lambda (Docker) Image, so I now have full control of the entire runtime, and no longer bound by the ZIP+Layer combined size limitation.



  • I had a similar problem. In my case I was setting the "res.content" in the afterRender function to a custom string.

    It worked at the time but after a while it just stopped working and I was getting the puppeteer error "Navigating frame was detached". Once I removed the setting of "res.content" everything was working properly.

    I think the callback function done() needs to manipulate "res.content" so it needs to see the generated content.


Log in to reply
 

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