View recurring invoice -> You are not authorized to view or perform this action

Hi All,

When I first created the recurring invoices, they are by default set to “pending” once the cron job runs to send out = php artisan ninja:send-reminders , then the recurring invoice turned green as ACTIVE.

Once that happened a copy recurring invoice was pushed in Invoices.

Then when logged in as the end user, I am now able to browse to the regular invoice and view it.

But when i browse over to Recurring Invoice i still see
{“message”:“You are not authorized to view or perform this action”}

Thanks
Phil

@david any thoughts?

@philly75

Can you advise your hosting configuration, I haven’t been able to recreate this.

Hello team,

Jumping into the thread since i’m having the same issue, although not with recurrent invoices, but with quotes. :sweat_smile: Already tried:

  • Disable/enable all modules
  • Add ASSETS_URL in .env file and run php artisan optimize
  • Update to the latest version (i’m currently on v5.3.10-C59)

Invoices do work, but quotes don’t. I’m quick testing the problem by clicking the three dots next to the invoice / quote and clicking “client portal”.

Thanks in advance for all the help,

This one is puzzling as I can’t recreate.

Can you advise your hosting environment?

Also, can you confirm the quotes module is enabled in the admin portal?

Sure thing. I’m self-hosting at Fastcomet with PHP v7.4.23, mysql 5.7.35 and Apache 2.4.48.

Yes, quotes module is on.

Regards,

1 Like

I have exactly the same situation with the same hosting provider too (fastcomet). Fresh new setup just build 2 days ago from scratch.

Im also facing this issues. Anyway i dont know if this will help mr @david

Sometimes, in my case for quote, is bring me to the login page for the client /public/client/login

even though when i test the invoice button, it bring me directly to the portal without need to enter login credential

Maybe something related to session issues?

and another info, all user are migrated from version 4, not new user. but testing with new created user also facing the same issues.

@NoobKS92 I don’t think it’s because you migrated from V4 to V5. My environment if FRESH. just one test user and 2 products (one of which is a test product). There is nothing complex/custom in my setup. I believe this might be a bug.

I agreed with you, it seems it didnt related to migration, i just do a fresh install just now and it seem it was indeed error by default on fresh version 5.3.29.

Please ensure there is no trailing slash in the .env variable APP_URL

Dear All, in my case, i found the solution simply by switching the php version im using.

I change from ALT-php80 to EA-php80

now i dont know why or what difference between these 2, but as long as it solved my problem, im okay with it. Im hope this solution can help some of you.

Did what David suggested but same issue

Can you tell me how you changed the version pls?

Thanks

Im using cpanel, so i just need to use Multi PHP Manager to change it to the EA version of the PHP, so if you cant, or didnt know how to do it, you can ask your hoster to do it for you. And once it changes, theres might be some modules and extension for the php that you need to ask them to install too.

But 1st before doing anything, i suggest that you check first what is your current php version you are using.

Here it says to upload in you public_html, but if you use plesk it might be httpdocs or if you have multiple domain, you need to upload this to the folder of the domain you use invoice ninja.

I highly recommend you just ask support to do this if you didnt know how to do this.

2nd step, when it confirmed that it was indeed ALT-php80, then you can ask your host to try change to EA-php80.

But please kept in mind, that theres a risk of you might need to reinstall you Invoiceninja v5, after the changes.

1 Like

Thanks a million. Will look into it sometime today.

Is there any update as to what causes this issue?
Confirming that the same behaviour still exists in build v5.3.85-c81 using PHP 7.4 /opt/alt/php74/ in a cPanel shared hosting environment.

It’s so strange, the view invoice button will work, but view quote throws the error message.
Also can view invoices inside the client portal, but can’t view quotes inside the portal.

Does changing PHP version to the EA version actually fix this issue?

Just an update, i see a potential issue here. In the next release, i believe this will be resolved.

v5.3.99 tagged with a fix.

I have this issue in 5.4.4 with recurring invoices. None of the above fixes work.

return auth()->guard('contact')->user()->client->id === $this->recurring_invoice->client_id
The comparison should be == not ===