Home Forums Support Corrupted PDFs attached to email

This topic contains 20 replies, has 2 voices, and was last updated by  Hillel Coren 1 month ago.

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #20060

    hareti
    Participant

    Hi, the invoices and quotes attached to emails sent to clients are all corrupt. I’ve tried removing the company logo, and setting the template to plain but to no avail. PDFs downloaded directly from the InvoiceNinja app are fine. When I click on the Email Invoice button, there is a long delay (1 minute) before the popup window disappears and the system is responsive again.

    phantomjs version 2.1.1
    invoiceninja 4.5.9, self hosted.
    No errors in laravel-error.bak

    Any suggestions?

    Kind regards,

    #20076

    Hillel Coren
    Keymaster

    Does the test link work on Settings > Email Settings? That’s the only way to test the headless PDF generation in the app.

    All I can suggest is to review the points listed here:

    https://invoice-ninja.readthedocs.io/en/latest/configure.html#phantomjs

    #20096

    hareti
    Participant

    Hi Hillel,

    The test link tries to open the generated pdf in a new tab but fails with “Failed to PDF Document”.

    I’ve been over all the PhantomJS troubleshooting points. It mentions a command line test script but i’m not sure what “link in the error” it’s talking about. There is no link in the error on my system.

    Kind regards,

    Gareth

    #20097

    Hillel Coren
    Keymaster

    Hmm.. yeah, the link was removed from the error logs for privacy reasons.

    Have you tried using PhatomJS cloud?

    #20098

    hareti
    Participant

    I haven’t tried PhantomJS cloud, I’d rather use the local one. Is there any way of seeing the output? There are no errors in laravel-error.log.

    #20099

    hareti
    Participant

    I’ve tried the phantomjs cloud but I get the same result when running the test on the email settings page – long delay then “Failed to load PDF document” error.

    How do you debug this to see what’s going on?

    #20100

    Hillel Coren
    Keymaster

    There should be an error in storage/logs/laravel-error.log

    That said, the error won’t provide many details. Here’s what a link would look like to use the test script.

    https:///view/?phantomjs=true&phantomjs_secret=

    #20101

    hareti
    Participant

    Right, I’ve used the test script with the URL in the error and I get a wall of text and then the final line says :

    TypeError: Attempting to change the setter of an unconfigurable property.

    The URL is http://192.168.2.113/ninja/public/view/armynjnhvqb20zswblrckt03wcdx8fcx?phantomjs=true&phantomjs_secret=

    #20102

    Hillel Coren
    Keymaster

    Have you tried testing the feature with a blank company?

    #20103

    hareti
    Participant

    I’ve tried with minimal company details (name only set) and minimal client details (name and email set) but it fails with the error

    production.ERROR: PhantomJS - Invalid response http://192.168.2.113/ninja/public/view/armynjnhvqb20zswblrckt03wcdx8fcx?phantomjs=true&phantomjs_secret=: {"context":"PHP","user_id":1,"account_id":1,"user_name":"xxx xxx","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36","locale":"en","ip":"192.168.2.101","count":2,"is_console":"no","is_api":"no","db_server":"mysql","url":"test_headless"} []

    in laravel-error.log.

    If I use the error url on the test script I get the output :

    
    \n{
        "body": "",
        "bodySize": 125276,
        "contentType": "text/html; charset=UTF-8",
        "headers": [
            {
                "name": "Date",
                "value": "Mon, 18 Mar 2019 15:55:44 GMT"
            },
            {
                "name": "Server",
                "value": "Apache/2.4.29 (Ubuntu)"
            },
            {
                "name": "Cache-Control",
                "value": "no-cache, private"
            },
            {
                "name": "Set-Cookie",
                "value": "XSRF-TOKEN=eyJpdiI6InptMXlXbzEyeitGSnJuaXFPdXhmNmc9PSIsInZhbHVlIjoiWEFmYUZMZEh4ZWZLOHdna1Q5NFE4UFwvNDdaaWZ0UlRjaVk4dldrZ2FLaUhGWmhVRHROZEpSS1wveHlLb1JRZmFBU0RwOGRrenE0VUZjOHljSCt4MmNJUT09IiwibWFjIjoiYzQyN2ZlZjE1YzM4YWVlNDYxZTcwMDg1NTkxMTc5NmJjNDhlN2MzNWJmZWViODliN2EwMWFkOTQwNTJjM2IyOSJ9; expires=Mon, 18-Mar-2019 23:55:45 GMT; Max-Age=28800; path=/\nninja_session=eyJpdiI6ImJmNDZYTmNYekdaY0ppM3FBMEdBNlE9PSIsInZhbHVlIjoiSTZjNFRQQ1MxQjJwdDZFVkJIRWdBbWVIcFlhZmx0ZVAxZG9jZVZzaHB0bU4xbHh6MldXWWZya3JISTBPNzFyQjB4UGVKdnVTdWJkdlY3MFd5S2hwZFE9PSIsIm1hYyI6IjNlOTVhNjUyODYyMzk2NWRlMmViNWNiODhiYTUyYTIxMmQzNjk3OTEwZmQ3ZDMzNzAyOWYwNmJiMWI2MjI0ZDAifQ%3D%3D; path=/; httponly"
            },
            {
                "name": "Vary",
                "value": "Accept-Encoding"
            },
            {
                "name": "Content-Encoding",
                "value": "gzip"
            },
            {
                "name": "Keep-Alive",
                "value": "timeout=5, max=100"
            },
            {
                "name": "Connection",
                "value": "Keep-Alive"
            },
            {
                "name": "Transfer-Encoding",
                "value": "chunked"
            },
            {
                "name": "Content-Type",
                "value": "text/html; charset=UTF-8"
            }
        ],
        "id": 1,
        "redirectURL": null,
        "stage": "start",
        "status": 200,
        "statusText": "OK",
        "time": "2019-03-18T15:55:45.144Z",
        "url": "http://192.168.2.113/ninja/public/view/armynjnhvqb20zswblrckt03wcdx8fcx?phantomjs=true&phantomjs_secret=",
        "content": "<head></head><body>data:application/pdf;base64,JVBERi0xLjMKJf////8KNyAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9jYSAxCj4+CmVuZG9iagoxMCAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9DQSAxCj4+CmVuZG9iago2IDAgb2JqCjw8Ci9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL01lZGlhQm94IFswIDAgNTk1LjI4IDg0MS44OV0KL0NvbnRlbnRzIDQgMCBSCi9SZXNvdXJjZXMgNSAwIFIKPj4KZW5kb2JqCjUgMCBvYmoKPDwKL1Byb2NTZXQgWy9QREYgL1RleHQgL0ltYWdlQiAvSW1hZ2VDIC9JbWFnZUldCi9FeHRHU3RhdGUgPDwKL0dzMSA3IDAgUgovR3MyIDEwIDAgUgo+PgovWE9iamVjdCA8PAovSTEgMyAwIFIKPj4KL0ZvbnQgPDwKL0YxIDggMCBSCi9GMiA5IDAgUgo+Pgo+PgplbmRvYmoKMTEgMCBvYmoKPDwKL1Byb2R1Y2V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ypeError: Attempting to change the setter of an unconfigurable property.
    
    
    #20104

    Hillel Coren
    Keymaster

    Thanks, that’s useful. It’s interesting that you’re both getting valid data back and an error.

    Try changing this line to if (true) { to see if it helps.

    https://github.com/invoiceninja/invoiceninja/blob/aefe133ba02f28d9fd585ae731765ad5b7cdffe3/app/Libraries/CurlUtils.php#L64

    #20105

    hareti
    Participant

    I’ve just done a clean install of the system – minimal company and client data. No change in the pdf attachments except that now there is no error in laravel-error.log so I’ve no URL to use in the phantomjs test script.

    How are the downloaded pdfs generated? I can download and view them fine. Is phantomjs used in this instance?

    #20106

    Hillel Coren
    Keymaster

    PhantomJS is only used to generate the PDF on the server. ie, to attach the PDF to emails.

    #20109

    hareti
    Participant

    I’ve set up an account with phantomjscloud and put my api key in the Invoice Ninja .env file. Running the test in email settings gives the same result – failed to open PDF document. No errors in laravel-error.log.

    How do I debug what’s going on? I tried turning on debug in the system settings but still nothing turns up in laravel-error.log

    #20110

    Hillel Coren
    Keymaster

    Not sure I follow, you posted the error above: “Attempting to change the setter…”

    Did you try making the code change?

    #20112

    hareti
    Participant

    As I said, I did a clean install of the application but now there are no errors going to laravel-error.log even though the pdfs are still corrupt. Without the error in laravel-error.log, I have no URL to run the test script with and so no “Attempting to change the setter…”

    I’ve made the change to the code you suggested but the pdfs are still corrupt.

    #20113

    Hillel Coren
    Keymaster

    For the test script you should just need to replace the invitation_key in the original URL you used.

    #20114

    hareti
    Participant

    Ok, I see how it works now. I still TypeError: Attempting to change the setter of an unconfigurable property. error after running the test script.

    Is there a way of testing pahtomjscloud in a similar manner? It seems odd that both are are producing corrupted pdfs.

    #20115

    Hillel Coren
    Keymaster

    Not that I’m aware of.

    Maybe the advice here will help…

    Local PhantomJS PDFs not attaching (PhantomJS Cloud works)

    #20116

    hareti
    Participant

    Thanks Hillel, I have ended up doing what that link suggested, downloaded the pre-built phantomjs binary and replaced the Ubuntu one. The new phantomjs was failing with a Qt plugin missing error. After some digging I found that the solution is to add the environment variable QT_QPA_PLATFORM=”. Not sure why that works but it does.

    Attached pdfs are now readable.

    Thanks for all your help.

    #20117

    Hillel Coren
    Keymaster

    Glad to hear it’s finally working, thanks for sharing the solution!

Viewing 21 posts - 1 through 21 (of 21 total)

You must be logged in to reply to this topic.

Posted in: