Getting Error 500 on PDF

Hi,

I am running my invoice on SiteGround with a subdomain (e.g. xxx.domain.com).

Strangely, one of my setup at another subdomain is working. Now I’m setting up with another subdomain using the same steps and variable settings as before, but I’m getting errors when accessing pages that will generate PDF, e.g.:

  • Accessing Settings > Invoice Design > Customize & Preview
  • Invoice

Here’s the error I see in Laravel Storage Log:

[2021-10-22 12:39:35] production.ERROR: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known {“userId”:1,“exception”:"[object] (ErrorException(code: 0): file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known at /home/customer/www/xxx.domain.com/public_html/app/Models/Presenters/CompanyPresenter.php:73)
[stacktrace]
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, ‘file_get_conten…’, ‘/home/customer/…’, 73, Array)

I have ran php artisan optimize & /update?secret= while making changes, but still facing the issue. The URL is public facing.

Invoice Ninja version is v5.3.25-C60.

Has anyone face this issue before? What could be the issue?

Thank you.

Most likely the system cannot resolve the company logo.

You can try circumventing this by using the .env var LOCAL_DOWNLOAD=true

@david Thank you for replying. I have added it to .env and it’s now finally able to generate without Error 500. Awesome!