问题
Excel Custom Functions very suddenly stopped working on my localhost (after a long period of working flawlessly.) All apps (our custom, as well as the starcount tutorial) now fail with the following error:
"This add-in could not be started. Close this dialog to ignore the problem or click "Restart" to try again."
Additionally, at the bottom of the worksheet I get:
"We're starting the add-ins runtime, just a moment..."
and it never goes away.
Attempts to resolve
- Deleted all custom functions and reverted to very simple "add" function [FAILED]
- Re-built app manifest [FAILED]
- Downloaded completely fresh Starcount tutorial example and tried loading custom functions [FAILED]
- Tried app custom functions in Excel Online [SUCCESS]
Recently installed programs
- PM2 (https://pm2.keymetrics.io/)
- Folder Size Explorer (https://www.folder-size-explorer.com/)
Helpful information
- winver: Version 19033 (OS Build 18362.476)
- Excel version: Office 365 ProPlus, Version 1911 (Build 122228.20120)
- Screenshot of error
- Link to runtime logging file. CSL is the namespace
回答1:
I was able to fix the local custom functions by upgrading to the insider build. It seems as though there may be a slight bug with the 1911 Office build.
- Not working: Version 1911
- Working: Version 1912 (Build 12312.20002)
回答2:
I had this same problem last week and it turned out my loopback exception had stopped working. I enabled it again and then I could debug add-ins on desktop again. You can work with the loopback exception from the CLI using the following commands.
To enable loopback for Edge WebView: npx office-addin-dev-settings appcontainer edgewebview --loopback
To query: npx office-addin-dev-settings appcontainer edgewebview
To remove loopback: npx office-addin-dev-settings appcontainer edgewebview – prevent-loopback
This is a wrapper that calls the CheckNetIsolation tool. You can also run the tool yourself with the following command to enable the loopback exception.
CheckNetIsolation LoopbackExempt -a -n="microsoft.win32webviewhost_cw5n1h2txyewy"
来源:https://stackoverflow.com/questions/58922052/excel-custom-functions-suddenly-stopped-working-on-local