"Whoops, looks like something went wrong." after successful install and config.

Hi Hillel:

I just installed Ninja 4.5.6 on Ubuntu 18.04 / Nginx 1.15.6 with SSL cert for domain / PHP 7.2

It was installed from Zip. Every folder in the Ninja path is owned by nginx:nginx and everything is permitted directories: 755 / files: 644

DB connection: successful
Test E-mail: successful
Agreed to terms . . .

Then I get the subject-line error and NOTHING on the resulting page other than the dark red bar + error message.

Advice would be appreciated.


Are there any errors in storage/logs/laravel-error.log

Hi Hilel:

Sorry for the long delay (holidays, work, etc.). I just started over this evening, this time with 4.5.9. Same problem.

The log shows the following:

[2019-01-24 05:53:14] production.ERROR: Illuminate\Database\QueryException [42S02] : /home/FULL_PATH_REDACTED/Accounting/InvoiceNinja/vendor/laravel/framework/src/Illuminate/Database/Connection.php [Line 647] => SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘InvoiceNinja.countries’ doesn’t exist (SQL: select * from countries where country_code = 004 limit 1) {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“POST”,“user_agent”:“Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0”,“locale”:“en”,“ip”:“”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“setup”} []

You’ll note I am running IN from a folder different than the “normal” folder. This arrangement allows for easier backups and other maintenance of the various “non-standard” PHP and other applications we use . . . [ I doubt this is the problem, though – surely install location is not hard-coded and the error is a DB error anyway. ]

Is the IN setup supposed to create the tables in the DB or is this done manually (with some SQL script or otherwise)?

The IN database has only 2 tables and 4 indexes:

Name							Type		Rows		Fields

account_email_settings 					Table (InnoDB) 	0 		29
account_gateway_settings 				Table (InnoDB) 	0 		13

account_email_settings_account_id_index 		Index 		Index	 	1
account_gateway_settings_account_id_foreign 		Index 		Index 		1
account_gateway_settings_user_id_foreign 		Index 		Index 		1
account_gateway_settings_gateway_type_id_foreign 	Index 		Index 		1

I just dropped all the tables and indexes and tried again after installing php-mysql which I noticed I didn’t seem to have installed.

Same result: 2 tables, 4 index created, IN setup errors in the same way . . .

So, the setup routines are not creating all the required tables.

I should mentions 4.5.9 was installed from the ZIP file and is running on PHP Version 7.2.10-0ubuntu0.18.04.1

I’m inching forward! :slight_smile:

I noted from some of Hilel’s other posts that loading /update will often yield information.

Indeed, this provided a new error, namely that a certain tablespace already existed (even though the table was not visible in MariaDB)!

A number of years ago this machine had an earlier version of IN I played with. I had dropped all tables and indexes from the IN DB when I was “done” but left the (ostensibly empty) DB in place for future use. … Well, apparently the tables were not dropped properly and a bunch of .ibd files (InnoDB tables) remained.

I cleared everything out and re-ran setup.

Now I am getting “504 Gateway Time-out” – so, progress, SORT OF!

By the way, the IN DB now has the (expected, as I recall) 73 tables.


I reloaded the setup page, entered credentials and InvoiceNinja seems to have successfully launched.

Somehow the creation of all the tables in the DB must have caused the timeout.

OK … it’s late, I will test the rest of IN tomorrow!

Thanks for your continued development of this great product.

Awesome, glad to hear it’s working!