Whoops, looks like something went wrong.

Hello, recently I have been having a problem with the display of the invoice for customers.

The email that is sent to customers with the notification and the view invoice button is not working.

When you click to see it online, the web appears saying error and Whoops, looks like something went wrong.

a few days ago it was working fine but from one moment to another it stopped working

Do you see any related error details on /errors (or /public/errors)

No, but look in the storage folder that in other support sections I saw that there were errors and found this

[2020-02-15 17:42:54] production.ERROR: *** Illuminate \ Contracts \ Encryption \ DecryptException *** [0]: / home / adictiva / public_html / invoice / vendor / laravel / framework / src / Illuminate / Encryption / Encrypter.php [Línea 195] => El MAC no es válido. {“context”: “PHP”, “user_id”: 0, “account_id”: 0, “user_name”: “”, “method”: “GET”, “user_agent”: "Mozilla / 5.0 (Windows NT 10.0; Win64 ; x64) AppleWebKit / 537.36 (KHTML, como Gecko) Chrome / 79.0.3945.130 Safari / 537.36 “,” locale “:” es “,” ip “:” 191.109.166.236 “,” count “: 1,” is_console ": “no”, “is_api”: “no”, “db_server”: “mysql”, “url”: “view / apg9qjqxmj2qw0jbemcxjnptoykobswb”} []

[2020-02-15 17:42:55] production.ERROR: *** Illuminate \ Contracts \ Encryption \ DecryptException *** [0]: / home / adictiva / public_html / invoice / vendor / laravel / framework / src / Illuminate / Encryption / Encrypter.php [Línea 195] => El MAC no es válido. {“context”: “PHP”, “user_id”: 0, “account_id”: 0, “user_name”: “”, “method”: “GET”, “user_agent”: "Mozilla / 5.0 (Windows NT 10.0; Win64 ; x64) AppleWebKit / 537.36 (KHTML, como Gecko) Chrome / 79.0.3945.130 Safari / 537.36 “,” locale “:” es “,” ip “:” 191.109.166.236 “,” count “: 2,” is_console ": “no”, “is_api”: “no”, “db_server”: “mysql”, “url”: “view / apg9qjqxmj2qw0jbemcxjnptoykobswb”} []

And refers to the last 2 attempts to see invoices I made recently

I’ve seen that error if the value for APP_KEY in the .env file is changed

and where can I find the correct value to change the “APP_KEY” in the .env file

Was the app moved, the value shouldn’t be changed.

I recently made a change of hosting, so a migration was made

In your initial post you wrote “a few days ago it was working fine but from one moment to another it stopped working”, was moving the servers in between it working and not working?

Hi, continuing with this topic.

2 weeks ago I tried to make a new installation from softaculous and reinstall the database and configure everything again, but the problem of not being able to see the invoice online is still not possible.

Now a few minutes ago I just realized that the pdf invoice that is sent in the same message as an attached email is also not possible to see and shows an error when trying to open it.

Then I go directly to the webapp and download the invoice to a pdf and if possible see.

Do you see any related error in storage/logs/laravel-error.log

It may help to use a local PhantomJS install.

https://invoice-ninja.readthedocs.io/en/latest/configure.html#phantomjs

Hello, I made the change according to the instructions shown in the link.
add the line
PHANTOMJS_BIN_PATH = / usr / local / bin / phantomjs
to the .env file and delete the other 2 that were before.
but the same is still happening, even with the test button in the email configuration section

and these are the last 5 errors in the laravel-error.log file

[2020-03-11 21:10:31] production.ERROR: PhantomJS - Failed to load https://invoice.adictivamedia.com/public/view/whgegwoyjff11dcaleipa6axeih0mr8x?phantomjs=true&phantomjs_secret=: File does not exist or is not executable: /usr/local/bin/phantomjs {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“Adictiva Media”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,“locale”:“es”,“ip”:“186.29.49.33”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“test_headless”} []
[2020-03-11 21:10:33] production.ERROR: PhantomJS - Failed to load https://invoice.adictivamedia.com/public/view/whgegwoyjff11dcaleipa6axeih0mr8x?phantomjs=true&phantomjs_secret=: File does not exist or is not executable: /usr/local/bin/phantomjs {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“Adictiva Media”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,“locale”:“es”,“ip”:“186.29.49.33”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“test_headless”} []
[2020-03-11 21:10:35] production.ERROR: PhantomJS - Failed to load https://invoice.adictivamedia.com/public/view/whgegwoyjff11dcaleipa6axeih0mr8x?phantomjs=true&phantomjs_secret=: File does not exist or is not executable: /usr/local/bin/phantomjs {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“Adictiva Media”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,“locale”:“es”,“ip”:“186.29.49.33”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“test_headless”} []
[2020-03-11 21:10:36] production.ERROR: PhantomJS - Failed to load https://invoice.adictivamedia.com/public/view/whgegwoyjff11dcaleipa6axeih0mr8x?phantomjs=true&phantomjs_secret=: File does not exist or is not executable: /usr/local/bin/phantomjs {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“Adictiva Media”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,“locale”:“es”,“ip”:“186.29.49.33”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“test_headless”} []
[2020-03-11 21:12:29] production.ERROR: Illuminate\Contracts\Encryption\DecryptException [0] : /home/adictiva/public_html/invoice/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 195] => The MAC is invalid. {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“Adictiva Media”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,“locale”:“es”,“ip”:“186.29.49.33”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“view/875z4hhfc1vpzbyiwbavejqfytl0amxc”} []
[2020-03-11 21:12:30] production.ERROR: Illuminate\Contracts\Encryption\DecryptException [0] : /home/adictiva/public_html/invoice/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 195] => The MAC is invalid. {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:“Adictiva Media”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36”,“locale”:“es”,“ip”:“186.29.49.33”,“count”:2,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“view/875z4hhfc1vpzbyiwbavejqfytl0amxc”} []

  • What do you see if you run which phantomjs

  • What do you see if you run phantomjs -v

Where and how exactly should I put this code?

I also just realized that the error happens with the attached e-mailed invoices, which when opened say that the file is damaged

As extra data

I wanted to do some tests, so I
install invoice ninja on ampps localhost with new install and same error happens to see invoices

You would need to SSH into the server to run these commands from the command line

Hi.

doing tests because the view of the invoices or the button of the emails or the attached files still does not work, I decided to do a test and install a new second installation of invoice ninja in a new subdomain, try creating a new client and invoice, and it worked without any problem, so I tried to link the database of the first previous installation which is where I have all the data I use every day and the problem happened again, it seems as if the error was caused by the database data.

Due to this I decided to purge this second installation and go to the first installation and in the import / export section, export everything in a json file since it is the one suggested to migrate from invoice ninja to invoice ninja and go and import it in the new second installation.

I did the import and when it is in the process I get an error

I go back to see what happened and I see that the import was interrupted and only some data was imported, I do the test with the data that was left and both the invoice preview and the rest work well.

For my part, it seems to be the solution to the problem I have been having.

but the error that did not let the import process finish was:

Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase ‘Connection Timeout’.

so i incremented the max_execution_time and max_input_time values ​​in cPanel and tried to import the json file backup again but it keeps giving the same Request Timeout error and 500 internal server error

What value should I correct so that this does not happen then?

If you’re transferring from one self host install to another we recommend using mysqldump to transfer the database