Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mautic:broadcasts:send - Call to a member function get() on null #13577

Open
1 task done
lordimac opened this issue Mar 24, 2024 · 7 comments
Open
1 task done

mautic:broadcasts:send - Call to a member function get() on null #13577

lordimac opened this issue Mar 24, 2024 · 7 comments
Labels
bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged

Comments

@lordimac
Copy link

lordimac commented Mar 24, 2024

Mautic Version

5.0.x series

Way of installing

I'm using a Docker image from https://hub.docker.com/r/mautic/mautic

PHP version

8.1.27

What browsers are you seeing the problem on?

No response

What happened?

When trying to send the broadcast list with bash command/cronjob, I get the following error. It sends only 1 mail and aborts after this. Message gets send but the record for sent mails in Channels -> Emails is still 0.

How can we reproduce this issue?

Create email list and send with mautic:broadcasts:send

Relevant log output

name

In AssetModel.php line 129:

  [Error]
  Call to a member function get() on null


Exception trace:
  at /var/www/html/docroot/app/bundles/AssetBundle/Model/AssetModel.php:129
 Mautic\AssetBundle\Model\AssetModel->trackDownload() at /var/www/html/docroot/app/bundles/EmailBundle/Helper/MailHelper.php:1617
 Mautic\EmailBundle\Helper\MailHelper->createAssetDownloadEntries() at /var/www/html/docroot/app/bundles/EmailBundle/Helper/MailHelper.php:423
 Mautic\EmailBundle\Helper\MailHelper->send() at /var/www/html/docroot/app/bundles/EmailBundle/Helper/MailHelper.php:482
 Mautic\EmailBundle\Helper\MailHelper->queue() at /var/www/html/docroot/app/bundles/EmailBundle/Model/SendEmailToContact.php:380
 Mautic\EmailBundle\Model\SendEmailToContact->sendStandardEmail() at /var/www/html/docroot/app/bundles/EmailBundle/Model/SendEmailToContact.php:191
 Mautic\EmailBundle\Model\SendEmailToContact->send() at /var/www/html/docroot/app/bundles/EmailBundle/Model/EmailModel.php:1430
 Mautic\EmailBundle\Model\EmailModel->sendEmail() at /var/www/html/docroot/app/bundles/EmailBundle/Model/EmailModel.php:1063
 Mautic\EmailBundle\Model\EmailModel->sendEmailToLists() at /var/www/html/docroot/app/bundles/EmailBundle/EventListener/BroadcastSubscriber.php:48
 Mautic\EmailBundle\EventListener\BroadcastSubscriber->onBroadcast() at /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:270
 Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() at /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:230
 Symfony\Component\EventDispatcher\EventDispatcher->callListeners() at /var/www/html/vendor/symfony/event-dispatcher/EventDispatcher.php:59
 Symfony\Component\EventDispatcher\EventDispatcher->dispatch() at /var/www/html/docroot/app/bundles/ChannelBundle/Command/SendChannelBroadcastCommand.php:134
 Mautic\ChannelBundle\Command\SendChannelBroadcastCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1058
 Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:96
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/framework-bundle/Console/Application.php:82
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /var/www/html/bin/console:16

mautic:broadcasts:send [-c|--channel [CHANNEL]] [-i|--id [ID]] [--min-contact-id [MIN-CONTACT-ID]] [--max-contact-id [MAX-CONTACT-ID]] [-l|--limit [LIMIT]] [-b|--batch [BATCH]] [--thread-id [THREAD-ID]] [--max-threads [MAX-THREADS]] [--bypass-locking] [-t|--timeout TIMEOUT] [-x|--lock_mode LOCK_MODE] [-f|--force]

Code of Conduct

  • I confirm that I have read and agree to follow this project's Code of Conduct




Care about this issue? Want to get it resolved sooner? If you are a member of Mautic, you can add some funds to the Bounties Project so that the person who completes this task can claim those funds once it is merged by a member of the core team! Read the docs here.

@lordimac lordimac added bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged labels Mar 24, 2024
@keyboardman
Copy link

Hi,

I've the same issue:
mautic: 5.0.x series
PHP Version 8.0.30

php bin/console mautic:broadcasts:send
In AssetModel.php line 129:
Call to a member function get() on null

@keyboardman
Copy link

I deleted the attachments. the problem has disappeared

@lordimac
Copy link
Author

lordimac commented Apr 9, 2024

@dsp76
Copy link

dsp76 commented Apr 13, 2024

I deleted the attachments. the problem has disappeared

So you say this only happens, when you try to send attachments with the mail? Is it recreatable?

@lordimac
Copy link
Author

lordimac commented Apr 15, 2024

Yes it's recreatable, at least in Version 5.0.3. Cant tell much about 5.0.4 at the moment, because I cant update my docker env yet.

Sending with attachment ends up with above error "Call to a member function get() on null".
Sending without attachment is running fine.

test_1 was with attachment, mail is sent but not registered as sent and with error.
test_2 was without attachment. Everthing fine.
firefox_2024-04-15_12-01-29

@keyboardman
Copy link

below are the error logs

2024-03-27T10:33:26.118362+00:00] mautic.ERROR: Error: Call to a member function get() on null (uncaught exception) at www/mautic/app/bundles/AssetBundle/Model/AssetModel.php line 129 while running console command mautic:broadcasts:send [stack trace] #0 /www/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(1617): Mautic\AssetBundle\Model\AssetModel->trackDownload() #1 /www/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(423): Mautic\EmailBundle\Helper\MailHelper->createAssetDownloadEntries() #2 www/mautic/app/bundles/EmailBundle/Helper/MailHelper.php(482): Mautic\EmailBundle\Helper\MailHelper->send() #3 www/mautic/app/bundles/EmailBundle/Model/SendEmailToContact.php(380): Mautic\EmailBundle\Helper\MailHelper->queue() #4 www/mautic/app/bundles/EmailBundle/Model/SendEmailToContact.php(191): Mautic\EmailBundle\Model\SendEmailToContact->sendStandardEmail() #5
www/mautic/app/bundles/EmailBundle/Model/EmailModel.php(1430): Mautic\EmailBundle\Model\SendEmailToContact->send() #6 www/mautic/app/bundles/EmailBundle/Model/EmailModel.php(1063): Mautic\EmailBundle\Model\EmailModel->sendEmail() #7 www/mautic/app/bundles/EmailBundle/EventListener/BroadcastSubscriber.php(48): Mautic\EmailBundle\Model\EmailModel->sendEmailToLists() #8 www/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(270): Mautic\EmailBundle\EventListener\BroadcastSubscriber->onBroadcast() #9 www/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher{closure}() #10 www/mautic/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callListeners() #11 www/mautic/app/bundles/ChannelBundle/Command/SendChannelBroadcastCommand.php(134): Symfony\Component\EventDispatcher\EventDispatcher->dispatch() #12 www/mautic/vendor/symfony/console/Command/Command.php(298): Mautic\ChannelBundle\Command\SendChannelBroadcastCommand->execute() #13 www/mautic/vendor/symfony/console/Application.php(1058): Symfony\Component\Console\Command\Command->run() #14 www/mautic/vendor/symfony/framework-bundle/Console/Application.php(96): Symfony\Component\Console\Application->doRunCommand() #15 www/mautic/vendor/symfony/console/Application.php(301): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() #16 www/mautic/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun() #17 www/mautic/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun() #18 www/mautic/bin/console(16): Symfony\Component\Console\Application->run() #19 {main} []

@lordimac
Copy link
Author

For your information, same problem in 5.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs needs-triage For new issues/PRs that need to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants