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
685 stars 95 forks source link

The Add-in could not be started. Close this dialog to ignore the problem or click "Restart" to try again #2219

Closed gummybuns closed 6 months ago

gummybuns commented 3 years ago

Message from office-js bot: We’re closing this issue because it has been inactive for a long time. We’re doing this to keep the issues list manageable and useful for everyone. If this issue is still relevant for you, please create a new issue. Thank you for your understanding and continued feedback.

Provide required information needed to triage your issue

Some of our customers are running in to a specific error message:

The Add-in could not be started. Close this dialog to ignore the problem or click "Restart" to try again

This error seems to happen before the add-in even begins to load, as if there is something preventing the user from running the add-in at all. We have no way to capture any error message from the console, or any sort of logs to indicate what the exact problem is. I cant find any documentation for what this error is in the OfficeJS documentation or a solution to fix it online.

The IT department of the customer seems to have found a potential fix for this problem, although i am not sure where they found this solution, by changing some register values:

Path:  HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

Create new DWORD (32):             TabProcGrowth

Set to:  0

They are not happy with this sort of solution because we cannot explain what the problem is, and it is not going to scale well for them to have to do this for all of the customer's users.

I am hoping to understand what this problem actually is so I can better explain the problem and possibly come up with a solution if there is anything we can do from the add-in side.

Your Environment

Expected behavior

The add-in should load and run upon opening the add-in from the ribbon menu

Current behavior

The add-in does not load. It shows the error message described in the title.

Steps to reproduce

The steps seem to happen for specific users on the specific versions above

  1. Open the add-in from Inbox or Compose (havent tried calendar)
  2. See the error message

Context

Our add-in fails to load for certain users. It is a significant problem because it impacts the trust our customer's have in our product, and we have no answer to the cause or a viable solution.

Useful logs

image (6) image (7) image

exextoc commented 3 years ago

Thanks for reporting this issue. Are you facing this issue for all add-ins or specific add-ins? Could you try installing other addins to confirm if this is consistent across all addins? Also, could you try upgrading your outlook to a more recent version to see if the problem persists. A newer version for Semi-Annual Channel should be present for you to upgrade to

s-pilkhwal commented 3 years ago

I have a few users facing similar issue, I have checked for IE protected mode, tried repairing "Microsoft Edgewebview 2 runtime" installation but still no luck. I tired installing "Message Header Analyzer" and its too facing the same error.

The user is running on: OS - Win10 20H2 (19042.1165) 64 bit Outlook version - M365 MSO 16.0.13801.21002 64 bit Edge - 95.0.1020.44 IE - 19042.1165

gummybuns commented 3 years ago

To follow up on this strange issue, as I mentioned before the customer's IT Department fixed this problem by updating the registry

Path:  HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

Which has Internet Explorer in the path. We also were able to this screen shot of the add-in working on the user's computer. The picture below is of a Dialog window that was opened via the displayDialogAsync method. Webex 2021-11-08 at 10 35 52 AM

According to your documentation, this user should not be using Internet Explorer 11 as the internal browser. This user should be using Edge with original WebView because our add-in's manifest does not have the <Runtime> property defined.

So to me, part of this problem that the user's add-in is running in the wrong environment

MattBeauceron commented 2 years ago

@exextoc Is there any update on a fix for this? We a few users who have been experiencing this issue for the past couple weeks.

SylvaD-MS commented 2 years ago

@gummybuns, could you clarify the work around provided above? The IE registry key (https://docs.microsoft.com/en-us/troubleshoot/browsers/32-bit-browser-applications-not-working-as-expected) is specific to legacy technology when loading COM object within IE process and not directly related to Office Add-in per se. Can you check the IE browser bitness in both cases using Windows [TaskManager] under [Details] tab add [Command Line] and [Architecture] columns (right click on the Column names and click on [select column])? In your specific case Outlook.exe is a 32 bit process running in Wow64. Is that correct? According to the documentation above setting the registry key will create a 64 bit IE child processes. Can you also clarify that you can repro the same issue when using any Office Add-ins in Excel with or without the reg key? Could you submit Outlook logs (Under [Help] menu, [Get Diagnostic]) when the registry key is not set and you can repro the issue and provide us your latest session id found with the license id when you repro the issue? Finally, latest Office build will install WebView2 instead of using legacy IE. Can you verify whether you have WebView2 (msedgewebview2.exe) installed on your configuration?

gummybuns commented 2 years ago

Thanks for the reply,

I have only heard of one user encountering this problem, and will try to reach out to them and see if I can get the above information

atsopuronen commented 2 years ago

@gummybuns based on the affected user's Office version and Windows version, I agree with you that Office add-ins on that computer should be running in Edge WebView (not IE or WebView2). https://docs.microsoft.com/en-us/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins

But is it possible WebView runtime is not available on the computer, so add-in loading goes to a limbo since it can't find the only browser it's supposed to run with?

You may want to check Windows Event Viewer for errors at the time ADD-IN ERROR occurs. There might be a clue if WebViewHost is crashing etc. Then you should look this KB article and the related links at the end: https://support.hoxhunt.com/hc/en-us/articles/360019436319-ADD-IN-ERROR-due-to-corrupted-Legacy-Edge-

There are numerous reasons why ADD-IN ERROR can occur, so it might take time to get to the root cause.

And about the TabProcGrowth trick the IT department found - check this Release Notes page and search for "TabProcGrowth": https://docs.microsoft.com/en-us/officeupdates/semi-annual-enterprise-channel Also check this thread: https://github.com/OfficeDev/office-js/issues/982

skaramchandani11 commented 1 year ago

@atsopuronen our customers are still running into this - do you have an update for us?