Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Office Web Add-ins - Internal error when saving settings #626

Closed
Niko0pl opened this issue Jul 17, 2019 · 49 comments
Closed

Office Web Add-ins - Internal error when saving settings #626

Niko0pl opened this issue Jul 17, 2019 · 49 comments
Assignees
Labels
Area: add-ins platform Issue related to the add-ins platform Status: fixed Fix is deployed and available to customer Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs

Comments

@Niko0pl
Copy link

Niko0pl commented Jul 17, 2019

I'm getting an failure when trying to save my document/roaming settings.
The message in PowerPoint and Word is the following(saving to document.settings): {"name":"Internal Error","message":"An internal error has occurred.","code":5001}
The message in Outlook (saving to roamingSettings): {"name":"GenericSettingsError","message":"Permission denied","code":9019}

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);
   }
});

In Outlook code looks the same - just settings are different.

The problem revealed more a less the same time when office.js update 16.0.11902.35450 was released. and does not exist in Office for Mac and Web.

Details:

  • Windows 10 64-bit
  • Outlook for Office 365 MSO (16.0.11727.20222) 64-bit
  • Word for Office 365 MSO (16.0.11727.20222) 64-bit
  • PowerPoint for Office 365 MSO (16.0.11727.20222) 64-bit
  • Tested on a few PCs
@Niko0pl
Copy link
Author

Niko0pl commented Jul 18, 2019

@sumurthy, sorry, maybe it was not clear enough. I use this host: https://appsforoffice.microsoft.com/lib/1/hosted/office.js, so it's the last CDN released version. In comments is tagged as 2.3.0

@IAmferg
Copy link

IAmferg commented Jul 18, 2019

Just to add to this I'm having the same issue as well except in my case it's the roamingsettings which is being used for Outlook with an Add-In already on the Office store so this doesn't appear to be an isolated incident.

I made a stackoverflow post about it today:
https://stackoverflow.com/questions/57093850/roamingsettings-saveasync-returning-permission-denied-error-on-desktop-only

@ragavanrajan
Copy link

Facing same problem here suddenly after a recent update

@sumurthy
Copy link
Contributor

We are investigating the issue and looking at the relation between this issue and a recent fix we rolled out. We'll update this thread with more details as soon as we know the estimated availability of the fix.

@jeremy-msft
Copy link
Member

Thanks for reporting this issue. We identified a recently introduced regression which impacts users on either the April [16.0.11629.20246] or May [16.0.11727.20244] update. A fix has been made and we are working to get this deployed to the May update. We will update this thread once deployment has completed.

@saunders77
Copy link

saunders77 commented Jul 22, 2019

In the meantime, is there a different Office.js URL we could switch our users to, apart from /lib/1.1/hosted/office.js, to provide a temporary fix while certain users are in a broken state?

I'm seeing a similar issue with Excel: https://stackoverflow.com/questions/57137876/settings-api-for-office-add-ins-office-js-is-not-working-in-excel

@Niko0pl
Copy link
Author

Niko0pl commented Jul 24, 2019

@jeremy-msft, I really appreciate your work guys, but it's been a week since the issue has been reported. When can we expect the fix? I'm not sure if I should look for a workaround on my own or wait for your release.

@jeremy-msft
Copy link
Member

We're still waiting for the updated builds to roll out, but unfortunately I don't have an ETA yet. We appreciate your patience and will continue to keep the thread updated.

@wsywq
Copy link

wsywq commented Jul 29, 2019

Hi @jeremy-msft , i also met this problem that Roamingsettings SaveAsync return error '9019' in Windows Outlook build Office Insider 1908(11916.20000) in my add-in. Do you have any solution about it?

@JefCurtis
Copy link

@jeremy-msft I can confirm that this has been an ongoing issue with our Outlook add-in from July 15 onward. We've had hundreds of reports from our users hitting this bug as it actually blocks usage of the add-in. Because this issue doesn't seem to be affecting the OWA version, we can direct our users to the web but it's not ideal. I'll be monitoring this issue and I am motivated to help fix this issue if I can be of assistance. This seems to be an issue with newish versions of Outlook desktop on Windows 10/7.

I can reproduce on Version 1902 (Build 11328.20368 Click-to-Run) getting this error:
{"name":"GenericSettingsError","message":"Permission denied","code":9019}

It does not seem to be an issue on Outlook for MacOS if that helps.

@jeremy-msft
Copy link
Member

Thanks again for everyone's patience with this issue. Version 1907 (build 11901.20176) released today for Monthly Channel fixes this issue and an update for Office Insiders version 1908 will be available shortly.

@cawise
Copy link

cawise commented Jul 30, 2019

@jeremy-msft Thanks for the prompt fix. Is there any workaround in the meantime? Being on the semi-annual channel, it will be 6-12 months before everyone in my organization gets version 1907 or higher. So right now it appears my only option is to scramble to update our internal app to use something other than document settings.

@jeremy-msft
Copy link
Member

@cawise Can you confirm what build your organization is currently on?

@cawise
Copy link

cawise commented Jul 30, 2019

Can you confirm what build your organization is currently on?

@jeremy-msft Sorry, I should have included that. A few weeks ago we were upgraded to Version 1808 (Build 10730.20360).

image

@cawise
Copy link

cawise commented Jul 31, 2019

It seems that using the host-specific API still works!

In my case, I can successfully use the Excel API for settings in place of the Common API for settings. This provides a much easier fix than rushing to redesign my app to not use settings at all.

Hopefully this holds true for other hosts, as well.

@caggers
Copy link

caggers commented Aug 1, 2019

Hi @jeremy-msft and @sumurthy I'm on the same team as @JefCurtis above.

We need to investigate an alternative fix for this issue as like @JefCurtis stated we have hundreds of affected customers and almost all of them are on annual and not monthly updates. We are a Microsoft Partner and we are really keen to speak to someone involved in the fix.

We are currently using Office.RoamingSettings is there any alternative API that we can use to expedite a fix for our customers?

@jeremy-msft I can confirm that this has been an ongoing issue with our Outlook add-in from July 15 onward. We've had hundreds of reports from our users hitting this bug as it actually blocks usage of the add-in. Because this issue doesn't seem to be affecting the OWA version, we can direct our users to the web but it's not ideal. I'll be monitoring this issue and I am motivated to help fix this issue if I can be of assistance. This seems to be an issue with newish versions of Outlook desktop on Windows 10/7.

I can reproduce on Version 1902 (Build 11328.20368 Click-to-Run) getting this error:
{"name":"GenericSettingsError","message":"Permission denied","code":9019}

It does not seem to be an issue on Outlook for MacOS if that helps.

@jjhua-github
Copy link

@cawise @JefCurtis Setting API would be broken only if Dialog API were used during the calling flow

@JefCurtis
Copy link

JefCurtis commented Aug 1, 2019

@jjhua-github I'm sorry, I'm not following you.

Setting API would be broken only if Dialog API were used during the calling flow

Could you be more specific? Are there links to the Office docs that would help?

@jeremy-msft
Copy link
Member

Hi @caggers @JefCurtis @cawise, are you able to provide repro steps for how you're seeing this issue happening in version 1902? We want to make sure the problem you're running into is the same as what we've fixed in the original report vs. something else related to settings. Also would be helpful if you can confirm whether the problem has been resolved for you in the Version 1907 build.

@JefCurtis
Copy link

JefCurtis commented Aug 1, 2019

@jeremy-msft So I've managed to switch my development version of Office 365 over to the monthly channel using these instructions so that I could test that, indeed, a fix for the error we were receiving when using Office.context.roamingSettings.saveAsync was released. I'm happy to report that it is now no longer return the 9019 error code and is working as expected!

What is the easiest way to provide you repro steps to create this error? I could forward you a manifest file to a custom add-in where you could see the error through the console log when the API method is triggered?

Also, do you know when version 1907 would be released for those on the semi-annual channel?

@jargil jargil assigned jargil and unassigned sumurthy Aug 2, 2019
@jargil
Copy link

jargil commented Aug 2, 2019

@JefCurtis - If you could just start by listing the steps you follow to get to this error, that would be useful. Example:

  1. Boot Outlook,
  2. Open e-mail,
  3. Activate add-in,
  4. Click button that launches invoked the dialog API,
    ... You could share some snippets here...
    etc. until you get to the error.

After that depending if the repro is clear enough we may be good to go, or we may ask for a simplified add-in that we can use to reproduce what you see.

Regarding when 1907 will release to semi-annual channels, we don't have dates to share.

@JefCurtis
Copy link

@jargil For us, it was fairly straight forward. We are testing using a Business o365 subscription on version 1902.

Reproduction steps
  • Open Windows 7/10 desktop Outlook (this works fine in any browser)
  • Open an email
  • Open the add-in and if not logged in to an external service, be taken to a login page.
  • A login (oAuth) window is triggered and the user successfully logs in
  • At this point, we attempt to store this third party API token using the roamingSettings
  • the request fails which in turn, returns the user back to the original login page
    Office.context.roamingSettings.set(key, value); 
    Office.context.roamingSettings.saveAsync((result) => {
      // result:
      // {"name":"GenericSettingsError","message":"Permission denied","code":9019, "status": "failed"}
      // the token is not saved
    }); 

Notes:

  • Before July 15th, this worked without issue
  • After upgrading to version 1907, the problem goes away
  • We are currently store the token using the roamingSettings. Is there a better place that something like this should be stored?

@jargil
Copy link

jargil commented Aug 5, 2019

@JefCurtis - thanks for the detailed repro steps! The step I was missing before is the use of the dialog API ("A login (oAuth) window"). With that information I can confirm that yes we're talking about the same issue that was fixed in Main (as you confirmed) and we're looking to deploy to the semi annual channels soon. Unfortunately I cannot confirm an exact date for the update to be available.

@jargil jargil added Area: add-ins platform Issue related to the add-ins platform bug Status: fixed Fix is deployed and available to customer labels Aug 5, 2019
@Niko0pl
Copy link
Author

Niko0pl commented Aug 16, 2019

My add-in Store submission has been recently rejected due to this error on Word/PowerPoint in Office 2013 on Windows 7. Checked that and the same issue can be observed on Windows 7 x32 in Word 2013 (1.0.5163.1000).

@kranti3033
Copy link

@jargil We updated both 2016 and 2019 after your post regarding the availability of the update. It was worked fine in 2019 after the update. But for 2016 we still see the same old issue. We did testing in 3 machines with 2016 and all of them showed a similar error.
Below is the updated version for 2016.
image

@jargil
Copy link

jargil commented Aug 20, 2019

@kranti3033 - for Office 2016, you say "similar error". Could you clarify which exact error?

@kranti3033
Copy link

@jargil - For 2016, after updating the excel with the patch provided in the above link .. we are still getting {"name":"Internal Error","message":"An internal error has occurred.","code":5001} error.

@geilerdev
Copy link

We are running version:1907 build:11901.20218 and still get an 'permission denied' error when saving async. This is both 2016 and 2019 clients.

Office.context.roamingSettings.set('apikey', key);
Office.context.roamingSettings.saveAsync( saveCallback );

the error code is 9019.

@jargil
Copy link

jargil commented Aug 21, 2019

@geilerdev - please also verify that you're using the latest version of Office.js available from the CDN.

@kranti3033 - the internal error you're seeing was happening on 2019 only and for people on Windows 10 with May's update. For 2016 the fix addresses a permission denied error. Please double check you have the latest version of Office.js.

I'm keeping this issue open while we're only waiting for the fix for Office 2013.

This is the latest status:

Office 2019:
If you're an Office Insider, use 16.0.11920 or newer.
If you're on May's monthly update, use 16.0.11727.20288 or newer.
IF you're on June's monthly update, 16.0.11901.20136 or newer.

Semi Annual 2019, use 16.0.11328.20392 or newer
More info at
https://docs.microsoft.com/en-us/officeupdates/semi-annual-channel-targeted-2019#version-1902-august-13

Office 2016:
https://support.microsoft.com/en-us/help/4475551/august-6-2019-update-for-office-2016-kb4475551

Office 2013: Not yet available.

Additionally you'll also need to make sure you have the latest version of Office.js

@geilerdev
Copy link

@jargil - we load javascript directly from this url: https://appsforoffice.microsoft.com/lib/1/hosted/Office.js

@jargil
Copy link

jargil commented Aug 26, 2019

@geilerdev - please open a new issue with all your repro steps and information for us to debug and follow up separately. If you can provide a basic sample add-in that'd be super useful.

@JefCurtis
Copy link

@jargil I can confirm that we are still seeing this error in Outlook 2016. The version that I'm testing has been upgraded using this link. We are pulling in the OfficeJS library directly from the CDN provided.

Outlook 2016 version
image
Error message from Office.context.roamingSettings.saveAsync
image

The reproduction steps are exactly the same as they were before. See this comment.


Let me know if you need more information than I've provided.

@kbrandl kbrandl added Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs and removed Status: fixed Fix is deployed and available to customer bug labels Aug 26, 2019
@jargil
Copy link

jargil commented Aug 27, 2019

@JefCurtis - could you check that the file versions listed in the KB for Office 2016 match the versions you see in your machine where you repro this?
https://support.microsoft.com/en-us/help/4475551/august-6-2019-update-for-office-2016-kb4475551

For example osf.dll should be version 16.0.4888.1000.

@JefCurtis
Copy link

@jargil Yes, the file versions do match what is listed in the release notes.

osf.dll as an example

@jargil jargil added Status: fix pending Fix is complete but awaiting prod deployment and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Aug 27, 2019
@jargil
Copy link

jargil commented Aug 27, 2019

@JefCurtis - thanks for confirming the version. We're working on redeploying the KB with the proper binaries that contain the fix. I'll post back here once that's available.

@jargil
Copy link

jargil commented Sep 3, 2019

We've published the updates for Office 2013 and 2016, please find the links below.

@JefCurtis - could you please confirm that this patch works for you?

Office 2013:
https://support.microsoft.com/en-us/help/4475562/september-3-2019-update-for-office-2013-kb4475562

Office 2016:
https://support.microsoft.com/en-us/help/4475580/september-3-2019-update-for-office-2016-kb4475580

@jargil jargil added Status: fixed Fix is deployed and available to customer and removed Status: fix pending Fix is complete but awaiting prod deployment labels Sep 3, 2019
@JefCurtis
Copy link

@jargil I'll absolutely test these versions for you but I won't be able to get to them until Monday morning 👍

@JefCurtis
Copy link

@jargil

  • ✅I've had a chance to test Office 2016 and it looks like the new version did fix the problem.
  • ❓I could not test the 2013 update as I don't have a version of Office 2013. I'm using a version of Outlook 2013 that is not bundled with Office so the update wouldn't apply.

If you're able to provide a copy of Office 2013 (in any form such as trial), I'd be happy to test it out though.

@JefCurtis
Copy link

@jargil Is it possible, that after updating Outlook 2016 using this update that the version of OfficeJS has changed and removed support for v1.5 and above?

Some of our add-in functionality was dependent on v1.5 and up so there is a conditional check in the code to confirm that the version of Outlook the add-in is running in does support this version before toggling this feature on. I've been recently receiving reports from some of our users that their version of Outlook (2016) no longer support this functionality even though, before updating, it did work.

I can confirm this:

// before Sept 3rd update
Office.context.requirements.isSetSupported("Mailbox", 1.5); ==> true
// After Sept 3rd update
Office.context.requirements.isSetSupported("Mailbox", 1.5); ==> false

Is this expect behavior? Was there is change to the supported version of OfficeJS with this update?

@jargil
Copy link

jargil commented Sep 11, 2019

@JefCurtis - thanks for confirming the update for 2016 works.

That's unexpected given the fix we deployed with Sept's update. Could you please open a new issue to track this new finding? If you agree I'll then close here to mark that we've now fixed the permission denied error.

Once you open the new bug feel free to assign it to me and I'll follow with the subject matter experts.

@JefCurtis
Copy link

@jargil Done. Here is the issue. I've no idea how to assign the issue to you (I don't think it's possible) so I've just left you a comment. Feel free to close this issue though.

@jargil
Copy link

jargil commented Sep 12, 2019

Thanks! Closing this issue as this specific problem is now fixed.

@jargil jargil closed this as completed Sep 12, 2019
@asith-w
Copy link

asith-w commented Jan 17, 2020

i am getting same error when calling Office.context.roamingSettings.saveAsync with OWA i have asked question also

value: null
status: "failed"
error: OSF.DDA.Error
name: "GenericSettingsError"
message: "An internal error has occurred."
code: 9019 
private saveLoginDetails = async (
    userName: string,
    loginResponse: LoginResponse
  ): Promise<any> => {
    return new Promise<any>(resolve => {
      Office.context.roamingSettings.set("username", userName);
      Office.context.roamingSettings.set("loginResponse", loginResponse);
      Office.context.roamingSettings.saveAsync(
        (asyncResult: Office.AsyncResult<void>) => {
          console.log(asyncResult);
          resolve();
        }
      );
    });
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: add-ins platform Issue related to the add-ins platform Status: fixed Fix is deployed and available to customer Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs
Projects
None yet
Development

No branches or pull requests