Logo Fails to Render in Invoice

I’m running a self-hosted Invoice Ninja (v5.3.66-C77) instance using docker compose. I have configured a logo for my company, which is visible in the web admin portal. However, the fails to render in invoices (top-left position). Also the Invoice Ninja logo on the bottom left fails to render in invoices (see attached).

The funny thing is that it used to render my logo (and Invoice Ninja’s) some months ago. I have upgraded Invoice Ninja periodically and it broke logo rendering on invoices somewhere along the way.

Things I have tried:

  • Run docker exec -it invoice-ninja-app php artisan storage:link
  • Specify LOCAL_DOWNLOAD=true in the env file

I have these properties specified in my env file:

APP_ENV=production
APP_NAME="Company"
APP_URL=http://domain.com
APP_KEY=XXXXXXXXXXXXXXXXXXX
APP_DEBUG=false
REQUIRE_HTTPS=false
PHANTOMJS_PDF_GENERATION=false
PDF_GENERATOR=snappdf
LOCAL_DOWNLOAD=true

Any clues on how to fix it?

Screenshot from 2022-03-11 09-10-44

Hi,

@david do you have any suggestions?

Note: if you haven’t already it may help to re-upload the logo.

It sounds like a dns issue where your system cannot resolve the URL path to the logo.

Thanks for the responses. I don’t think it is DNS. I can see the logo PNG in the browser (from LAN or WAN) just fine using a URL like this:

https://domain.com/storage/u862llnztfvxyacxys8nncxiqd5fagfbk0ve9g9iieiurmcvdesx23sqp9pdovgf/7KkbTL0Q6MWV5XHxa3V4IYoVOP20u1WYMaoO3Jo3.png

Also the logo renders fine in the web admin portal. Only invoices fail to render the logo.

I have tried deleting and re-uploading the logo multiple times. Same issue.

Any other ideas?

Can you briefly explain how PDF generation works? Is it a local operation or does it require external services?

FWIW the PDF preview (“View PDF”) is broken as well. Just spins forever and never renders.

Alan

The DNS resolution from the container is the issue.

in config/hosts you can declare your hosts there which the container can use to resolve the IP address of the host it needs to reach to get the logo

You are correct. I found out what was blocking the DNS in the container. It was a custom network marked with internal: true in the compose file. It’s working now! Thanks.