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

getComposeTypeAsync returns a 5001 error #4028

Open barclayadam opened 7 months ago

barclayadam commented 7 months ago

Provide required information needed to triage your issue

We have a customer using our add-in that sees an error when we are calling the getComposeTypeAsync method: {"name": "Internal Error","message":"An internal error has occurred","code":5001}.

This customer is using "NAV ERP Solution" and this happens when creating an email from that application instead of directly within Outlook itself.

Your Environment

Expected behavior

Our add-in can use the getComposeTypeAsync method

Current behavior

getComposeTypeAsync fails, so we must try to determine the type of email ourselves, which I do not think we can do in any reliable manner (we use conversationId as a proxy to meaning this is a reply, but it's incorrect in at least this use case)

Steps to reproduce

  1. Use the Signature 365 add-in (or an add-in using the above method)
  2. Using the NAV ERP Solution 3rd party application create an email
  3. Notice the error from Outlook add-in

Useful logs

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.

ghelyar commented 6 months ago

We are also seeing this but with slightly different repro steps.

You can reproduce this just by sharing a document from another office program e.g.

  1. Create a new word document
  2. Click share
  3. Attach a copy instead -> Word document

image

This will open Outlook desktop, and then when an add-in tries to call getComposeTypeAsync, it will fail.

If called from the task pane, the devtools show {"name": "Internal Error","message":"An internal error has occurred","code":5001}.

It called from event-based activation, the error is just "The operation failed."

See also https://github.com/OfficeDev/office-js/issues/2084

Oleg-O commented 6 months ago

Thanks for reporting this issue regarding getComposeTypeAsync API. I was able to reproduce it. It has been put on our backlog. We unfortunately have no timelines to share at this point

Internal tracking id: Office:8832788.