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
670 stars 96 forks source link

Stability issues on Excel Online (but not Excel for Mac): internal error #2899

Closed wh1t3cAt1k closed 1 year ago

wh1t3cAt1k commented 1 year ago

Dear Office.js team, could I please ask you to review one session from telemetry to help us get more insight into what's going on?

The session ID is 8c8e43eb-0337-41e4-98ce-d792bbde60bd.

On one report that returned several thousand errors from cells, one of our company, @gmichaud (but not me for whatever reason), is able to consistently receive a "crash message box" with "sorry, something went wrong".

image

After some point of time, all Excel.run object model interactions simply stop working.

image

Your Environment

The "crash" is consistent in 100% of the cases, and it disappears if we fix all those cells that return an Excel.Error instead of a result. (there may be be several thousand of those).

At the same time it never happens on Excel for Mac desktop.

ghost commented 1 year ago

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

SiruiSun-MSFT commented 1 year ago

Hi Pavel Kabir, As of now, we are still locating the exact reason. Can you provide a few more session ids, and provide us with the time (PST time zone) of this session? This will be of great help to our investigation. Thanks~

wh1t3cAt1k commented 1 year ago

@SiruiSun-MSFT we identified the root cause in our code that led to the crash box, so that you can better reproduce it and improve messaging / behaviour around the error.

This call:

Office.addin.setStartupBehavior(Office.StartupBehavior.load);

Was not awaited in our code (we have since enabled the linter rule to catch floating promises).

And sometimes (race condition) subsequent interactions with Excel failed with an internal error.

Things that were happening while the call was not awaited:

Each of the above two operation types could result in an internal error if setStartupBehavior was not awaited.

Expected result:

SiruiSun-MSFT commented 1 year ago

@wh1t3cAt1k Sorry for the slow response. And thanks for your investigation and feedback. That's really useful for us. We will discuss this issue with our PM to do more optimization. Thanks!

SiruiSun-MSFT commented 1 year ago

Hi @wh1t3cAt1k , we open a new task to track this ask(https://office.visualstudio.com/OC/_workitems/edit/7214821). And since we track Office Add-in feature requests on our Microsoft 365 Developer Platform Ideas Forum. Please also add your request there. Feature requests on are considered when we go through our planning process. Thanks, Microsoft 365 Developer Platform team