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
663 stars 94 forks source link

Trying to fetch attachment content using office js(Office.context.mailbox.item.getAttachmentContentAsync) #4655

Closed riddhi-p-28 closed 2 weeks ago

riddhi-p-28 commented 1 month ago

We are developing an outlook web addin using office js Smart alert template. Trying to fetch attachment content using office js(Office.context.mailbox.item.getAttachmentContentAsync), we are encountering an internal office-js error (GetFileAttachmentId - 404), we are not getting the content. image

Your Environment

Expected behavior

We should be able to fetch the attachment content in base64 format.

Current behavior

Trying to fetch attachment content using office js(Office.context.mailbox.item.getAttachmentContentAsync), we are encountering an internal office-js error (GetFileAttachmentId - 404), we are not getting the content.

Steps to reproduce

  1. Compose a new email
  2. Add recipients, subject and body
  3. Click on the send button.
  4. Once the task pane is shown, attach 7 attachments.
rkpathak commented 1 month ago

@riddhi-p-28 What do you mean by "ADd non allowed recipient" Please add clear and minimal steps required to reproduce the issue.

riddhi-p-28 commented 1 month ago

We have updated the steps to reproduce. Non- allowed recipient is just a term in our custom business logic, it is essentially just a recipient. The main issue is when we are trying to get the base64 content from office-js we are getting the 404 error as shown in the above attached image.

kumarshrey-msft commented 1 month ago

@riddhi-p-28 We are unable to reproduce this scenario, is it possible for you to share sample addin code/script lab code link that we can use to reproduce the issue?

JuaneloJuanelo commented 1 month ago

@riddhi-p-28 we need you to add some more detail on this issue. can you please share:

  1. What type of attachment is this. [is this a PDF, Word Document, image?] please be very specific.
  2. whats the size of the attachemnt.
  3. your flow: what do you mean by: "click on send" and then "when the taskpane opens" how is this taskpane open? can you add more detail about what exactly you mean by this?
  4. Also pelase clarify the platform, is this only happening in the Web? new outlook? windows?

the more detail you add the better.

thanks!

riddhi-p-28 commented 1 month ago

PFB the required details:

  1. What type of attachment is this. [is this a PDF, Word Document, image?] please be very specific. This issue is replicable with any format of attachment. However, for the above screenshot we used 7 PDF files.

  2. Whats the size of the attachment. The size of each pdf file attached was less than 1MB.

  3. your flow: what do you mean by: "click on send" and then "when the taskpane opens" how is this taskpane open? can you add more detail about what exactly you mean by this? When user clicks on outlook send mail button, we are triggering the side pane. When the sidepane is triggered we are calling the getAttachmentContentAsync API, where this issue is happening.

  4. Also pelase clarify the platform, is this only happening in the Web? new outlook? windows? We could replicate the issue on web and well as outlook desktop app. For the above screenshot, we have used outlook Web (Chrome)

    Pls note: The above issue is happening intermittently.

neprasad-microsoft commented 3 weeks ago

@riddhi-p-28 is it possible for you to share the sample add-in to help us debug faster. Also, please collect the logs and share it with us. https://github.com/OfficeDev/office-js/wiki/Collecting-log-files-for-Outlook-Add%E2%80%90ins-issues . You can share it with us in a private Github repo and give access to exextoc.

microsoft-github-policy-service[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

microsoft-github-policy-service[bot] commented 2 weeks ago

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.