Sending mail notification can crash the backend process and prevent the notification to be sent.
Issue is likely to have been introduced by the changes done in
story #12554.
Trace with a tracker notification and the backend notification mechanism:
info Start service
info Wait for messages
info Got message: {"event_name":"tuleap.tracker.artifact","payload":{"artifact_id":503516,"changeset_id":1016804}}
PHP Notice: Undefined index: REQUEST_URI in /usr/share/tuleap/src/common/include/URLVerification.class.php on line 450
PHP Fatal error: Uncaught TypeError: Argument 3 passed to Tuleap\Project\RestrictedUserCanAccessUrlOrProjectVerifier::__construct() must be of the type string, null given, called in /usr/share/tuleap/src/common/include/URLVerification.class.php on line 450 and defined in /usr/share/tuleap/src/common/Project/RestrictedUserCanAccessUrlOrProjectVerifier.php:47
Stack trace:
#0 /usr/share/tuleap/src/common/include/URLVerification.class.php(450): Tuleap\Project\RestrictedUserCanAccessUrlOrProjectVerifier->__construct(Object(EventManager), Object(URL), NULL)
#1 /usr/share/tuleap/src/common/mail/MailFilter.php(83): URLVerification->userCanAccessProject(Object(PFUser), Object(Project))
#2 /usr/share/tuleap/src/common/mail/MailBuilder.php(56): Tuleap\Mail\MailFilter->filter(Object(Project), Array)
#3 /usr/share/tuleap/src/common/mail/MailNotificationBuilder.php(64): MailBuilder->buildAndSendEmail(Object(Project), Object(Notification), Object(MailEnhancer))
#4 /usr/share/tuleap/plugins/tracker/include/Tracker/Artifact/Changeset/PostCrea in /usr/share/tuleap/src/common/Project/RestrictedUserCanAccessUrlOrProjectVerifier.php on line 47