Cannot Print, View, Download PDF

From yesterday I am not able to Print, View, Download PDF invoice, also live preview is not showing, its keep loading. I have been using from last 1 year.

I tried to fresh install but it is the same, I am using shared hosting cPanel.

I was just about to create a post saying the same thing. In the browser console it says it is trying to load:

/public/index.php/api/v1/live_preview?entity=invoice&entity_id=l4zbqjrdpr

But it never loads, just says “pending” in the developer tools network tab.

@hillel @david

Seeing this error in laravel.log:

[2024-04-23 07:01:11] production.ERROR: cURL error 28: Failed to connect to pdf.invoicing.co port 443 after 130351 ms: Couldn’t connect to server (see libcurl - Error Codes) for https://pdf.invoicing.co/api/ {“userId”:1,“exception”:"[object] (Exception(code: 0): cURL error 28: Failed to connect to pdf.invoicing.co port 443 after 130351 ms: Couldn’t connect to server (see libcurl - Error Codes) for https://pdf.invoicing.co/api/ at /home/wiredspa/inv5.wiredspace.co.uk/app/Services/Pdf/PdfService.php:106)

Location of the log files?

/storage/logs/laravel.log

laravel.log it is empty.
It is strange! I can download and print all invoices which created before 21/04/2024.
But I cannot print, view, download the new invoices!

It seems my host cannot connect to https://pdf.invoicing.co

I have the same. Mine is cpanel hosting. Either the web user or root is not able to connect to it from any location.
wget https://pdf.invoicing.co gives a timeout (https://pdf.invoicing.co/api/version as well)

Dear All, Im not official support nor involve with the invoiceninja team. But im interested in knowing if within .env files in your root installation folder, the following settings are used.

PDF_GENERATOR=hosted_ninja

image

PDF_GENERATOR=hosted_ninja

Thanks for the reply, the hosted_ninja function is owned and managed by the invoiceninja team, so yea, im also facing the same problem. Which means in this case until somebody from Invoiceninja team replied, you can try to change to phantom to see if the problem goes away.

It does goes away for me, but it sometimes produce another error Cannot Raster Malformed PDF.

So im hoping if @hillel and @david could assist, as i believe theres a problem with their server that used to generate pdf at when using hosted_ninja function.

@NoobKS92

I’m not sure. Our telemetry on our PDF generation servers are reporting normally.

Also, our demo accounts here: https::/demo.invoiceninja.com and Invoice Ninja are also using hosted_ninja without any issues.

I have not been able to replicate this particular issue as yet, although I do note there has been an uptick in these reports, but until we can localize an exact issue, I am in the dark on this one.

It may also help if you can advise an IP address, as I am thinking there may be a rate limit issue with Cloudflare that could be impacting here…

Here are my IPs:

IP address of server: 77.72.2.79
IP address of client: 194.55.157.92

I am experiencing exactly the same problem. I have temporarily solved it by changing the PDF engine to phantom
This requires setting up an account on Phantom js Cloud, but as part of the free access it gives a small pool of resources for PDF generation.

My hosting server ips are:-

151.106.103.43
172.64.52.2
162.159.24.67

Test Connection link:-
https://autosquad.qa/ninja/public/pdf.php

I am not see anything with those IP addresses.

Can you advise how large your company logo is? Better yet, can you post a copy here

I forgot to mention, from my hosting server , https://pdf.invoicing.co/ is not reachable from yesterday. Logo is uploded here

Can i ask you to probably trace back what happened within this few weeks back to pdf.invoicing.co that may has cause our connection being deffered or rejected by the pdf.invoicing.co server?

In my log:

[2024-04-23 09:45:23] production.ERROR: cURL error 28: Failed to connect to pdf.invoicing.co port 443 after 127321 ms: Couldn’t connect to server (see libcurl - Error Codes) for https://pdf.invoicing.co/api/ {“userId”:1,“exception”:"[object] (Exception(code: 0): cURL error 28: Failed to connect to pdf.invoicing.co port 443 after 127321 ms: Couldn’t connect to server (see libcurl - Error Codes) for https://pdf.invoicing.co/api/ at /public_html/account.tomote.com/app/Services/Pdf/PdfService.php:106)
[stacktrace]