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

Ribbon initialization sporadically fails (and is not responsive) on workbooks created by Excel.createWorkbook #4899

Open wh1t3cAt1k opened 2 months ago

wh1t3cAt1k commented 2 months ago

When creating a workbook through Excel.createWorkbook, the ribbon can sometimes be found unresponsive.

We've found that the Office.ribbon.requestCreateControls call when initializing an add-in in the newly created workbook will fail with:

RichApi.Error: ControlIdNotFound
    at new n (excel-win32-16.01.js:25:265603)
    at r.processRequestExecutorResponseMessage (excel-win32-16.01.js:25:330050)
    at excel-win32-16.01.js:25:328113

which could or could not be related to this unresponsiveness. In our add-in, the workbooks created using Excel.createWorkbook are typically base64 copies of the current workbook.

Your Environment

Steps to reproduce

  1. Install the Velixo NX add-in from the add-in store
  2. Open the Velixo NX menu by selecting the ribbon tab
  3. Press Snapshot, located in the Tools section of the ribbon menu
  4. In the taskpane, press the Snapshot button

Important: do not interact with the workbook before checking if the ribbon is responsive as some actions can restore responsiveness, listed below

A copy of the current workbook should be created. The ribbon should be unresponsive.

If not, repeat the Snapshot process a few times, one of those tries should result in an unresponsive ribbon.

We've found a few ways to restore responsiveness to the ribbon without add-in reinitialization:

Open the context menu by right clicking any cell Switch focus to another window and then switch back

Expected behavior

The ribbon should be responsive at all times.

Current behavior

The ribbon is not responsive.

Context

This is a bad UX issue, which is not easily recoverable, and results in support escalations.

Related items

https://github.com/OfficeDev/office-js/issues/4807

Velixo internal tracking item

microsoft-github-policy-service[bot] commented 2 months ago

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

shanshanzheng-dev commented 2 months ago

Hi @wh1t3cAt1k Thanks for reporting this issue. In order to help us understand your issue, could you share us the repro video? We'll take a look and report back if we have a suggestion for you. Thanks.

wh1t3cAt1k commented 2 months ago

@shanshanzheng-dev see the below video. It doesn't demonstrate clicks but the user is clicking on the Home tab buttons in the second part of the video; none of the buttons are responsive:

https://www.loom.com/share/8ff9d8cc0faf4e2fad022db7b6d9f27c?sid=1238c675-731a-4f81-b4a6-205210e11c46

shanshanzheng-dev commented 2 months ago

Hi @wh1t3cAt1k Thanks for this video, I can repro. We'll be actively investigating and report back if we have a suggestion for you. Thanks.

RuizhiSunMS commented 3 weeks ago

Create #9349704 into the backlog to track this case, the team will investigate and we will reply to you as soon as there is any progress. Thank you for your patience.