Saturday, July 9, 2016

Sorry something went wrong. Please refresh the page and try again error while removing apps from SharePoint 2016

Sometimes you will get an error "Sorry something went wrong. Please refresh the page and try again." while uninstalling apps from SharePoint 2016.

After this when we try to remove the app from the site, then it shows some error like:

Sorry, something went wrong. Please refresh the page and try again. If you will try to refresh and try again the same issue will come.

Also read: Configure On Premise environment for Apps in SharePoint 2016

Also we try to remove using PowerShell like below:

Add-PSSnapin Microsoft.SharePoint.PowerShell
$AppName="My Announcements App"

$appInstance = Get-SPAppInstance -Web "http://SiteURL/" | where-object {$_.Title -eq $AppName}

if ($appInstance -ne $null)
{
Uninstall-SPAppInstance –Identity $appInstance
}

But it also gave error like below:

Uninstall-SPAppInstance : The System Account cannot perform this action.
At line:8 char:1
+ Uninstall-SPAppInstance –Identity $appInstance
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (Microsoft.Share...pInstanceCmdlet:UninstallSPAppInstanceCmdlet) [Uninstall-SPAppInstance], InvalidOperatio
   nException
    + FullyQualifiedErrorId : Microsoft.SharePoint.Administration.SPAppCmdlets.UninstallSPAppInstanceCmdlet


Solution:
The problem was coming because we were using System Account to remove the App.

When we check out the Details about the App, we can see the App is installed by someone else which looks like below:

Then I logged in with the other user and then I tried to remove the app. This time it successfully removed.

Read an article on: Microsoft Flow Step by Step Tutorial with Examples


Twitter Delicious Facebook Digg Favorites More