glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.29k stars 1.29k forks source link

Mentioning someone in a followup/answer sometimes does not add mentioned person as watcher/observer #16767

Open AldarisPale opened 7 months ago

AldarisPale commented 7 months ago

Code of Conduct

Is there an existing issue for this?

Version

10.0.12

Bug description

Sometimes - let's say 1 in 50 events, when mentioning someone in an answer/followup, the person is not added as a watcher.

Relevant log output

Cannot find relevant log entries.

Page URL

No response

Steps To reproduce

Cannot reproduce on demand, because I have not figured out what conditions trigger this bug.

Your GLPI setup information

N/A

Anything else?

This is a very vague bug, I agree, but since I have not been able to pinpoint what and when causes it, bug report hopefully gives at least hints where to look and hopefully informs other users that such bug exist and someone might have an idea what the cause might be.

This bug does happen always, but it does happen often enough - let's say 1 in 50 events. Symptom is always the same - mention someone and they should be added as watcher/observer, but they are not added as watcher. I usually find it out when sending a ticket link to someone, and they are unable to access the ticket, as they are not observer/watchers, but they have been mentioned in the ticket.

The current workaround is manual - mention someone in the ticket. Close ticket window an check if the mentioned person is now visible on the watcher/observer field or not. But this is tedious, because it means that it cannot be relied upon that when someone is being mentioned, they are actually added as watcher/observer.

I know and understand that lack of repeatable triggers does not help much, but the bug is annoying enough that it deserves a ticket.

I suspect it's some kind of race-condition which causes this.

AldarisPale commented 7 months ago

Perhaps #13427 is somehow related?

cedric-anne commented 7 months ago

Hi,

Does the ticket contains a pasted image? If there is, is this image correctly attached to the ticket as a document, or is its src attribute contains the base64 source of the image?

AldarisPale commented 7 months ago

Thanks @cedric-anne for prompt reply. In the latest ticket where it occurred - original ticket does not have image embedded as base64 (atleast I cannot find one when checking HTML in Firefox). It does however have an embedded image, as the ticket was created via e-mail and e-mail had signature which contains an image. E-mail is in html format and signature picture is classical <img src="https://.....> (might this be a injection vulnerability on it's own?).

However - I also checked notification logs. When a person was mentioned in the followup, e-mail notification was sent to the mentioned person according to the notification queue.

cedric-anne commented 7 months ago

If the mention was made in a followup, does this followup contains an image? Could you check if it was stored as base64?

Also, do you have anything in GLPI logs that can be related to this issue?

AldarisPale commented 7 months ago

Followup did not have an image in it.

When checking logs, I do notice things which might be related:

  1. in mail-error: when followup was added, there was an attempt to send e-mail notification to ticket creator via e-mail, but this failed, as SMTP connection failed at that time. Later, e-mail was delivered successfully. Underlying cause is rate limiter at SMTP.
  2. in access-errors.log: we can confirm that the person who was mentioned, is unable to access the ticket.
  3. php-errors.log: There is a cryptic error message around the time when the person was mentioned: glpiphplog.CRITICAL: *** PHP Error (1): ob_get_clean(): Cannot use output buffering in output buffering display handlers in /var/www/vendor/twig/twig/src/Template.php at line 388
cedric-anne commented 7 months ago

What is the full trace of the critical error?

AldarisPale commented 7 months ago

@cedric-anne - there's no full trace, just that line.

cedric-anne commented 7 months ago

If there is only this line, then it is impossible to investigate on this critical error. The message is too generic and does not give any hint about where the issue could be located.

AldarisPale commented 7 months ago

@cedric-anne - are there any other hints in addition to base64 image embedding for which to keep an eye out? So that the next time it happens, we'd know what to look for?

cedric-anne commented 7 months ago

No, I have no other clue.

AldarisPale commented 7 months ago

@cedric-anne I had a random thought - although I am not familiar with inner logic of GLPI, but perhaps the misbehaviour is coming from mail delivery problems? For example some e-mail get through while others don't for whatever reason.

Perhaps the possible remedy here can be to change the logic a bit so that the process would be:

  1. Add people to ticket (whathers/followers)
  2. Once people have been added to the ticket, only then start sending/queueing e-mail notifications/other notifications if there are any

This way the impact would a bit more minimal, as people would be atleast be able to see and add followups to the ticket. Currently they get the notification, but are unable to see the ticket nor followup on it as they have not actually been added to the ticket.

github-actions[bot] commented 5 months ago

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

AldarisPale commented 5 months ago

Problem is still there

github-actions[bot] commented 3 months ago

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

AldarisPale commented 3 months ago

Posting here to prevent auto-closure of ticket, as problem still persists.

cconard96 commented 3 months ago

A mentioned user may not be added as a watcher if they are already on the ticket as a requester or assigned technician.

AldarisPale commented 2 months ago

Thanks for followup, @cconard96 . So far the cases I have observed and remember, the mentioned person is not the requester nor assigned technician.

github-actions[bot] commented 2 weeks ago

There has been no activity on this issue for some time and therefore it is considered stale and will be closed automatically in 10 days.

If this issue is related to a bug, please try to reproduce on latest release. If the problem persist, feel free to add a comment to revive this issue. If it is related to a new feature, please open a topic to discuss with community about this enhancement on suggestion website.

You may also consider taking a subscription to get professionnal support or contact GLPI editor team directly.

AldarisPale commented 2 weeks ago

Bump to prevent closure.