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

I believe this should be corrected in an upcoming release, @ben is that correct?

Thanks for reporting the issue, but it still doesn’t seem to be resolved.
Is this planned?

I can confirm the issue still exists in 5.7.11. I have temporarily edited my invoice/quote email templates with an “I apologize for the inconvenience…” statement and enabled system-wide to attach the invoice/quote PDFs as an attachment. The problem I’m now facing is that this is triggering SPAM filters for my clients and they still aren’t receiving the invoices without a follow-up email saying “please check your junk folder…”

Is there any other information I can provide to be helpful in identifying the cause of this issue? My web hosting plan doesn’t appear to allow me to easily create a working subdomain to try to circumvent the issue, and I can’t install into the root public_html folder, if that would even help. Is there an official channel I need to report this issue? The rest of the software is working wonderfully and I don’t want to sound ungrateful but this is creating a cashflow issue for me since my clients are nervous about not being able to view in the portal what they’re agreeing to pay for.

Is downgrading and maintaining my database an option? If so, what version is this confirmed still working in, when Invoice Ninja is installed into a subfolder?

I too would be ready to go back to a previous version, or give more information if necessary, because it is very disabling. Please help us…

1 Like

@david @ben can you please advise if the app supports being run in a subfolder or if it will be supported in the future?

1 Like

@hillel

I think this forum post has a few solutions for users running in a subfolder:

Good day,

Thank you for the good info @hillel @david The directory I run INinja from is https://mydomain.com/invoicing. I am on 5.7.10.

In Livewire.php I change the settings to:

‘asset_url’ => “https://mydomain.com/invoicing”,

and

‘app_url’ => “https://mydomain.com/invoicing”,

Then, because I do not have SSH access, instead of,

php artisan optimize

I put into the browser the url:

https://mydomain.com/invoicing/update

Then instead of running

php artisan cache:clear

I put into the browser;

https://mydomain.com/invoicing/update?secret=secret I also deleted the files in /invoicing/bootstrap/cache/

When I try to view the invoice ( https://mydomain.com/invoicing/public/client/invoices/4openJpe7A?silent=true ) it says “This page doesn’t seem to exist.
It looks like the link pointing here was faulty. Maybe try searching?”

What am I doing wrong?

Please help.

I can confirm, I too have a similar setup in a subfolder. I tried the workaround/adjustments listed above (but I do have ssh access, and followed the steps) with the same results. Restored my original livewire.php file and put things back the way they were for now.

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 “https://mysite.com/invoiceninja” (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 https://mysite.com/invoiceninja/public/client 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’ => “https://mydomain.com/invoicing”,

and

‘app_url’ => “https://mydomain.com/invoicing”,

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: https://mydomain.com/invoicing/update

Then instead of running in SSH php artisan cache:clear

I put into the browser;

https://mydomain.com/invoicing/update?secret=secret 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 ( https://mydomain.com/invoicing/public/client/invoices/4openJpe7A?silent=true ) 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.