问题
I'm getting an failure when trying to save my document settings. The message is the following: {"name":"Internal Error","message":"An internal error has occurred.","code":5001}
My code:
Office.context.document.settings.set('token', token);
Office.context.document.settings.set('email', email);
Office.context.document.settings.saveAsync(function (asyncResult) {
if (asyncResult.error) {
displayError(asyncResult.error.message);
}
});
The problem revealed when I reinstalled my OS (Windows 10) and does not exist in Office for Mac and Web. It happens both on PowerPoint and Word. Maybe it's something with file write permissions?
[EDIT]
I suspect it may be the problem with the last office.js release. I'm using the official CDN (https://appsforoffice.microsoft.com/lib/1/hosted/office.js) or with the last Office 365 update for Windows Clients (16.0.11727.20222). The problem exists in Outlook as well when trying to save roamingSettings
. The message then is: {"name":"GenericSettingsError","message":"Permission denied","code":9019}
回答1:
Issue has been fix with Outlook Version 1907 (build 11901.20176). It is enough to update the Office to get rid of it.
GitHub page with an issue
来源:https://stackoverflow.com/questions/57055215/office-web-add-ins-internal-error-when-saving-settings