Unexpected error: The Ribbon/COM Add-in helper required by add-in

Feb 1, 2015 at 9:53 AM
After releasing a new version of my Add-in I'm getting a few reports from a few users saying that the ExcelDna "Log Display" is shown with the following message after they installed the new version of my addin.

"The Ribbon/COM add-in helper required by add-In SeoTools could not be registered."
"This is an unexpected error."
"Error message: Exception has been thrown by the target of an invocation".

I'm using the latest version of ExcelDna.

Any suggestions?
Feb 1, 2015 at 2:35 PM
Look for your Add In in the "Disabled Add In" Dialog.
May 7, 2015 at 2:15 PM
A solution that has reported to work is:

A suggested solution (https://groups.google.com/forum/#!topic/exceldna/UptfTl-x1Uc) is to delete these folder with Excel settings in the registry:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel
HKEY_LOCAL_MACHINE\Software\Microsoft\Office\14.0\Excel

(Replace 14.0 with that version you have)

The restart you computer.

But this is a bit complicated. How does this problem occur? And can't it be solved on some other way?

/Niels
Coordinator
May 7, 2015 at 3:33 PM
Hi Niels,

As far as I know, this can happen if there are unhandled exceptions leaked from ribbon callbacks.

I'd be very interested in any other reproducible case.

-Govert
May 7, 2015 at 4:09 PM
Ok, so any error from the Ribbon code?

/Niels
Coordinator
May 7, 2015 at 4:23 PM
I don't think 'any error' - it's more like unhandled exceptions thrown from the ribbon handlers would in some situations could cause Excel to mark the ribbon add-in as disabled. One dangerous thing is to throw an exception in the GetCustomUI(). But I don't think that's the only issue. Excel executed some of the ribbon code in a guard, where it write to the registry that it is about to talk to "SeoTools-Ribbon Helper", and then calls your callback. If this crashes Excel, the next startup will check for that key in the registry, and mark your add-in as suspect or Disable it (though Excel actually asks first). Your ribbon helper then gets hard-disabled (put into the Disabled Items list) and won't load anymore.

This is the only documentation I know of regarding this issue: https://msdn.microsoft.com/en-us/library/ms268871.aspx

The problem is that a few users report that their helper add-in gets disabled in a way that does not put it into the Disabled Items list. I have not seen such a system, or been able to reproduce it. But those users report success with the registry clean-up.

In cases where the ribbon has try-catch guards in all ribbon callbacks, I don't know of any problems. (Of course there are still pathological ways to crash the process, e.g. by causing a stack overflow which brings down the process without exception handling.)

-Govert
Coordinator
May 7, 2015 at 4:27 PM
I would like to know whether the following is possible:
  1. An add-in does not appear in the Disabled Items list, but
  2. It is listed under HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Resiliency\DisabledItems
Please let me know if you encounter a case like this, or have a way to reproduce this situation.

-Govert
May 7, 2015 at 5:47 PM
Ok thanks. Will try to find a user that can help with this.

/Niels
May 19, 2015 at 7:47 AM
Hi Govert,

Sorry for my late reply.

I'm still waiting for a case to appear again so I can ask your questions to the user.

Will get back to you when I do.

/Niels

2015-05-07 18:27 GMT+02:00 govert <[email removed]>:

From: govert

I would like to know whether the following is possible:
  1. An add-in does not appear in the Disabled Items list, but
  2. It is listed under HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Resiliency\DisabledItems
Please let me know if you encounter a case like this, or have a way to reproduce this situation.

-Govert

Read the full discussion online.

To add a post to this discussion, reply to this email ([email removed])

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com