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

On-Send Event triggers twice on new Outlook for Mac #3753

Closed avisheknand closed 7 months ago

avisheknand commented 1 year ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

On-Send event should fire once and email should send.

Current behavior

On-Send event triggers twice when sending out email on the new Outlook for Mac. If revert back to legacy, in legacy it fires once.

Steps to reproduce

  1. Update Outlook for Mac to 16.78 (23100802)
  2. Switch to New Outlook
  3. Ensure to have a app that uses On-Send
  4. Send Email. The On-Send fires twice for the addin
exextoc commented 1 year ago

@avisheknand Is the add-in updating the body of the e-mail during the first run?

Please generate the Incident ID from New Outlook App by following steps and share it with us.

  1. Restart Outlook
  2. Repro the issue mentioned above
  3. Click on Help->Collect Diagnostics
  4. Copy the Incident ID generated
avisheknand commented 1 year ago

@exextoc , the incident id is QJTMEYZV

exextoc commented 1 year ago

@avisheknand from the logs it appears add-in is trying to set the recipient on the email just before event.completed. Can you confirm if this async call completes before invoking event.completed? If not, please update the add-in code to call event.completed after all async API calls are completed by Add-in.

If the issue still occurs, please share the add-in manifest will us, so that we can repro the issue.

John-Dawson commented 1 year ago

For what it's worth, this happened to me; the cause was that the App was deployed twice: via Office Admin and also sideloaded

avisheknand commented 1 year ago

@exextoc , you were right!. We were not waiting for recipients setasync and were calling the event.complete . It was not creating any issues on any other platform apart from New Outlook for Mac... interesting. We have fixed this and it seem to be working now without any issues. Thanks so much!!!!!!

avisheknand commented 11 months ago

@exextoc , i am facing same issue again. The Onsend event triggers twice, i have checked that the event.completed is called after the set recipients callback is successful. It was working fine after we fixed the addin for a while and it started to appear again. The add-in is not installed twice.

Here is the new incident id is EXY59ZBX. Any help will be appreciated.

rajjha-msft commented 7 months ago

Hey @avisheknand

It is not a repro for us.

microsoft-github-policy-service[bot] commented 7 months 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 7 months ago

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