This post is article 5 from the 30 Articles App series for SharePoint
In this post I will discuss about how to deploy an App to SharePoint site and then we will discuss about one *well-know* issue for SP2013 preview.
Let me quickly tell you about the possible ways for how to deploy an App to SharePoint 2013.
- You are creating it via Visual Studio 2012 -> hit F5 and your App will be deployed. Simplest and easiest approach for debugging your App.
- Publish your App, get .App file ( no wsps ) and upload to your app catalog. Go to the Site where you want to add this app instance. Your newly deployed App should be available when you go to -> Add an App.
- If you are using NAPA tools it is pretty much doing the same -(2)
- It’s a powershell way 🙂 .
Deployment issue:
If you haven’t noticed yet there is a well-known issue (Mostly a bug in preview), Your Apps sometimes are not installed correctly and you could not retract them as well. You got stuck with this ugly junk hanging to your site!!
Workaround :
“This is a bug in preview” said by Microsoft guys in the Microsoft forum.
How to deal with it then.
(1) Change the product Id and then re-deployed the App. Your SharePoint environment will think it as a new App.
Newly deploy App may work (but seriously what about the ugly junk left over your site )
here is a link for question : http://social.msdn.microsoft.com/Forums/en-US/appsforsharepoint/thread/430300f6-5682-4a6f-92b8-73a501f4d9b8
(2) How to get rid-off this not-properly installed App and deploy it without changing the product Id
Uninstall this App using PowerShell and below are the steps:
- Get Instance of Not-properly installed App’ Instance as following :
- $instance = Get-SPAppInstance -Web http://mysharepointSite/ -AppInstanceId ‘f14876c4-26bd-41ea-8480-7a529882dd60’
- Uninstall-SPAppInstance – Identity $instance
It did work perfectly for SharePoint hosted apps.
For auto-hosted Apps it didn’t work as it is waiting on some Job to be finished before It can uninstall this App. “Another job exists on this instance. Please retry after that job is done.” this error message appears as below:
Question of the Article :
How to monitor those jobs against your App (specially for not-properly deployed ones) and how to kill them so we can finally uninstall our App?
I would love to hear your thoughts and experience about this.
Note: This article is written for SharePoint 2013 preview.
Hi,facing a problem in SP 2013.
I have added a free app from the sharepoint store.
While clicking that from quick launch, it gave ‘Page not found error’ where I added the site in my public site.
Then ‘Internet Explorer cannot display the webpage’ – with the the appredirect.aspx?instance ID ={instance id}.
This added apps does is not shown in edit page ‘App Part’ as well.
So please suggest.
Most possible thing happened there is the App was not installed to the site successfully. You could try one of the above workarounds or try to deploy it on another site. What’s the app you are trying from the App store. I will give it a go with deployment myself. -Aanu
Thanks, I know there is some problem here. I tried with Nintex Workflow free apps.
However, I would like you to share a net meeting ( gotomeeting / skype) , for the troubleshooting reason , if possible for you.
Thanks.
Ever figure out the “another job exists for this app instance” problem in the screenshot above?
Hi Aanu, I am SharePoint Consultant with 8 years relevant experience. Please find my query below,
When I deploy SharePoint hosted app from Visual Studio 2012, it generated app web URL and that opens the app properly. But, if I upload .app file after publish in Visual Studio 2012 to App Catalog and added new app based on my SharePoint hosted app. When try to click on app, saying ‘This page can’t be displayed’ in internet explorer. I don’t think so it will be issue with app domain as the app working fine if deploy from visual studio. Thanks in advance for your help. my email id: putta.janaiah@gmail.com
It’s possible to just remove entires for AppJobs, AppInstallations and AppPackages directly from SQL. It might not be the best solutions since it might leave some redundant entries behind, but it solves that problem. 🙂