V5 errors - pdf, cron

Everything was working fine, but now finding today that I cannot view any pdfs (including previews). Also, getting the following error in the laravel.log every minute after the cron schedule runs it seems.

Class ‘Webmozart\Assert\Assert’ not found

App is telling me an update is available, but showing latest version is 5.0.29, though shows I am running 5.0.30.

Tried pulls from v5-stable and v5-develop… both seem to be the same? Unsure if something changed, but been chasing this all day and coming up empty.

Hi,

Are you able to determine if anything changed?

Also, are you using node or PhantomJS for PDFs?

This is a regression, we have changed the default PDF generator to PhantomJS.

This breaks existing installations, however can be resolve by adding to the .env file

PHANTOMJS_PDF_GENERATION=false

then run

php artisan optimize

I have been using node - I thought that was the direction for v5. There are no PhantomJS config entries in my .env. If that’s the preferred/correct method, what needs to be changed/added to enable PhantomJS?

Did a complete reinstall, and everything seems to be working now.

1 Like

It seems that emails are not going out. I create a test invoice, app shows sent, but no emails were received - not to the client nor the admin notification. Checked SMTP server and see no attempts from the app to send the messages. I did click the ‘test’ button on the setup page during the install, which succeeded and I did get the test message. That was the last message my SMTP server shows coming from the app. Don’t see any errors in the log, and do see the html of the messages in the log.

Changing MAIL_MAILER to SMTP in the env seems to have fixed the email issue.

1 Like

@JFox our preference for the app is NODE, however there is a big chunk of users who prefer PhantomJS Cloud… In these situations we prefer to offer multiple solutions.

1 Like

Hello.
I have the same error.
Everything seems to be working okay but these errors are entered in laravel.log every minute.

[2020-12-19 03:14:02] production.ERROR: Class ‘Webmozart\Assert\Assert’ not found {“exception”:"[object] (Error(code: 0): Class ‘Webmozart\Assert\Assert’ not found at /var/www/html/invoiceninja/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php:129)

you may need to run

composer dump
composer install --no-dev

Thanks!
After running composer dump the errors have stopped.