Office Professional 2016 Excel Office.js Add-in Browser Issue - excel

The Add-in was working fine under Internet Explorer 11 and I was able to reliably observe and debug its behavior in Visual Studio 2017. Recently after some automatic Windows/Office updates, I noticed that iexplore.exe was not being used as the host browser. This resulted
in not being able to know what process to attach to for debugging.
At this point, out of desperation I executed the following steps to to set JS_DEBUG:
In a windows power shell window executed command
Get-AppxPackage Microsoft.Win32WebViewHost
The command listed the package information including full package name for Win32WebViewHost , which was
Microsoft.Win32WebViewHost_10.0.18362.449_neutral_neutral_cw5n1h2txyewy
I then executed the following
setx JS_DEBUG Microsoft.Win32WebViewHost_10.0.18362.449_neutral_neutral_cw5n1h2txyewy
After some poking I noticed that WWAHost.exe was being used as the browser. Now the add-in is deploying fine but is encountering strange errors.
Is it possible that the above steps resulted in WWAHost.exe as the browser being used to host the add-in. So wondering how to undo the above setting so Internet Explorer 11 is the browser used by Excel to host the add-in.

You cannot control which browser is used to host the add-in. Office decides that. For details how this is determined, see the article: Browsers used by Office Add-ins.

Related

How to debug an Excel Add-In created using Yeoman, running IE in Windows 8

I created an Office Add-In using the Yeoman generator, I chose the React add-in and I was able to make it run properly within VS Code by following this tutorial:
https://learn.microsoft.com/en-us/office/dev/add-ins/tutorials/excel-tutorial
The react boilerplate includes a piece of code which logs an action to the console, but I see no console anywhere. According to the documentation, since my version of Office is 2016 volume licensed, I'm running Internet Explorer, and since my Windows system is 8.1, I can't use the F12 tools nor the Microsoft Office Add-In Debugger, so how do I view these logs like I do when I develop web applications for other browsers like Chrome and Firefox?
I followed the instructions in this guide by microsoft:
https://learn.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-tools-ie
Now, for what I understood, the only option I'm left with is to "Switch to the Internet Explorer 11 webview". So I ran the command npx office-addin-dev-settings webview manifest.xml ie in the terminal and it returned "The web view type is set to Microsoft Internet Explorer". Then when I go ahead and type npm start, the add-in loads correctly but I still can't see any dev tools.
I did try something else by going to the Run and Debug tab in VS Code, choosing the option "Excel Desktop (Edge-Legacy)", running the command npx office-addin-dev-settings webview manifest.xml edge-legacy, modifying the launch.json file so it didn't complain but I saw no difference.
I was able to have bridge chrome and edge devtools using the IEDiagnosticsAdapter, but nothing appears in the console, so I think it's unsupported.

Excel Custom Functions using Add-Ins: "This add-in is no longer available" error

I followed all of the steps here to try and load in a basic excel custom function add in. Everything in the setup stages seems to work, however, when I run 'npm run start:desktop' and Excel opens, there is an error on the side that says:
ADD-IN ERROR This add-in is no longer available: add-ins inserted during development are only available during debugging from Visual Studio. Please open your project in Visual Studio and re-run your application, or deploy your application into a valid catalog and re-insert
I get this error whether I run the project from the command line, VS Code, or Visual Studio. I am on Windows 10 using Excel 2016.
Here is a photo of the Excel page with the error:
Even though question is old one and I think OP must have resolved this problem. However I am currently facing the exact same problem so often. Below are my work arounds which are working for me, it might help others.
Clear Excel Cache in Trust center settings and run application again.
Many times options 1 does not work, then I make change in Add-in menifest to make it invalid and then undo these changes and run application.
If both options fails, then restart Visual Studio.
If all other options fails, restart my system, and then this issue is resolved.
If still problem persists, Uninstall Office workload from Visual studio, install it again and check. If problem persists then repair office.
These 5 workarounds have so far worked for me.
Clearing the Office cache sometimes fixes this: Clear the cache
UPDATE 1/23/2021:
There is now a troubleshooting section for this error: Getting error "This add-in is no longer available".

VSTO Excel add-in auto disables

I have a signed VSTO vb.net add-in that is loaded into Excel 2013. There are roughly 200 users, and 90% are having no issues. For the 10%, every time they boot Excel, the add-in is soft disabled.
I have stood next to them as they boot XL, go into COM Add-ins, check the add-in, and click ok. It loads (and works fine) without error. They then quit XL, boot XL again, and the add-in is again disabled. No "An add-in was causing issues dialog", no errors, just disabled -- if you click on the add-in name in COM Add-ins, there is no indication of any error in the Load Behavior (just "Load at Startup"). They re-enable and it works fine for that session.
The fact that it's a subset of people makes me believe it's a setting on their machine (perhaps in the Trust Center?) but I have yet to find a guilty setting. All users have the same version of Windows, and should be on the same update.
My Google searches have found lots of entries for add-ins that are misbehaving or where the Trust settings are very restrictive -- from what I can see, neither of those categories fit. I found one article that talked about the boot order with Analysis Toolpak, but none of the users assisted had Toolpak enabled.
Being that no error (either from the add-in or Excel) are displayed, I've been at a loss as to why it turns off (and why it's working perfectly on 90% of the machines).
I would appreciate thoughts on either what to look at in my code (even though there are no errors visible) or what settings to attempt.
For the 10%, every time they boot Excel, the add-in is soft disabled.
There can be a lot of reasons why your add-in is disabled automatically.
First of all, I'd suggest checking the list of prerequisites - whether they all were installed correctly (including the .net runtime)
Then I'd recommend enabling any logging mechanisms to look for any unexpected exceptions fired at startup.
There may be a conflict with other add-ins that are being loaded in the Office application. Disable all other Add-Ins except the one in question and retry.
The Antivirus on the system may be blocking the Add-In load. Run latest updates for the Antivirus and retry. If this doesn’t help, disable the Antivirus program completely and retry. Sometimes the Antivirus software also installs additional Office add-in, you may need to disable these additionally by running through the Antivirus control panel (Settings).
Visual Studio Tools for Office can write all errors that occur during startup to a log file or display each error in a message box. By default, these options are turned off for application-level projects. You can turn the options on by adding and setting environment variables. To display each error in a message box, set the VSTO_SUPPRESSDISPLAYALERTS variable to 0 (zero). You can suppress the messages by setting the variable to 1 (one). To write the errors to a log file, set the VSTO_LOGALERTS variable to 1 (one). Visual Studio Tools for Office creates the log file in the folder that contains the application manifest. The default name is .manifest.log. To stop logging errors, set the variable to 0 (zero).
Read more about possible pitfalls in the following articles:
Troubleshooting COM Add-In load failures
Troubleshooting Outlook Add-ins

UI.displayDialogAsync() does not work in Outlook 2016 / Windows 10

We build an Outloook Addin and are testing it across different platforms.
It works on all the browsers (IE 11, Edge, Chrome and Safari), but not in the Outlook 2016 on Windows 10.
We root cause it, looks like the problem is Office JS API UI.displayDialogAsync() .
It does not open a dialog in Outlook 16 and the addin just hangs in there with the following progress message spinning forever,
[Your Addin] is working onr your [Request]
The closest thing we found on the Internet is this Stackflow post in which the answer says
the oldest Outlook build that supports this API is 16.0.6741.0000.
We are using 16.0.9226.2114, so we meet the requirement.
Here are versions of OS/Outlook and Office JS we use in the test:
OS: Window 10 Home, Version 10.0.16299, x64
Outlook: 16.0.9226.2114, 32bit (Version 1804)
Office JS: 1.1.5-release-next.1 (We download the exact package from GitHub and host it on our server)
Wonder is there any known issue of this API on Outlook 2016? Need some help here, thanks!
We have also been trying to debug Outlook 2016 using F12 developer tools .
But our addin cannot show up in the chooser page, no matter we launch the chooser before or after
we click on our addin. We have tried this on several windows 10 machines, but none of them work. Any suggestions that what we could possible miss here?
Seems to me that you had a similar issue to mine. For me adding the remote domain in the manifest resolved the case. Find and update the following section:
<AppDomains>
<AppDomain>https://your.domain.com/</AppDomain>
<AppDomain>https://auth.com/</AppDomain>
</AppDomains>
Proxy HTML works cause it's loading from your domain and still is viable solution.

Microsoft Project not opening

I have a client who is asking me to fix an issue they are having with Microsoft Project.
The issue is that they are attempting to open a task list on SharePoint Online via the 'Open with Project' button in the ribbon, but after the alert asking them if they would like to open it in Project 2016 pops up nothing happens.
I have set up a fresh SharePoint environment and tried it at my end, but I get the same problem. There is no error message (as an alert or in the console) and I have wracked my brain and come up dry.
What I have tried:
New SharePoint instance.
Fresh Microsoft Project install.
Looked at the site/site collection features
Multiple browsers (specifically Chrome, IE and Firefox)
The issue is the same no matter what I do.
Has anyone else come across this problem before and, if so, how did you solve it?
Are you using 2016 Click-to-run (C2R) or MSI version? Can you share the build number from winproj.exe?
If you are on C2R version, can you try making the following registry edits (save the following as a .reg file and run it) and see if it helps?
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Common\ExperimentEcs\Overrides]
"ofhdegpklv1irq0"=dword:00000000
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentEcs\Overrides]
"ofhdegpklv1irq0"=dword:00000000

Resources