Problems installing Apps in SharePoint farm

Recently while working with a colleague we came across a few easy to miss issues when configuring the App Management Service in a SharePoint farm and while troubleshooting those issues found a lack of online resources on what turned out to be super-simple issues to resolve. (Hindsight is great)

Issue 1: ‘Let’s try this again’ error installing from the App Store

After installing and configuring the services, app domain and catalog as required, we could now open the SharePoint App Store, and choose an app to install, however the following message was displayed and the installation of any App would never begin.

Capture

Error text: Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you won’t be charged for it.

Everything’s fine hey? Looking at the ULS revealed that this was caused by security:

w3wp.exe (0x0CA0) 0x1DF4 SharePoint Foundation App Marketplace High An exception was thrown while trying to import the app license. AppName:Bulk Edit; Exception:System.UnauthorizedAccessException: You don’t have the right to perform this operation. at Microsoft.SharePoint.SPAppLicenseManager.ImportLicense …
w3wp.exe (0x0CA0) 0x1DF4 SharePoint Foundation App Marketplace High Post app license acquisition did not result in a successful license import. HugState:Retry

But how can this be, we’re testing using the Farm Admin account and so we have all permissions! It turns out, that is actually the problem! While I can’t say specifically where / what setting causes this, in a typical SharePoint 2013 install the Farm Admin (/ Installer account) is intentionally restricted in certain ways, my guess is something to do with local computer policies or such.

Solution

Login using a user account (who can be Site Collection Admin and all that)!

Capture2

Yay my favourite app!

Issue 2: App installs without issue but does not work

Now we have our first app installed, however running it doesn’t quite work out. Unfortunately this time we get very little indication of the problem, in fact with Bulk Edit the app will start and look good, except nothing works! The buttons do nothing, and no data is displayed! :(

Capture3

Similar issues happen with other apps installed and without looking at the F12 browser debug console the only indication that there is a problem is the top right hand corner site icon image which is just a little ‘x’.

If you do debug you will see an error like this:

SCRIPT5009: ‘RegisterSod’ is undefined

File: Default.aspx, Line: 14, Column: 32

Basically that tells me as a developer that something is seriously wrong in the farm (SP.js is missing which the whole JSOM api requires)!

Cause & Solution

Fortunately the solution was simple: SP.js was actually missing! Well not exactly, as it turns out while we had provisioned a single PWA site collection at /PWA in our Web App, we had not actually created a Default Root site collection at ‘/’. This configuration actually can break lots of things including SSRS and so this comes as no surprise really.

Simply creating a root site collection (using Blank or any template) fixed the issue and now all apps work as normal.

 

Other potential issues

While possible the topic of another rather long post, here’s a list of other things to check if you get permissions issues trying to install apps (sorry this is from memory so pls comment below if you think any of this has changed):

 

Hope that helps someone else out there!

Share and Enjoy !

Shares

Config Wizard Problem Installing Cumulative Update

This is actually why I started blogging.

Ran across this issue deploying the Feb 2012 CU update for a SharePoint 2010 customer;

[OWSTIMER] [SPUpgradeSession] [ERROR] [6/12/2013 2:46:34 PM]: Exception: Cannot drop the procedure ‘MSP_WEB_SR_DeleteUserData’, because it does not exist or you do not have permission.
Cannot drop the procedure ‘MSP_SECURITY_CREATE_PROJECT_OWNER’, because it does not exist or you do not have permission.
Cannot drop the procedure ‘MSP_DELETE_PROJECT_LOOKUP_TABLES’, because it does not exist or you do not have permission.

… (continues for a few hundred other lines)

 

Unfortunately a quick Google search came up with only the following; http://dzeee.net/sharepoint/post/2011/03/23/MOSS-2007-Feb-CU-2011-Installation-issues.aspx

Unfortunate because the proposed solution is to disable and recreate the specified service applications (Search in their case), now as I didn’t want to have to practically reinstall SharePoint this wasn’t going to happen.

 

Better Solution

Fortunately the the source above was onto something, the solution was simply to stop all related SharePoint Windows Services (not SharePoint services), so in my case stop:

  • Project Events Service
  • Project Queue Service
  • SharePoint Administration
  • SharePoint Timer
  • SharePoint Tracing
  • SharePoint User Code Host
  • SharePoint Server Search

Then run PSCONFIG from the command line:

psconfig.exe -cmd upgrade -inplace b2b -wait –force

 

PSConfig automatically starts any needed services, then at the end restarts the others with only the exception of the Project services which I had to start manually.

Share and Enjoy !

Shares

2010 Analysis Services Setup – No More Repository!

One thing I had been thus far unable to find out with 2010 and SQL AS is what’s changed with regards to the repository and DSO configuration, didn’t seem to be much specific mention in TechNet and I have seen a few posts indicating that the setup procedure is the same. (As in here.)

Well I just quickly tested and realised that it the whole configuration of the repository and DSO settings is no longer necessary! Hurrah! No more manually creating the repository database, and thank you MS for getting rid of the option to use an MDB repository!

Now that it’s 2010 we can finally get rid of some of those 90’s technologies..

Share and Enjoy !

Shares