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

Long Delay Before Add-In Executes. #5064

Open mailchecktool-admin opened 2 weeks ago

mailchecktool-admin commented 2 weeks 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 weeks 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.
mobisw-msft commented 4 days ago

Hey @mailchecktool-admin ,

Unfortunately I cannot reproduce the issue in the add-in you have provided. #4799 is a similar issue that we have tracked in our backlog, however it seems that issue is with the handler taking a lot of time, and in your scenario, you seem to report that the add-in takes a long time to start execution- unfortunately that scenario is not reproducible for us.

It would be great if you could provide us with additional logs that can help us debug this issue for you. Please follow this guide to collect logs for Outlook: https://github.com/OfficeDev/office-js/wiki/Collecting-log-files-for-Outlook-Add%E2%80%90ins-issues

mobisw-msft commented 2 days ago

Hey @mailchecktool-admin ,

Please do not share HAR files over public posts since they may contain sensitive information. Please add these to a private repository and give access to @exextoc for the same. You may revoke access once your issue is answered.

Your comment has been deleted for privacy reasons.

mailchecktool-admin commented 2 days ago

@exextoc @mobisw-msft I apologize for uploading the files here. I have uploaded the data again to the GitHub remote repository. Please check it at your earliest convenience. https://github.com/mailchecktool-admin/Office-addin-sample/tree/main