Skip to content

[Excel] RichApi.Error: ControlIdNotFound #4807

Open
@hdwatts

Description

@hdwatts

Provide required information needed to triage your issue

A subset of our clients are reporting that clicking a button in the ribbon of our Excel add-in appears to not do anything. The command itself is simple, if the user is authenticated (which we have confirmed they are in these cases) then enable the other controls in the ribbon.

We are accomplishing this by calling the below requestUpdate function for each of the other controls:

// The groupId, controlId, and enabled are passed in as variables
// as we go through the hard coded controls

await Office?.ribbon?.requestUpdate({
	tabs: [
		{
			id: 'Chrono.xConnectTab',
			groups: [
				{
					id: groupId,
					controls: [
						{
							id: controlId,
							enabled,
						},
					],
				},
			],
		},
	],
})

The group and control ids are hardcoded to match 1:1 with the IDs in our manifest file. This code works for the majority of our users and for us. However, a subset of our users frequently encounter an error with OfficeJS that hits our Sentry logs:

RichApi.Error: ControlIdNotFound
  at new n(/lib/1.1/hosted/excel-win32-16.01.js:25:265603)
  at i.processRequestExecutorResponseMessage(/lib/1.1/hosted/excel-win32-16.01.js:25:330050)
  at ? (/lib/1.1/hosted/excel-win32-16.01.js:25:328113)

Given that the Ribbon is visible and these control ids are hard coded, how can they not be found?

When we were debugging with the client, we found opening the taskpane and triggering a right click -> reload would fix the problem and the button functions as expected.

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC desktop
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: Office 365 Enterprise (Version 2407 Build 17830.20138)
  • Operating System: Windows 11 Enterprise (10.0.22631 Build 22631)

Expected behavior

  • Our command is able to enable or disable controls as expected

Current behavior

  • Some users receive the ControlIdNotFound error and nothing happens.

Context

  • Clients are upset that they cannot login to our add-in

Useful logs

RichApi.Error: ControlIdNotFound
  at new n(/lib/1.1/hosted/excel-win32-16.01.js:25:265603)
  at i.processRequestExecutorResponseMessage(/lib/1.1/hosted/excel-win32-16.01.js:25:330050)
  at ? (/lib/1.1/hosted/excel-win32-16.01.js:25:328113)

Metadata

Metadata

Labels

Area: ExcelIssue related to Excel add-insStatus: in backlogIssue is being tracked in the backlog but timeline for resolution is unknown

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions