Javascript error on PDF

Hi, I’m getting a JS error when viewing PDF’s in our selfhosted installation, the pdf draws a blank screen:

Uncaught TypeError: Cannot read property 'length' of undefined
    at Object.NINJA.invoiceDocuments (pdf.pdfmake.js:464)
    at Object.NINJA.decodeJavascript (pdf.pdfmake.js:166)
    at GetPdfMake (pdf.pdfmake.js:18)
    at generatePDF (script.js:31)
    at getPDFString (38:491)
    at refreshPDF (38:1279)
    at HTMLDocument.<anonymous> (38:495)
    at u (jquery.js:3148)
    at Object.fireWith [as resolveWith] (jquery.js:3260)
    at Function.ready (jquery.js:3472)

To help narrow down the problem can you try disabling ‘Embed Documents’ on /settings/invoice_design#invoice_options to see if it helps (assuming it’s enabled).

No succes, still get the same error when viewing an invoice:

Uncaught ReferenceError: isMobile is not defined
    at refreshPDFCB (invoice_design:1814)
    at pdfmake.js:161
    at r.<anonymous> (pdfmake.js:90)
    at r.emit (pdfmake.js:22722)
    at Array.<anonymous> (pdfmake.js:26065)
    at r (pdfmake.js:23608)

Are you using Docker? Maybe this will help…

https://github.com/invoiceninja/invoiceninja/issues/1311#issuecomment-275883176

I am seeing the same behaviour (blank report) with a similar error:

Uncaught TypeError: Cannot read property ‘length’ of undefined
at Object.NINJA.invoiceDocuments (built.js:26)
at Object.NINJA.decodeJavascript (built.js:26)
at GetPdfMake (built.js:1)
at generatePDF (built.js:1)
at getPDFString (6:492)
at refreshPDF (6:1275)
at HTMLDocument.<anonymous> (6:496)
at u (built.js:2)
at Object.fireWith [as resolveWith] (built.js:2)
at Function.ready (built.js:2)
at HTMLDocument.r (built.js:1)

‘Embed documents’ is always disabled.
I am not using docker.
I am available to test any suggestions or forward any logs that may help (the logs look OK to me).

We’ll have a new release in a few days which should hopefully fix the issue.