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

OnNewMessageCompose event based handler hangs both handler and taskpane #4363

Closed sami-romdhana closed 6 months ago

sami-romdhana commented 6 months ago

We have detected a problem using the latest version of Outlook on the Beta Channel. Our own add-in doesn't run anymore for any user with the new version. We have also tried sample add-ins made by Microsoft and managed to reproduce the issue. The problem prevents any add-in's taskpane from working during the Compose event.

Your Environment

Expected behavior

Add-in works as expected, in our case inserting a signature based on the user's data.

Current behavior

Add-in does not run on compose, signature stays blank, and if the taskpane is opened we're met with a native Outlook loading spinner (based on past experience this indicates that the runtime beneath is stuck).

Steps to reproduce

  1. Use the Outlook version stated above (2405)
  2. Install this sample add-in (README)
  3. Set-up the add-in to have a signature inserted automatically (open the taskpane)
  4. (optional) Remove all other add-ins
  5. Kill the following processes : Outlook, Microsoft Office component, Microsoft Office Click-to-Run
  6. Launch Outlook
  7. Compose a new email
  8. The add-in either works as expected or already exhibits the issue after closing a few drafts and opening a new message
  9. Close Outlook and launch it again
  10. The add-in's event-based handler will no longer work

The problem was also reproduced using a second sample add-in (README) which did not require Outlook to be restarted.

Link to live example(s)

Follow steps above, using Microsoft's add-in

Additional details

This problem does not happen using "New Outlook" or "Outlook Web". This problem appeared with version 2405, add-ins work using the previous version (2404).

Context

We already have a few users in our company that can't use their signatures but we also have plenty of paying customers that rely on that same solution. If nothing is done the problem will find its way to production on the Current Channel.

Oleg-O commented 6 months ago

Thanks for the heads up, we are looking into this with priority. I was able to reproduce this on 17602. So far it looks like there is something about this particular build. This issue does NOT appear to reproduce on 17531 (Current Channel build that's coming up), nor on builds more recent than Beta build (e.g. 17607,17610). Internal tracking ID: Office: 8912491.

Oleg-O commented 6 months ago

This should be resolved in the next Beta build (any build 17609 or later). We haven't seen this issue prior to 17602 and don't believe it exists in prior builds but if anyone ever sees this issue on any earlier builds, please let us know.