Cant fix - 500:There was an error generating the PDF with Phantom JS

Hi there,

I cant seem to figure out this issue. I have read previous post and still no luck. I just recently migrated to a self-hosted a few weeks ago and all went well. Starting today I started to receive “500: There was an error generating the PDF with Phantom JS” when trying to generate a PDF. I decided to update to the latest version which is v5.3.78-C77 and it didn’t fix the issue.

Any idea where to begin to troubleshot this issue?

Note, in the preview PDF view I get the following error being displayed:
Promise was rejected with a value of ‘undefined’.

Thank you

@bolous

Have you signed up for a free Phantom JS key which will assist with the PDF generation?

https://invoiceninja.github.io/docs/self-host-troubleshooting/#pdf-conversion-issues

Hey David,

Thank you for this. I clearly missed this section so I apologies. I went ahead and created an account and entered the following:

PHANTOMJS_KEY=‘apikey’
PHANTOMJS_SECRET=secret

And cleared cache on my siteground and still no go. I am not sure if this variable was required or not PHANTOMJS_PDF_GENERATOR=true I added it and it didn’t make a difference.

Any idea what I might be missing?

Thank you

@bolous

when you say you cleared the cache, did you use /update?secret=secret

Ah snap, I was missing the “=secret”. David thank you so much for the help.

When I switch over to the whitelabel service all I need to do at that point is to change the variable to “PDF_GENERATOR=hosted_ninja” correct?

Thank you again

@bolous

Thats correct :slight_smile: