OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
689 stars 95 forks source link

Outlook AddIn 'OnMessageAttachmentsChanged' event is fired only for the first file. #4944

Open guzman-rc opened 1 month ago

guzman-rc commented 1 month ago

Provide required information needed to triage your issue

When an email is created and several files are attached at the same time, the OnMessageAttachmentsChanged event is only triggered for the first file, subsequently, if you attach several files again, the OnMessageAttachmentsChanged events are triggered correctly, it only fails the first time when several files are attached.

Your Environment

Expected behavior

Event OnMessageAttachmentsChanged should be triggered for all attachments.

Current behavior

When an email is created and several files are attached at the same time, the OnMessageAttachmentsChanged event is only triggered for the first file.

Steps to reproduce

  1. Install the test Addin from the url: https://www.adarsus.com/addin/outlook_event/manifest_2.xml
  2. Access your email account from Chrome and create a new email.
  3. Open Chrome's log console and finally attach 2 files.
  4. As you can see in the screenshot, the OnMessageAttachmentsChanged event is triggered for the first of the files.

Useful logs

OutlookLog

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

jacges commented 1 month ago

I'd like to add that I am seeing this issue as well.

sivachandran-msft commented 1 month ago

Hi @guzman-rc , thanks for sharing the issue in detail. I tried to repro the behavior using shared manifest but because of security issues I cannot see the mentioned behavior. Could you please share the test add-in code in a repo, so that we can see how you are trying to access the attachment via events.

guzman-rc commented 1 month ago

You can download the Addin sources from the url: https://www.adarsus.com/addin/OutlookAddinOnAttach/OutlookAddin_OnAttach_Test.zip

sivachandran-msft commented 1 month ago

Hi @guzman-rc, thanks for sharing the addin source. We can repro the mentioned behavior. We have created a backlog item (#4969775) for this identified behavior. Thanks for sharing the required details.