In this SharePoint Apps or Add-in tutorial explains how to solve “Error occurred in deployment step ‘Install SharePoint Add-in’: Failed to install SharePoint Add-in. Please see the output window for details. There was a problem with activating the app web definition. Cannot complete this action.” The error comes while developing SharePoint hosted add-in or apps using visual studio 2017 for SharePoint Online or SharePoint 2013/2017.
Recently in a SharePoint training, I was explaining about SharePoint hosted add-in development and deployment using visual studio 2017, but while deploying I got the error: Error occurred in deployment step ‘Install SharePoint Add-in’: Failed to install SharePoint Add-in. Please see the output window for details.
When I checked the output window, I can see an error like: There was a problem with activating the app web definition. Cannot complete this action.
If you are new to SharePoint hosted add-in or apps, you can read below two tutorials:
Reason:
In the SharePoint hosted add-in I was creating a site column, content type and then I was creating a SharePoint custom list. Then in that list, I was trying to add the content type in SharePoint Online.
Solution:
Not sure, if it the solution will work every time. But it worked for me.
- First I retract the app and clean the solution in visual studio 2017.
- Then I deleted the content type and SharePoint Online list from the Add-in project.
- And finally, I created the content type and added the existing Site columns to the content type.
- Then created the SharePoint custom list to the add-in project and added the content type to the list.
- Then I deployed the project. This time it deployed the Add-in correctly without giving any error.
You can read some SharePoint hosted add-in errors:
- Display List items in HTML Table using JSOM in SharePoint Hosted App
- Bind SharePoint Online Host Web List Data to Dropdownlist in SharePoint Hosted Add-in
- Error occurred in deployment step ‘Install SharePoint Add-in’: The remote server returned an error: (503) Server unavailable
- Error occurred in deployment step ‘Install SharePoint Add-in’: An instance of this App already exists at the specified location.
- SharePoint online Remove app using PowerShell
- The page you selected contains a list that does not exist. It may have been deleted by another user error in SharePoint Add-in
- you are being redirected to the following URL that was not registered as the app launch URL
This SharePoint tutorial, I explained how to resolve the error: Error occurred in deployment step ‘Install SharePoint Add-in’: Failed to install SharePoint Add-in. Please see the output window for details. There was a problem with activating the app web definition. Cannot complete this action, while deploying SharePoint hosted add-in to SharePoint online developer site.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com