1
votes

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
I'm seeing a similar issue with Excel: stackoverflow.com/questions/57137876/… - Michael Saunders
Hi @MichaelSaunders, there is an issue with the lastest Office for Windows version. Please follow this issue on github: github.com/OfficeDev/office-js/issues/626 - Niko
This is a recent regression which we have indentified. We are currently working to rollout the fix. - Outlook Add-ins Team - MSFT

1 Answers

0
votes

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