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
690 stars 95 forks source link

Unpredictable behavior of Office.context.mailbox.item.getAttachmentsAsync #5114

Open hmuris opened 1 week ago

hmuris commented 1 week ago

When the method Office.context.mailbox.item.getAttachmentsAsync is executed, attachments are sometimes returned sometimes not. It differs for inline attachments.

Expected behavior

Always return attachments correctly.

Current behavior

If the new email is written, and inline attachments are added, mentioned method is not returning attachments. When normal attachments are added and removed, then it does.

Steps to reproduce

  1. Compose new email
  2. Turn on taskpane addin
  3. Add inline attachment (WinKey + S, part of the screen and paste it in the email)
  4. Click the Run in tha addin
  5. Error: no attahments are returned.

If a normal attachment (not inline) is added (sometimes and removed, and sometimes another added again), the method returns all attachments inline and regular ones.

Here is the demo project, just npm install and then npm start to run the project. TaskpaneDemo.zip

Demo project is generated with Yeoman generator for Office Add-ins and then slightly modified. Modified are manifest.xml and taskpane.js.

hmuris commented 6 days ago

Any news here? We need this to work asap as there are many customers using our Add-in.

MarcMei80 commented 5 days ago

@hmuris There is already an issue classified as a product bug. https://github.com/OfficeDev/office-js/issues/5068 Feel free to add comments there to hopefully get a higher priority. Unfortunately, many of our customers have been affected.

sirrganggi commented 2 days ago

There are multiple reports like this one (e.g. #5068, #5031), so any news or feedback regarding a prompt solution would be important and helpful. Many people are affected of this issue.