Client Portal unable to view or download PDF, spinning red-black circle

Thank you @david and @hillel for submitting a solution !
But I have the same problem : “This page doesn’t seem to exist” is displayed instead of pdf preview
However, when you click on the download button, the PDF is displayed correctly

I had an error 500 yesterday, and had to do a clean install with Softacalous.
Luckily I could use the old database and .env to get me on my way quickly.

When installing it gives the option to install the software in the subdirectory /ninja If this is just about the default, that lots of people use a subfolder, then a lot of people should have the problem. With version 4 I had INinja running on three other domains in subfolders without problems.

Anyway, I still have the same issue with a clean install. When updating the software by using FTP after unzipping the new version, I would overwrite the livewire.php file. I again tried the suggestions, and no luck. Ideally, I would not want to edit the liverwire.php , but I am up for anything that helps.

This is a curious problem, that other people might not realise they have.

Thank you for all the suggestions.

I deal with the same issue each and every time i upgrade to a new version of invoiceninja. Not sure what the future fix is but this is what I do.

Update the livewire.php url for asset and app_url to the correct url for your site/install.

back at the root of the directory for invoiceninja i run the following commands:

sudo php artisan livewire:publish
then >sudo php artisan optimize:clear

This publishes your livewire file for the client portal to work properly and then clear the cache to remove the error 500.

I routinely do this between upgrades.

Your response is half correct. The livewire file after it’s edited needs to be published as just clearing the cache doesn’t always work.

Thank you so much.
I don’t know how to run these commands (sudo php artisan livewire:publish, sudo php artisan optimize:clear). Could you help me ?

This morning I edited my asset_url and app_url and changed them from null to “” (my Invoice Ninja installation is from Softaculous in a subfolder named invoiceninja in my root public_html) and this too allowed me to download the PDF, but just trying to view gets me the page-not-found error. This is after running php artisan livewire:publish and php artisan optimize:clear from the invoiceninja folder via ssh. With the Download button working, when trying to load up just the landing page for the client portal at I get the 500 error. I can’t get a working customer portal without the value set to null, and I can’t get the Download button to work without updating the two urls.

Am I missing a step here?

Is your site hosted on a server using cPanel? You’ll need to go through the steps for your webhost to connect to the server via ssh. For me, that was from the main cPanel page under Security - SSH Access. It involved creating public/private key, downloading them, and then accessing my shared server with my credentials in combination with the key. That gained me access to my root folder on the shared server and I was able to cd into my public_html/invoiceninja folder to run the commands. Every webhost can be different - I’d recommend getting support from your host to get ssh access as it’s an extremely powerful (and necessary) way to interact with the files/commands on your host. I didn’t get ssh access to the shared server until very recently - it used to be reserved only for people paying for a dedicated hosting plan.

What is your PDF settings in the .env file? Also in the client portal are you able to edit details like Name and phone number informatoin?

Hi everybody.

Thank you for everybody’s input.

I do not have SSH access. I upgraded the account for SSH, then I did not have sudo access, and had to double that cost to be able upgrade futher to get a VPS. Version 4 worked fine in the most basic shared hosting environment, and that is what I have now again, no SSH.

I did post earlier the workaround for people with no SSH, but the method did not work, and I am trying to figure out what is wrong with it.

I am running 5.7.11
My settings ain env PDF_GENERATOR=hosted_ninja

In Livewire.php I change the settings to:

‘asset_url’ => “”,


‘app_url’ => “”,

If the people with SSH access can get it right, then the problem must be how the people without SSH access try to overcome this.

instead of php artisan optimize / sudo php artisan livewire:publish

I put into the browser the url:

Then instead of running in SSH php artisan cache:clear

I put into the browser; I also deleted the files in /invoicing/bootstrap/cache/

To clear cache , in the app, you can also click About–> Health Check → CLEAR CACHE

When I try to view the invoice ( ) it says “This page doesn’t seem to exist.

Thank you for everybody’s help.

Thank you very much for this response. I indeed have a server using Cpanel. I will study the question.

From the Cpanel, I found how to add the commands, from a terminal
sudo php artisan livewire:publish
sudo php artisan optimize:clear
I got the response “bash: sudo: command not found”. Indeed, I cannot use sudo on my shared hosting. I would have to switch to dedicated hosting to have access to the sudo command. I think many of us are affected by this problem…
So I contacted my host who suggested I run the command without sudo, which worked.

But I still encounter the error “This page doesn’t seem to exist" :roll_eyes:
I also noticed that after launching the command, the livewire.php file had returned to its initial state, without the url that I had specified (‘asset_url’ => null / ‘app_url’ = > null)
Is this normal? Is this a problem linked to the absence of the sudo command?
It would be great to be able to work around this problem, without having to go through SSH.

Edit the livewire.php file in your vendor/livewire/livewire/config folder as the publish command appears to copy this file to the config folder of your active installation. Any changes you make to the active livewire.php file will get overwritten by the one located in vendor. I too see the same error despite editing and running the two php commands. I am unsure if we are both missing another step.

Thank you for these explanations, I understand better.
Hopefully someone will help us find the solution…

I have been experiencing the situation as well and followed the recommendations (update livewire in config and vendor and running the two commands). I also noticed that the PDF are now downloadable in the portal but I also notice that depending on the screen size, I either get a error 404 or I can see the invoice details when the screen is under 1000px-ish

Can this help in anyway to resolve the problem?

I hadn’t noticed. I have the same thing. From 1024 px, the “page not found” error appears

Please, could you tell us if a fix should be applied in a future version?

Yes, we’re working to improve this for a future release.

1 Like

Please let us know if you see any difference in v5.7.24

Thank you - as soon as it’s available to install via Softaculous I will backup, update, and test again.