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

ScriptLab takes a very long time to load in Outlook Desktop, loads quickly in Outlook Web #4355

Closed SethDG closed 7 months ago

SethDG commented 7 months ago

Provide required information needed to triage your issue

ScriptLab takes a very long time to load in Outlook Desktop after selecting Code, loads quickly in Outlook Web

According to my stopwatch, it eventually loads after more than 40 seconds

I just get the busy indicator spinner and message of "Script Lab for Outlook is working on your Code request"

image

Your Environment

Expected behavior

I expect the Script Lab addin after selecting Code to load in less than 5 seconds in Outlook Desktop like it does on Outlook Web

Current behavior

The Script Lab addin takes over 40 seconds to load on Outlook Desktop, much slower than Outlook Web

Steps to reproduce

  1. Open Outlook Desktop
  2. Create a new email
  3. Click Script Lab addin and select Code

Link to live example(s)




Provide additional details




Context

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.

SethDG commented 7 months ago

I don't know how to help debug this due to https://github.com/OfficeDev/office-js/issues/4342

Oleg-O commented 7 months ago

Curious, do you have any launchevents add-ins sideloaded or deployed by admin for this user? If you do and it's failing, that could be one reason - you can confirm by uninstalling that and retrying. Let me know if that was the issue or not.

SethDG commented 7 months ago

@Oleg-O i removed a different addin and it did resolve the issue with ScriptLab. Would you be able to provide assistance on debugging the problems with the other addin? What would be running at that point in time? What should I look for in launchevents? Is there an order of operations when launchevents runs?

SethDG commented 7 months ago

@Oleg-O the addin i uninstalled isn't failing as far as i can tell, just potentially running slow due to https://github.com/OfficeDev/office-js/issues/4343 . how would you be able to tell if it were failing?

Oleg-O commented 7 months ago

For launchevents, we do have some documentation I referred to in the linked post (#4342). Here it is again: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/debug-autolaunch?tabs=windows. Also, this could be useful: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/troubleshoot-event-based-and-spam-reporting-add-ins. In particular, one common case where launchevents add-ins fail is when the JS code is using some features that are not part of ECMAScript 2016, but there could be other reasons too. Hope this helps.