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

Long Delay Before Add-In Executes. #5064

Open mailchecktool-admin opened 3 days ago

mailchecktool-admin commented 3 days ago

Provide required information needed to triage your issue

Your Environment

Expected Behavior

After clicking the send button in Outlook, the add-in should execute immediately, typically within 1-2 seconds.

Current Behavior

There is a significant delay before the add-in executes after clicking the send button in Outlook. When the issue occurs, it takes about 15-20 seconds for the add-in to execute and display the dialog.

Steps to Reproduce

  1. Download the sample add-in and save it in any directory.
  2. Open Command Prompt and navigate to the directory.
  3. Run npm install.
  4. Run npm run dev-server.
  5. Upload the manifest.xml to Outlook on the web and install the add-in (the XML file is stored in the sample.zip).
  6. Create a new email, specify a recipient, and click the "Send" button.
  7. The issue occurs during step 6 (sometimes it happens, sometimes it doesn't).
  8. The network log during the issue shows delays with requests for outlook-web-16.01.js and office_strings.js. screenshot1

Link to live example(s)

I am storing the sample add-in.

sample add-in program https://github.com/mailchecktool-admin/Office-addin-sample/tree/main

mailchecktool-admin commented 2 days ago

@exextoc After conducting repeated investigations to reproduce the issue, we have made some progress and would like to update you. We confirmed that following the steps below results in a high probability of this issue occurring. (Please ensure the sample add-in is installed beforehand.)

Steps to Reproduce:

  1. Launch a web browser in guest mode.
  2. Access Outlook on the web.
  3. Click on the "Compose Email" button.
  4. Open the browser’s Developer Tools.
  5. In the "Network" tab, enable "Disable Cache."
  6. Specify a recipient and compose a test email.
  7. Send the email. Note: While the issue doesn’t occur 100% of the time, it does have a high likelihood of manifesting.