production.ERROR: PhantomJS - Invalid response

I would like to add myself to the queue because I’m facing the same error now and I hope I can get @hillel and the crew to restart investigating this.

production.ERROR: PhantomJS - Invalid response now comes up since I recently changed the TLS certificate from an official one to a LetsEncrypt generated.
I have no clue how this could affect PhantomJS but that’s the only thing that changed between last month and this month and tomorrow is invoice day and I have no idea how to fix this.

Invoice Ninja v4.5.50 is installed and is current.

Sorry, I’m not sure. We found PhantomJS to be unreliable in v4, it seems likely it’s related to the certificate.

Any thoughts on migrating to v5? The new React web app is very similar to the v4 app.

Spontaneous migration to v5 is not an option at the moment. Perhaps you remember that there were some threads in late 2021 between you, David and me about that migration process failing over and over again with different problems, when I first tried to switch to v5. Since then, the v4 installation worked fine until the recently expired TLS certificate started to be a showstopper.

I’m still not really convinced how a simple certificate can be a problem. The currently installed LetsEncrypt certificate is a standard RSA 4096 based file, essentially the same tech specs like the expired one, and it still doesn’t work and it still doesn’t state any comprehensible error message:

root@naruto:~# /opt/phantomjs/bin/phantomjs test.pjs
\n{
    "contentType": null,
    "headers": [],
    "id": 1,
    "redirectURL": null,
    "stage": "end",
    "status": null,
    "statusText": null,
    "time": "2023-09-01T09:22:56.827Z",
    "url": "https://naruto.domain.tld/view/bxhafwuec0ofyokc031fucvxxk9v4jqq?phantomjs=true&phantomjs_secret=smbkalqnc0cu3jrbipzgjvihaovnmzkf",
    "console": []
}root@naruto:~#

When changing the URL to http (after disabling the https requirement in the ninja settings) the command works. But I have no fudging clue why. Even with PhantomJS being discontinued for 7 years now, a simple crt file exchange causing these problems doesn’t make any sense imho.

However, to be able to send out our invoices, I’m going to remove everything related to https from the system and hope that it will work again, because if not, I’m not able to charge this month, which is worth about 120kEUR company income. That would be enough to render us bankrupt instantly.

I really really hope that I can get some help when trying another approach on migrating to v5 in the next few weeks (hopefully before the next monthly invoice run), but my first target must be getting the invoices out ASAP.

Thanks so far. I’ll start a new thread when I’m going to try the migration process again.

If changing to http helps it also points to the certificate being the problem.

We’re of course happy to help if you run into any more issues with the v5 migration.