Office Web Applications on SharePoint 2010 Troubleshooting

A user reported an issue on our environment attempting to open a Word document. The interface was presenting a simple error message and returning them to the SharePoint website.

Word Web App cannot open this document for viewing because of an unexpected error. To view this document, open it in Microsoft Word.

Diligent observers would note a slight difference in the button options available between these two error message dialogs. I’m not sure what triggers one or the other, other than the first dialog is displayed at first encounter of the error, but they are very similar and seem interchangeable.

There were other error messages found along the way.

Word Web App cannot open this document because the Office Web Apps Feature isn’t activated on this site collection. Try opening the file in Microsoft Word.

Word Web App cannot open this document for editing because it is currently being edited by another user.

This post is to document the steps I followed in troubleshooting because while I found lots of information available on Microsoft KB articles and around various forums, nothing seemed to be of much use to my particular situation.

I firstly reproduced the issue by opening the document (feature to open documents in Office Web Apps by default is enabled) and checked out the ULS. Here is what I found:

11/27/2012 11:44:37.89 w3wp.exe (0x1190) 0x361C SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:https: //SERVER/sites/SITECOLLECTION/_vti_bin/docdatahandler.ashx?d=F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m&z=85BE98FB-0637-46E4-BF39-DE1591AED6A02&type=sl&ui=en-US) 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.89 w3wp.exe (0x1190) 0x361C SharePoint Foundation Logging Correlation Data xmnv Medium Site=/sites/azuurifd 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.89 w3wp.exe (0x1190) 0x361C Office Web Apps Office Viewing Architecture vjyu Medium Librarian.BeginGetItem(F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m, Silverlight, docdata.xml) 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.89 w3wp.exe (0x1190) 0x361C Office Web Apps Office Viewing Architecture vkau Medium ViewStore.BeginGetItem(F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m, Silverlight, docdata.xml) 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.89 w3wp.exe (0x1190) 0x361C Office Web Apps Office Viewing Architecture e9dk Medium ViewStore.ReadMainCache(F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m, Silverlight, docdata.xml) 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.89 w3wp.exe (0x1190) 0x361C Office Web Apps Office Viewing Architecture el9d Medium FEMemoryCache.FReadFromCacheLine: d=F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m&z=85BE98FB-0637-46E4-BF39-DE1591AED6A02, 00000000-0000-0000-0000-000000000101, length 10240, offset 0 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.91 w3wp.exe (0x1190) 0x361C Office Web Apps Office Viewing Architecture vkaw Medium ViewStore.SetCompleted(F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m, Silverlight, docdata.xml) - status = DocumentOutputNotFound 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.91 w3wp.exe (0x1190) 0x361C Office Web Apps Office Viewing Architecture b4vw Medium RequestDispatcher: dispatching request for document F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m to http: //MACHINENAME:32843/4dccdb5d5def497e84a0db1b4016b370/Conversion.svc. 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:37.92 w3wp.exe (0x1190) 0x361C SharePoint Foundation Topology e5mc Medium WcfSendRequest: RemoteAddress: 'http://MACHINENAME:32843/4dccdb5d5def497e84a0db1b4016b370/Conversion.svc' Channel: 'Microsoft.Office.Web.Conversion.Framework.Remoting.IConvertingService' Action: 'http: //tempuri.org/IConvertingService/ProcessRequest' MessageId: 'urn:uuid:0a64f724-f9b6-4c67-b43c-f989c4f7ea39' 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:38.08 w3wp.exe (0x1190) 0x2840 Office Web Apps Office Viewing Architecture dg2s Medium RequestDispatcher: response received for document F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m from http: //MACHINENAME:32843/4dccdb5d5def497e84a0db1b4016b370/Conversion.svc. 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:38.08 w3wp.exe (0x1190) 0x2840 Office Web Apps Office Viewing Architecture b4vn Medium Conversion response received: CantFindSourceDocument 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:38.08 w3wp.exe (0x1190) 0x2840 Office Web Apps Office Viewing Architecture vjza Medium Librarian.OnConversionResponseReceived(F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m, Silverlight, docdata.xml) - Response=CantFindSourceDocument, Data=NO 460f8992-a2e7-4431-9e8f-607c1ac4953d

11/27/2012 11:44:38.08 w3wp.exe (0x1190) 0x2840 Office Web Apps Office Viewing Architecture vjzo Medium Librarian.SetCompleted(F2bcc7d18ae564960ba19f23bd5314f50m048c6be7923b44c9aeedd698d645aaa1m85be98fb063746e4bf39de1591aed6a0m, Silverlight, docdata.xml) - status = ConversionError 460f8992-a2e7-4431-9e8f-607c1ac4953d

My observations

  • The Web server reports that it can’t find the source document
  • The Web server is making a call to another machine in the farm hosting a Word Web App service instance. You may not always see this call due to various caching going on.

Meanwhile, another Word document in the same site collection/site/library/folder was rendering successfully in Word Web App.

There is a Microsoft KB article with some generic advice here http://support.microsoft.com/kb/2028346 such as check your service account permissions and ensure the service application proxy is associated with the web application. I could rule these things out since the Word Web App was successfully working for at least one document. So on to further research.

The first interesting blog post I found http://blogs.architectingconnectedsystems.com/blogs/cjg/archive/2012/05/23/Office-Web-Apps-_2D00_-Word-Viewing-Service-Error.aspx suggested the “Edit in Browser” functionality was separate to the “View in Browser” functionality. I gave it a go and presto the document was successfully rendering in the browser.

This was actually the first time I saw the contents of the document, and straightaway noted that it contained some unusual characters that Word Web App had rendered as “[Soft Break]”.

Since this seemed a case of “the odd one out”, I made a copy of the document (being careful to retain all metadata) and edit it so that only the Soft Break characters were removed. Testing showed that Word Web App was successfully rendering the document.

There was also an article I read during my research that suggested Soft Break characters had limited success in Office Web Apps (which I cannot find again despite my best googling – it was a Google Docs VS Office 365 kind of article so the author may have had some bias one way or the other).

The case seemed to be closed.

The user then reported an issue with the PowerPoint file on his website not rendering and displaying an error message.

PowerPoint Web App cannot open this presentation for viewing because of an unexpected error. To view this presentation, open it in Microsoft PowerPoint.

and

PowerPoint Web App encountered an error. Please try again.

I looked at the file, and the first thing I did was set about searching for odd characters. I uploaded various copies of the file containing subsets of the original’s slides to try and deduce where any odd characters may exist, but the results were mixed. A document containing one subset of the slides would successfully render, but another would not. I tried a number of combinations eventually giving up on finding any pattern or odd character.

Next I uploaded a brand new empty PowerPoint 2010 file (default master slide), which the PowerPoint Web App was unable to render, showing the error message.

I then tried uploading the user’s PowerPoint file to another farm and found PowerPoint Web App rendering the document just fine. Just for kicks, I also uploaded the user’s Word file and found that it too was working successfully, even with Soft Break characters.

Now the cause seemed to be pointing to the Office Web Apps on the offending farm. There also seemed to be some intermittent behaviour since there was at least one Word document that would successfully render for viewing in Word Web App. I set about investigating this by first off restarting the service instances on each machine in the farm and then retesting the documents – no good. I re-provisioned the service applications and retested – no good.

There is a Microsoft TechNet article that outlines some generic advice how to troubleshoot Office Web Apps here http://technet.microsoft.com/en-us/library/hh269604(v=office.14).aspx. Being diligent and wanting to rule out anything obvious this article covered, I confirmed the application pool identity was granted db_owner on the content databases via GrantAccessToProcessIdentity (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.grantaccesstoprocessidentity.aspx) then retested – and still no good.

Small aside, a new error message started to display for Word Web App’s “Edit in Browser” function after making these changes.

Word Web App cannot open this document because the Office Web Apps Feature isn’t activated on this site collection. Try opening the file in Microsoft Word.

Fortunately this was resolved with a simple iisreset.

More research followed – I read two blogs.

http://heidibrebels.be/blog/archives/2011/office-web-apps-error-sharepoint
This was the most comprehensive article I found approaching Office Web Apps errors on SharePoint 2010… at least one that went beyond the generic and basic information repeated in numerous other articles. It even contained the same ULS entries as I found, although I’m not too sure about the logic that suggested installing Silverlight.

http://blogs.technet.com/b/wbaer/archive/2010/09/01/the-office-web-applications-cache.aspx
Bill Baer, the Godfather of SharePoint infrastructure, comes to the rescue. Bill does not provide the answer to any Office Web Apps issues, but does enlighten us on the actual mechanics behind Office Web Apps cache. Using this knowledge, I was able to dig in to the Office Web Apps infrastructure and resolve the issue. Here is what I did:

  • Check the cache creation timer job – ok.
  • Check the cache site collection existed – ok.
  • I did not need to isolate the office web application cache to a separate content database.
  • Clear the content in the site collection cache – ok.

Now when I was re-testing the Word Web App rendering a document for viewing, I could see that nothing was being created in the site collection cache.

  • Check the server file system cache

The interesting piece of information here was the location of the server file system cache.

  • Word Web App server file system cache is located at C:\Windows\Temp\waccache\SERVICEAPPLICATIONGUID\SERVICEACCOUNT\
  • PowerPoint Web App server file system cache is located at C:\Windows\Temp\powerpointcache\UNIDENTIFIEDGUID\viewing\SERVICEACCOUNT

Now when I was re-testing, I saw that I needed to be on the server that was being called for “Conversion.svc” i.e. the machine that was being used for the service instance. Here I could see the cache document being created, and ‘disappearing’ a few minutes later. I would assume that a timer job is picking this up and moving it to the site collection cache.

Finally, per Bill’s post

  • I cleared the server file system cache – ok.
  • Perform IIS reset on all servers in the farm – ok.

On retesting, the issues were all gone. I hope to clarify this step further and refine what is actually required, but a resolution is a resolution.

EDIT – I believe the only reset required is the application pool for the Office Web App on the server hosting the service instance.

This SharePoint farm currently has pending upgrades using New-SPConfigurationDatabase

Scenario

Creating a new SharePoint 2010 farm with PowerShell cmdlet New-SPConfigurationDatabase on a virtual machine that contain SharePoint and Office Web Applications (OWA) binaries.

Error

New-SPConfigurationDatabase : This SharePoint farm currently has pending upgrades. The cmdlet New-SPConfigurationDatabase cannot be executed until the upgrade is completed.

Resolution

Execute PSConfig as below
psconfig -cmd upgrade -inplace b2b -wait –force

Explanation

The installation of the Office Web Application binaries sets certain registry entries that trick the system to believing the system is in the middle of an upgrade when running New-SPConfigurationDatabase.

Thanks to Maxime’s solution blog at http://blogs.msdn.com/b/maximeb/archive/2010/10/13/this-sharepoint-farm-has-pending-upgrades-error-when-running-new-spconfigurationdatabase-for-a-new-sharepoint-2010-installation.aspx