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

[GLPI 9.5.1] Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException #7790

Closed
steph461 opened this issue Jul 30, 2020 · 10 comments
Assignees
Labels
Milestone

Comments

@steph461
Copy link

Since 10am, I can't retrieve an email with the mailgate.
i dont know why i got this error message. It is no longer possible to retrieve messages.

php error logs :
[2020-07-30 12:00:05] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name subject or subject not found in /var/www/html/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
Backtrace :
...r/laminas/laminas-mail/src/Storage/Part.php:376 Laminas\Mail\Storage\Part->getHeader()
inc/mailcollector.class.php:1035 Laminas\Mail\Storage\Part->__get()
inc/mailcollector.class.php:734 MailCollector->buildTicket()
inc/mailcollector.class.php:1740 MailCollector->collect()
inc/crontask.class.php:847 MailCollector::cronMailgate()
front/crontask.form.php:49 CronTask::launch()

[2020-07-30 12:04:37] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name subject or subject not found in /var/www/html/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
Backtrace :
...r/laminas/laminas-mail/src/Storage/Part.php:376 Laminas\Mail\Storage\Part->getHeader()
inc/mailcollector.class.php:1035 Laminas\Mail\Storage\Part->__get()
inc/mailcollector.class.php:734 MailCollector->buildTicket()
inc/mailcollector.class.php:1740 MailCollector->collect()
inc/crontask.class.php:847 MailCollector::cronMailgate()
front/crontask.form.php:49 CronTask::launch()

[2020-07-30 12:11:18] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name subject or subject not found in /var/www/html/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
Backtrace :
...r/laminas/laminas-mail/src/Storage/Part.php:376 Laminas\Mail\Storage\Part->getHeader()
inc/mailcollector.class.php:1035 Laminas\Mail\Storage\Part->__get()
inc/mailcollector.class.php:734 MailCollector->buildTicket()
front/mailcollector.form.php:77 MailCollector->collect()

my config
Capture2

error dans mailgate
Capture

@cedric-anne
Copy link
Member

Hi,

Which version of GLPI are you using ?
It should have been fixed in 9.5.1.

Regards

@steph461
Copy link
Author

steph461 commented Jul 30, 2020

GLPI 9.5.1 (/glpi => /var/www/html/glpi)
i had the bug this morning. And I have the 9.5.1

Capture
version mailcollector

@steph461
Copy link
Author

Capture
If I run the task, I have a blank page

@steph461
Copy link
Author

steph461 commented Jul 30, 2020

cron.log
2020-07-30 12:35:27 [7@srv-glpi]
Interne #1 : Démarrage mailgate

mailgate.log
2020-07-30 12:35:27 [7@srv-glpi]
Message invalide : Invalid header value detected

this bug I have for a while but I have not had a problem.

php-errors.log
[2020-07-30 12:35:27] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name subject or subject not found in /var/www/html/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307
Backtrace :
...r/laminas/laminas-mail/src/Storage/Part.php:376 Laminas\Mail\Storage\Part->getHeader()
inc/mailcollector.class.php:1035 Laminas\Mail\Storage\Part->__get()
inc/mailcollector.class.php:734 MailCollector->buildTicket()
inc/mailcollector.class.php:1740 MailCollector->collect()
inc/crontask.class.php:847 MailCollector::cronMailgate()
front/crontask.form.php:49 CronTask::launch()

email for the bug

Les actions automatiques suivantes sont en erreur.

Elles nécessitent une intervention mailgate : Récupération des messages (collecteurs)

Généré automatiquement par GLPI

@steph461
Copy link
Author

steph461 commented Jul 30, 2020

post #7619 unncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name reply-to or reply- to not found in /var/www/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307

difference my log :
Uncaught Exception Laminas\Mail\Storage\Exception\InvalidArgumentException: Header with Name subject or subject not found in /var/www/html/glpi/vendor/laminas/laminas-mail/src/Storage/Part.php at line 307

@cedric-anne
Copy link
Member

#7748 should fix this.

Regards

@steph461
Copy link
Author

its ok
bug résolve
thank you cedric-anne

@adamcios
Copy link

adamcios commented Feb 9, 2022

i still have this problem - version GLPI 9.5.7
[2022-02-10 00:09:11] glpiphplog.CRITICAL: *** Uncaught Exception Laminas\Mail\Header\Exception\InvalidArgumentException: Invalid header value detected in C:\xampp\htdocs\glpi\vendor\laminas\laminas-mail\src\Header\GenericHeader.php at line 64
Backtrace :
vendor\laminas\laminas-mail\src\Headers.php:544 Laminas\Mail\Header\GenericHeader::splitHeaderLine()
vendor\laminas\laminas-mail\src\Headers.php:284 Laminas\Mail\Headers->loadHeader()
vendor\laminas\laminas-mail\src\Headers.php:105 Laminas\Mail\Headers->addHeaderLine()
vendor\laminas\laminas-mime\src\Decode.php:150 Laminas\Mail\Headers::fromString()
...r\laminas\laminas-mail\src\Storage\Part.php:111 Laminas\Mime\Decode::splitMessage()
...laminas\laminas-mail\src\Storage\Message.php:53 Laminas\Mail\Storage\Part->__construct()
...r\laminas\laminas-mail\src\Storage\Imap.php:127 Laminas\Mail\Storage\Message->__construct()
...aminas-mail\src\Storage\AbstractStorage.php:268 Laminas\Mail\Storage\Imap->getMessage()
inc\mailcollector.class.php:721 Laminas\Mail\Storage\AbstractStorage->current()
inc\mailcollector.class.php:1762 MailCollector->collect()
inc\crontask.class.php:943 MailCollector::cronMailgate()
front\cron.php:83 CronTask::launch()

@cedric-anne
Copy link
Member

@adamcios

Please open a new issue, and attach the email that causes this issue. It may be due to another problem and, as the one tracked here seems to be solved, we will not try to investigate if we only have a contextless error trace.

Regards

@ftoledo
Copy link

ftoledo commented Jun 4, 2022

@adamcios have you created a new issue? I also have the same in 9.5.7 with gmail accounts
@cedric-anne where can I put some log line to identify which message it is? to print the msgid or subject. Since I have several messages in the inbox and I can't identify which one triggers the problem. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants