I’ve run into an issue a few times, where a user attempts to open a document in a SharePoint 2013 library using Office Web Apps (OWA). When the browser tries to load the file, the screen displays a Runtime error. Specifically it says “Server Error in ‘/x’ Application. This doesn’t occur when the user opens the file in the client application.

OWA Server Error

I was thinking this was an OWA issue overall, but this doesn’t happen for all users. Co-workers with the same permissions to the file seem to be able to access the file without an issue. After validating permissions again because “reasons” and checked the issue from each WFE it continues to work great for me. So I modified the (c:\windows\system32\drivers\etc\) host file of the user and it continued to fail on either WFE for the user.

The Hunch/Fix:
Well at least at this point I know it’s not 100% an OWA. I had the user try on another PC just in case it was an issue local to that machine and as certain as water is wet, the user can recreate the issue on a completely different computer. So now I’m thinking it’s gotta be following the user. On a hunch about another issue I’ve seen, I removed the users profile from the User Profile Database on the SharePoint farm. (Yes I deleted the profile, note: there are risks involved with losing data the user has manually updated into their profile). (But this user hadn’t made any updates to their profile.) Performed a new sync. (Full Sync) to pull the user back in from Active Directory.

Once the user’s profile was re-synced into SharePoint I had the user try it again. And lo and behold, no run time error. Just good old “Doc in a Browser” as expected. I have not dug deep enough to know what the users profile in the UPS database has to do with OWA throwing a fit, but somehow it’s related. So if you run across this, give it a try. If anyone happens to know how they are related and why removing the users profile and re-adding it works, please let me know!

(Note: Only removing the user from the users list of the site collection and not removing their profile from UPS Application, doesn’t resolve the issue.)


UPDATED: After talking to Trevor Seward @NaupliusTrevor, and him pointing me to check the logs (event and ULS) on the WAC (Office Web Apps Server). I discovered that OWA was really complaining about the UPA being in an Improper Sync State.

The error I could see in the ULS was below.
“WOPICheckFile,WACSERVER ConfigError [error:The SharePoint site appears to have its UPA in an improper sync state. Please contact the SharePoint administrator. The SharePoint site’s WOPI handler has determined that the user permissions for this file/folder do not match the user permissions when wopiframe.aspx was loaded. | WOPICheckFile,WACSERVER | Host Status Code: Unauthorized | Host Error Info: SyncUPA, url:”

A search (bing, google…) brought up a KB for this issue. which explained why removing the user from UPA and a re-sync fixes the issue. https://support.microsoft.com/en-us/kb/2908321

So now the real question is, why is my UPA sync getting all crazy go nuts? Will save that for another day.

Bonus Round:
I’ve also had an interesting issue where a user’s permissions get stripped from a SharePoint 2013 Group when a user opens an office file in a document library. You can re-add the user, but as soon as they open or edit and existing file, the user gets removed from the SharePoint group.  I’m not certain if this happens only on files that were previously migrated from another SharePoint Environment, or if any existing file that another user has created or uploaded. Regardless removing the users profile from the UPS Application, then re-syncing the profile back in, resolves this issue as well.


Happy SharePointing!


6 thoughts on “Runtime error with some users opening files in Office Web Apps on SharePoint 2013.

  1. This is very interesting. I wonder, were you able to do a full sync first to see if that work. Or do we need to delete the user and then do a sync. My concern is that while you were able to delete this user because they did not have anything saved to their MySite if there is a way of avoiding deleting their information in case they did have anything?

    1. Yes, I’ve tried running a full sync and having the user test with no fix. Yeah, it’s a big concern with deleting the profile. Its really a nuclear solution. 🙁 although a script to save the profile data before delete would probably be a good idea.

  2. I’m having the same problem, but appears to be random. Users are working, then they have the issue, try again and fail. Wait 5-15 mins and they are in with no problems working within the doc. When it occurs UPA is out of sync. Any suggestions on why this is and how to prevent it?

      1. The timer job for the incremental sync is daily, figured we don’t have a lot of user changes in the environment. I am syncing users and gruops using the SharePoint Profile Sync. Should I be running the incremental job more frequently?

  3. The timer job for the incremental sync is daily, figured we don’t have a lot of user changes in the environment. I am syncing users and gruops using the SharePoint Profile Sync. Should I be running the incremental job more frequently?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.