Can't get past the setup screen - self hosted

I’m testing out InvoiceNinja but I’m having a difficult time getting past the setup screen. On the setup page, I filled out the database and the smtp sections without issue and tested them. The PDF part did not work however which I was going to look into that later.

When I hit submit, it just blanks the page and goes back to a fresh form with no errors.

I’m trying version 5.0.13.

Welcome to Invoice Ninja,

It’d be awesome if you can send a log file to me in private.

It’s located in storage/framework/logs directory.


I would be happy to but there is no logs file or directory in my storage/framework directory.

This is also happening for me. Exact same problem.

I followed this tutorial and used th 5.0.13 release: Install Invoice Ninja v5 on Ubuntu 20.04

I can tell you that the ninjadb database is still empty after hitting save.

Thank you for looking into this for us!

Did you run

 npm update --unsafe-perms=true  #necessary for chromium headless to make pdf
 cp .env.example .env
 php artisan key:generate  # run after generating .env, value is saved to .env, necessary for encryption key generation in order to populate db at all
 php artisan storage:link  # symlink for pathing for some pdf and client portal stuff 
 chown -R www-data:www-data /usr/share/nginx/invoiceninja #necessary after all updates and new files generated
 php artisan optimize  # run one last time after all changes.
 chmod -R g+s /usr/share/nginx/invoiceninja   # assigns group ownership of www-data to any new files generated in this directory tree.

I did not run those commands. I was following the instructions as well. If those need to be ran, the instructions need to be updated.

They’re all in the instructions, in my guide. Linked above. Always have been. The official documentation is different. Its why I made this. I’m just a community member.

I followed the official instructions on an existing webserver.

This is what I get when I run the last command:

root@ubuntu-s-4vcpu-8gb-sfo2-01:/usr/share/nginx# chmod -R g+s www-data:www-dat a /usr/share/nginx/invoiceninja
chmod: cannot access ‘www-data:www-data’: No such file or directory

emt, you have a space after the dat, it should be www-data

I also had nothing in the framework directory for logs.

But I did have this in the laravel.log file:

Error Output:

│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /var/www/.config │
Error: Failed to launch chrome!
/usr/share/nginx/invoiceninja/node_modules/puppeteer/.local-chromium/linux-686378/chrome-linux/chrome: error while loading shared libraries: cannot open shared object file: No such file>


at onClose (/usr/share/nginx/invoiceninja/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.<anonymous> (/usr/share/nginx/invoiceninja/node_modules/puppeteer/lib/Launcher.js:337:50)
at Interface.emit (events.js:326:22)
at Interface.close (readline.js:424:8)
at Socket.onend (readline.js:202:10)
at Socket.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1244:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

[2020-09-02 19:20:28] local.INFO: POST - 0 queries - 1.1847519874573
[2020-09-02 19:20:39] local.INFO: POST - 0 queries - 0.020479917526245
[2020-09-02 19:20:53] local.INFO: GET - 0 queries - 0.0084969997406006
[2020-09-02 19:21:07] local.INFO: The command "PATH=$PATH:/usr/local/bin NODE_PATH=npm root -g node ‘/usr/share/nginx/invoiceninja/vendor/spatie/browsershot/src/…/bin/browser.js’ '{“url”:"https://w>

Exit Code: 1(General error)

Working directory: /usr/share/nginx/invoiceninja/public


Sorry, I must have mis-pasted the error. This is what I just ran and received:

root@ubuntu-s-4vcpu-8gb-sfo2-01:/usr/share/nginx/invoiceninja# chmod -R g+s www-data:www-data /usr/share/nginx/invoiceninja
chmod: cannot access ‘www-data:www-data’: No such file or directory

My mistake just type without the user group thing, it works based on the current group assignments. I’ve updated my posts

 chmod -R g+s /usr/share/nginx/invoiceninja

Yeah the official instructions sorely need improvement. Parts of my instructions are derived from those instructions, the Readme in the package that most people don’t notice that has extra instructions not mentioned online, and parts of course for preparing the environment were derived from multiple other guides on previous versions of IN.

Thats why I went out of my way to make this documentation, it was sorely needed lol.

1 Like

So I was able to fix the error above regarding not being able to generate the test pdf during setup by running this command:

sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

found on this site:

However, even after running the corrected chmod command in previous posts, it does not solve the issue of getting the 500 error after completing the setup page. The db is still empty.

ok, I got it working.

I was getting this error in the laravel.log log:

[2020-09-03 05:43:51] production.ERROR: file_put_contents(/usr/share/nginx/invoiceninja/storage/framework/cache/data/f1/ea/f1eabb77009ad971292850d3b11813decbf8e5d0): failed to open stream: No such file >

I ran this command on the storage directory while I was in the /usr/share/nginx/invoiceninja directory

chmod -R 775 storage

What distro are you using? I will add chmod for storage step. But for your errors with npm/chromium. I don’t recall needing those extra dependencies to install in Ubuntu VM. Is yours an Ubuntu server or headless version of the distro or anything?

This is what I got:

root@ubuntu-s-4vcpu-8gb-sfo2-01:~# dmesg | head -1
[    0.000000] Linux version 5.4.0-45-generic (buildd@lgw01-amd64-033) (gcc vers                                     ion 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #49-Ubuntu SMP Wed Aug 26 13:38:52 UTC 2020                                      (Ubuntu 5.4.0-45.49-generic 5.4.55)
root@ubuntu-s-4vcpu-8gb-sfo2-01:~#  lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

This is a droplet that I spun in Digital Ocean.

I’ve also noticed that my PDFs do not format nicely. And it doesn’t seem to send the invoices out even though the email server test positively during setup and I received the email test. I am going to spin this up in something else and see how it goes.

I updated my post above to the fact that the PDFs do not format nicely. I seemed to have left out those two words initially.