Just ran the update | Now I cannot login | Error 500 🙀

Hello @hillel

I hope you can help me with this. As described in the title I just ran the update… I entered my user credentials afterwards and hit login with email and the server refused me to login with the error:
500: Server Error

Log file:
https://pastebin.com/uhH7gJAt

I did run the command sudo php artisan optimize because I thought that might fix the issue. But it didn’t.

I’m sort of desperate because obviously because now I cannot login…

Thanks in advance.
Kind regards
AngryWarrior

Ok so I enabled debug mode and rebooted the server. Now I am seeing this when I attempt to login:

500: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cloudakktm02.recurring_expenses' doesn't exist (SQL: select * from recurring_expenseswhererecurring_expenses.company_id= 1 andrecurring_expenses.company_id is not null)

The system worked fine until I ran the update… How can I fix this?

Thanks in advance.
Kind regards
AngryWarrior

well…welcome to the many issues…try this command php artisan migrate --force (you be inside the root folder of the invoice ninja)

i got away with that error and can login but i cant edit, create invoices, cant view in pdf…issue after issue…
500: There was an error generating the PDF with Phantom JS

you’ll want to make sure your entire directory permissions are owned by the web user, and ensure you have an API key for Phantom JS

I still do not know what to do here @david .
How can you guy’s update blow up my installation in the first place?

Please advice

Kind regards
AngryWarrior

Where can that key be generated?
Kind regards
AngryWarrior

Nevermind I found the answer myself.
https://phantomjscloud.com/index.html

However I’d still like help and answer to my questions regarding this forum thread topic.

Thanks in advance. :+1:

Kind regards
AngryWarrior

Did you find a solution to this issue?

Was it the exactly same error you had as me?

Kind regards
AngryWarrior

@AngryWarrior

This issue is due to a migration not running.

If you have command line access please run

php artisan migrate

or if you do not have command line access - you can access the web URL

/update?secret=

which will attempt the migrations.

1 Like

Thank you for your response @david which is appreciated.

1) So we run this command on the directory itself ,right?

2.) I did not know we needed to setup “migration”. How do we do this?

3.) Proceeded and it failed?
image

image

Kind regards
AngryWarrior

Ok, so I managed to login again.

Thank you so much @david :facepunch:

1.) So how do we setup “automatic migration”?
2.) We seem to have an issue with emails not being sent. It worked fine in the past. (And we have not changed any email settings)
3.) Is there a way force the system to send the email immediately instead of queuing them?
4.) It would be nice actually if you added an tick box " send the email immediately" into the settings of the system.

Not everyone have huge batches of invoices that need to be sent. In our case we send a few invoices per month, so we want to see the those invoices sent directly to our customers when we “click send”. This makes it easier for us to confirm directly that the email has reached our clients.

Kind regards
AngryWarrior

  1. I am not sure what happened with the .16 release. this issue has affected all users so something has prevented the migrations from running for some reason. I’ll need to investigate to understand what has happened so this doesn’t happen again.

  2. There should be errors reported for the issue in the system logs.

  3. QUEUE_CONNECTION=sync makes all actions synchronous, but is impacts the usability of the app.

  4. The quese processes everything pretty much instantly so there shouldn’t be significant delays with emails.

Thank you David for your anwers…

I’ve checked the laravel.log and there isn’t one single line mentioning email failing. So this makes it more wierd.

Is there an email where I could send you the log file securely so you could take a quick look and see something I might be missing @david ?

Thanks in advance
Kind regards
AngryWarrior

@david Running /update?secret= had no effect but running php artisan migrate as the web server user worked

@AngryWarrior you appear to have run the php artisan command as root rather than the web server user (use the -u switch). You might want to re-run this command as it migrated 3 tables for me

HTH

@AngryWarrior

In the Dashboard of the app, check the Systemlogs tab.

it was working fine before I went into the invoice design customization area. How does one get this API secrete please?

I just posted this before beacause i was looking for it too @Kwaku_Ananse:

Kind regards
AngryWarrior.


It just says failure @david but when you click on it, it doesn’t give any reason or explaination for what went wrong.

Kind regards
AngryWarrior

Hi @brackenhill-mob :smirk:

image
How did you do it? (I’m using Ubuntu server version),

Thanks in advance,
Kind regards
AngryWarrior

This worked for me php artisan migrate in the Invoice Ninja directory.

1 Like