Need some help with phantom 500 errors

I’ve been running IN for many years, it took a lot of work to move from 4 to 5. I only need it sporadically so sometimes I don’t notice when things break. I am using watchtower to keep IN up to date.

I just had to issue an invoice and I get 500: There was an error generating the PDF with Phantom JS - at first I could save the invoice but when I tried editing it I now can’t save it anymore.

In the preview pane I see this error:
image

The last time I issued an invoice without any issues was on the 9th of March this year. Inside my env file I find these lines with my notes and links accumulated over the years. This is just an extract, if you need to see more variables please ask.

# adding my phantomjs API key                                                                                                                        
# details: https://github.com/invoiceninja/invoiceninja/blob/master/docs/configure.rst#phantomjs                                                     
PHANTOMJS_PDF_GENERATION=false                                                                                                                       
#PHANTOMJS_KEY='ak-ms2tf-12345-12345-12345-fdbra'                                                                                                    
#PHANTOMJS_SECRET=398v5secret8ecmz                                                                                                               
                                                                                                                                                     
# alternatively use a local instance                                                                                                                 
# https://www.invoiceninja.com/forums/topic/self-hosted-pdf-in-invoice-email-bad/#post-15319                                                         
#PHANTOMJS_BIN_PATH=/usr/local/bin/phantomjs    

I have no idea where to start debugging. IN was running fine with these settings. Please somebody just give me a hand how to quick-fix this. I need to manually issue invoices, I don’t need any automation for now, no client dashboards, nothing.

found help here: Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja

switched to the phantomjs hosted by IN by adding this env variable:
PDF_GENERATOR=hosted_ninja

works for now.