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

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

Open wh1t3cAt1k opened 4 days ago

wh1t3cAt1k commented 4 days 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 4 days ago

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

shanshanzheng-dev commented 3 days 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 3 days 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 days 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.