I am hosting InvoiceNinja v5 using Caddy, but a few features don’t seem to work quite right, including PDF generation, file uploads, and the mobile app.
Does anyone know the proper rewrite syntax for running InvoiceNinja on Caddy?
But, after I updated to v5.0.41-C35, installed the Chromium dependencies, set PHANTOMJS_PDF_GENERATION to false and ran composer install --no-dev, I had some potentially relevant error output.
$ composer install --no-dev
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package asgrim/ofxparser is abandoned, you should avoid using it. No replacement was suggested.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: fedeisas/laravel-mail-css-inliner
Discovered Package: fideloper/proxy
Discovered Package: intervention/image
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/socialite
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: livewire/livewire
Discovered Package: nesbot/carbon
Discovered Package: nwidart/laravel-modules
Discovered Package: sentry/sentry-laravel
Discovered Package: turbo124/beacon
Discovered Package: turbo124/laravel-gmail
Discovered Package: webpatser/laravel-countries
Package manifest generated successfully.
69 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> vendor/bin/snappdf download
Starting download. Revision: 839671
Download completed. Extracting the zip archive.
PHP Warning: mkdir(): File exists in /var/www/html/invoice.domain.com/vendor/beganovich/snappdf/src/Command/DownloadChromiumCommand.php on line 80
PHP Warning: ZipArchive::extractTo(): Invalid or uninitialized Zip object in /var/www/html/invoice.domain.com/vendor/beganovich/snappdf/src/Command/DownloadChromiumCommand.php on line 82
PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /var/www/html/invoice.domain.com/vendor/beganovich/snappdf/src/Command/DownloadChromiumCommand.php on line 83
Archive extracted. Creating symlink for 839671-Linux_x64
Completed! 839671-Linux_x64 currently in use.
Aside from all that, still having PDF generation issues.
Looks like you’re trying to download the same version of Chromium again. Nothing to worry about, I’ll push an update into snappdf, so you don’t see that message next time.
When you try to generate PDF, is there any log in storage/logs/laravel.log?
Make sure you have installed required Chromium libraries also:
There shouldn’t be!
Here’s what you can do if it’s not deal-breaking.
Navigate to public/storage:
There you should see some random strings. You can browse that folder & find PDFs of invoices. You can freely delete them and try to view the invoice in the admin panel again. They should be regenerated.