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.
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.
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.
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
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: libX11-xcb.so.1: 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)
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
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.
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.
[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
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?
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
root@ubuntu-s-4vcpu-8gb-sfo2-01:~#
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.