InvoiceNinja PDF Downloads - Route Does Not Exist
-
After switching to Cloudron, we've run into an issue with our instance of Invoice Ninja.
Using the API instructions here:
https://invoice-ninja.readthedocs.io/en/latest/api.htmlWe use to be able to use download a PDF using the below url structure
https://account.website.com/api/v1/download/6488But after switching to Cloudron, we now receive a response of:
"error": {
"message": "Route does not exist"
}Other GET requests we use continue to function fine. For example, we're still able to do a GET request and get JSON for the invoice using the below url structure:
https://account.website.com/api/v1/invoices/6488It's just the download url that's not working after our server switch.
Any ideas on how to troubleshoot this would be helpful.
Thank you!
-
In our invoice ninja installation, both of the calls work. @ryantrunorth is there anything in the logs? Also, does the PDF download work in the browser and not just with curl?
curl -X GET https://invoices.ninja/api/v1/invoices/5 -H 'X-Ninja-Token: sometoken'
If the curl download is getting stuck, it's because you have to pass the
-o
option.curl -X GET https://invoices.ninja/api/v1/download/5 -H 'X-Ninja-Token: asfd' -o foo.pdf
-
@girish We have seen issues with PDF generation and downloading when we use the onboard PhantomJS. The github issues from InvoiceNinja have stated that using PhantomJSCloud have fixed that.
Everything was working with PDF downloading with PhantomJSCloud on our old server (non-cloudron). Moved this install to Cloudron and it was fine until 2-3 updates ago.