Blank PDF - Docker

I’ve tried to use both PhantomJS and snappdf for the docker container install and I’m getting the following:

It looks like the pdf is being generated; I can directly download it via:

The contents of the PDF are blank with what looks like the loading symbol on it?

Any help would be appreciated!

can you check the browser console for any error messages.

No errors but I am getting:

I know this is old but did you ever get this resolved? I’m having the same issue. Thanks


this typically occurs when the app cannot resolve the host (in docker itself)

you can see this in the browser console.

I probably should have mentioned that I’m not running Ninja in Docker, rather a manual install on Ubuntu 20.04 vm. Everything was working correctly a few weeks ago. I also just had a bunch of 500 errors with multiple parts of the software, but was able to resolve those errors by rolling back to a previous backup of the vm.


Which PDF generator are you using?

I have been using PhantomJS for a year or so. I did not use an API key, so when this started happening, I set up an account an added an API key with no change. I also tried using snappdf, also with no change. It seems to be related to rendering new PDFs. I can open PDFs on older invoices without issue. I saw in the env variable section of the documentation about the LOG_PDF_HTML variable. I am going to set this to true and see if I get any output.

Also, when the PDF preview window is active on a new invoice, it shows a gray screen with the following error:

PlatformException(error, Promise was rejected with a value of `undefined`., null, null)

Sorry for spamming you a bit here, but I have resolved my issue! After invoking the EXPANDED_LOGGING variable, I realized the the laravel.log file had incorrect permissions from a previously corrected issue. I updated the permissions and PDFs are working again. Then I couldn’t update Invoice Ninja and found that config.php.bak was also not writeable due to permissions. I did chown on the invoiceninja directory and all is well again. Thanks for trying to help!

1 Like