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

Email not being sent #468

Closed
tmertz opened this issue Feb 6, 2020 · 21 comments
Closed

Email not being sent #468

tmertz opened this issue Feb 6, 2020 · 21 comments
Labels
help wanted Extra attention is needed

Comments

@tmertz
Copy link

tmertz commented Feb 6, 2020

I am seeing a problem with sending email.

The logs say: Trying to access array offset on value of type null

Screenshot 2020-02-05 at 19 28 12

I really have no idea on where to begin to debug this.

@freescout-helpdesk
Copy link
Contributor

Please send full error message

@tmertz
Copy link
Author

tmertz commented Feb 6, 2020

That is all the log is showing me? Where so I find the full error?

DF6B4C43-2050-499E-BB6E-0B789D522990

@tmertz
Copy link
Author

tmertz commented Feb 7, 2020

I found a little bit more.
I have about 147 rows of this:
Trying to access array offset on value of type null; File: /home/witchards/sites/help.witchards.com/public/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php (147)

And the laravel log says:
Trying to access array offset on value of type null {"exception":"[object] (ErrorException(code: 0): Trying to access array offset on value of type null at /home/witchards/sites/help.witchards.com/public/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php:147)

@freescout-helpdesk
Copy link
Contributor

Does it happen for all outgoing emails or just for some customers? Can you give examples of email addresses?

@tmertz
Copy link
Author

tmertz commented Feb 9, 2020

It happens for all emails except emails send using the testing tool.
Doesn't matter if its gmail, yahoo, hotmail, etc.

@freescout-helpdesk
Copy link
Contributor

Have you tried to clear the cache in Manage --> System --> Tools?

@tmertz
Copy link
Author

tmertz commented Feb 11, 2020

Yes. I've cleared that cache a couple of times, to no avail.
In a fit of desperation (we have several players desperately needing to hear from us), I went into the dependency and changed the method to always return false, and that somehow solved my problem. Presumably something is being passed to that method that makes return true and upon returning true it kinda shits the bed. :D

@tmertz
Copy link
Author

tmertz commented Feb 18, 2020

Updating to latest version only returns the error. Which is not surprising as it is simply running composer update presumably, and thereby overwriting the change I made to the dependency.

@shaiquddin
Copy link

@freescout-helpdesk I'm facing a similar error. Test emails go fine. However, My replies/outgoing emails are not being sent and I've to force-fetch all incoming emails. Please help.

@freescout-helpdesk
Copy link
Contributor

Sorry, we can't reproduce the issue on our end.

@sam-suresh
Copy link

I got same error after moving site from Vultr to DO.
Using same Apache+Nginx stack.

Still checking what is wrong.

@sam-suresh
Copy link

 Trying to access array offset on value of type null {"exception":"[object] (ErrorException(code: 0): Trying to access array offset on value of type null at /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php:147)
[stacktrace]
#0 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php(147): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Trying to acces...', '/srv/users/help...', 147, Array)
#1 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/Parser/Parser.php(127): Egulias\\EmailValidator\\Parser\\Parser->escaped()
#2 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/Parser/LocalPart.php(57): Egulias\\EmailValidator\\Parser\\Parser->isFWS()
#3 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/EmailParser.php(48): Egulias\\EmailValidator\\Parser\\LocalPart->parse('5cc7447b84305f4...')
#4 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/Validation/RFCValidation.php(30): Egulias\\EmailValidator\\EmailParser->parse('5cc7447b84305f4...')
#5 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/egulias/email-validator/EmailValidator/EmailValidator.php(37): Egulias\\EmailValidator\\Validation\\RFCValidation->isValid('5cc7447b84305f4...', Object(Egulias\\EmailValidator\\EmailLexer))
#6 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php(182): Egulias\\EmailValidator\\EmailValidator->isValid('5cc7447b84305f4...', Object(Egulias\\EmailValidator\\Validation\\RFCValidation))
#7 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php(128): Swift_Mime_Headers_IdentificationHeader->assertValidId('5cc7447b84305f4...')
#8 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php(99): Swift_Mime_Headers_IdentificationHeader->setIds(Array)
#9 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php(75): Swift_Mime_Headers_IdentificationHeader->setId('5cc7447b84305f4...')
#10 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php(141): Swift_Mime_Headers_IdentificationHeader->setFieldBodyModel('5cc7447b84305f4...')
#11 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php(115): Swift_Mime_SimpleHeaderFactory->createIdHeader('Message-ID', '5cc7447b84305f4...')
#12 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(217): Swift_Mime_SimpleHeaderSet->addIdHeader('Message-ID', '5cc7447b84305f4...')
#13 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php(53): Swift_Mime_SimpleMimeEntity->setId('5cc7447b84305f4...')
#14 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Message.php(48): Swift_Mime_SimpleMessage->__construct(Object(Swift_Mime_SimpleHeaderSet), Object(Swift_Mime_ContentEncoder_QpContentEncoderProxy), Object(Swift_KeyCache_DiskKeyCache), Object(Swift_Mime_IdGenerator), 'utf-8')
#15 [internal function]: Swift_Message->__construct()
#16 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php(330): ReflectionClass->newInstanceArgs(Array)
#17 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php(115): Swift_DependencyContainer->createNewInstance('message.message')
#18 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php(41): Swift_DependencyContainer->lookup('message.message')
#19 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(423): Swift_Mailer->createMessage('message')
#20 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(213): Illuminate\\Mail\\Mailer->createMessage()
#21 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php(125): Illuminate\\Mail\\Mailer->send('emails/customer...', Array, Object(Closure))
#22 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(250): Illuminate\\Mail\\Mailable->send(Object(Illuminate\\Mail\\Mailer))
#23 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php(205): Illuminate\\Mail\\Mailer->sendMailable(Object(App\\Mail\\ReplyToCustomer))
#24 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php(99): Illuminate\\Mail\\Mailer->send(Object(App\\Mail\\ReplyToCustomer))
#25 /srv/users/myhelpdesk/apps/myhelpdesk/app/Jobs/SendReplyToCustomer.php(181): Illuminate\\Mail\\PendingMail->send(Object(App\\Mail\\ReplyToCustomer))
#26 [internal function]: App\\Jobs\\SendReplyToCustomer->handle()
#27 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#28 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#29 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#30 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#31 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\\Container\\Container->call(Array)
#32 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(114): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}(Object(App\\Jobs\\SendReplyToCustomer))
#33 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(App\\Jobs\\SendReplyToCustomer))
#34 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#35 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(49): Illuminate\\Bus\\Dispatcher->dispatchNow(Object(App\\Jobs\\SendReplyToCustomer), false)
#36 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(76): Illuminate\\Queue\\CallQueuedHandler->call(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Array)
#37 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(320): Illuminate\\Queue\\Jobs\\Job->fire()
#38 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(270): Illuminate\\Queue\\Worker->process('database', Object(Illuminate\\Queue\\Jobs\\DatabaseJob), Object(Illuminate\\Queue\\WorkerOptions))
#39 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(114): Illuminate\\Queue\\Worker->runJob(Object(Illuminate\\Queue\\Jobs\\DatabaseJob), 'database', Object(Illuminate\\Queue\\WorkerOptions))
#40 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\\Queue\\Worker->daemon('database', 'emails,default,...', Object(Illuminate\\Queue\\WorkerOptions))
#41 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(85): Illuminate\\Queue\\Console\\WorkCommand->runWorker('database', 'emails,default,...')
#42 [internal function]: Illuminate\\Queue\\Console\\WorkCommand->handle()
#43 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#44 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#45 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Array, Object(Closure))
#46 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Container/Container.php(549): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Array, Array, NULL)
#47 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call(Array)
#48 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/symfony/console/Command/Command.php(255): Illuminate\\Console\\Command->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#49 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Illuminate\\Console\\OutputStyle))
#50 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/symfony/console/Application.php(946): Illuminate\\Console\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#51 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/symfony/console/Application.php(248): Symfony\\Component\\Console\\Application->doRunCommand(Object(Illuminate\\Queue\\Console\\WorkCommand), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#52 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/symfony/console/Application.php(148): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#53 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Console/Application.php(88): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#54 /srv/users/myhelpdesk/apps/myhelpdesk/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#55 /srv/users/myhelpdesk/apps/myhelpdesk/artisan(43): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#56 {main}
"}

@sam-suresh
Copy link

Partial finding: PHP 7.4
This version of Laravel supported up to 7.2 only
laravel/framework#30737

I'm using 7.2 now but the issue still there.

@freescout-helpdesk
Copy link
Contributor

If anyone can provide us access to your server to check this issue please email at [email protected]

@freescout-helpdesk freescout-helpdesk added the help wanted Extra attention is needed label Apr 3, 2020
@uaimax
Copy link

uaimax commented May 9, 2020

I'm facing the same issue. Just sent the ssh access to email.

@freescout-helpdesk
Copy link
Contributor

I'm facing the same issue. Just sent the ssh access to email.

Are you using the latest version of FreeScout?

@sam-suresh
Copy link

Confirmed in the present version the issue still exists.
Tried to switch PHP 7.2, 7.3, and 7.4 still the same.

@sam-suresh
Copy link

sam-suresh commented May 14, 2020

Looks like this is related to the email validator package.
Although the original issue affecting PHP 7.4, FreeScout PHP 7.2 affected too.
egulias/EmailValidator#203

Omitting the following line, stops this error and the app working. I'm not sure how this affects though.

       // $previous = $this->lexer->getPrevious();
        // if ($previous['type'] === EmailLexer::S_BACKSLASH
        //     &&
        //     $this->lexer->token['type'] !== EmailLexer::GENERIC
        // ) {
        //     return true;
        // }
        // return false;

@freescout-helpdesk
Copy link
Contributor

Make sure that your console PHP version is < PHP 7.4:

php -v

@sam-suresh
Copy link

You are absolutely right! Although I set PHP version for FreeScout app, the composer always using PHP-CLI

on Ubuntu,
sudo apt-get install php-cli
sudo dpkg-reconfigure php-cli

then downgrading to PHP 7.3 solved the issue!!

@freescout-helpdesk
Copy link
Contributor

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants