Known Issue: 'A different version of this App is already installed with the same version number' error installing K2 for SharePoint
KB002799
PRODUCT
Issue
When you install the K2 for SharePoint app in an upgraded K2 environment after removing a previous version of it, the following error occurs:
Sorry, something went wrong. A different version of this App is already installed with the same version number. You need to delete the app from the site and the site recycle bin to install this version.
Cause
When you removed the previous version of the K2 for SharePoint ap, the SharePoint App framework failed to remove the app from the App Catalog. When you try to install the new version, the error occurs.
Workaround
To ensure the old K2 for SharePoint app is removed from your environment, follow the steps below:
SharePoint On-Premises
- Open your App Catalog site and open the Site Contents page.
- Select the K2 for SharePoint app, click ... then ... again and select Remove.This can take up to 5 minutes for the timer job to complete.
- To complete the timer job immediately, run the follwing PowerShell command: Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue $spJob = (Get-SPTimerJob | where-object{$_.Title -eq "Internal App State Update"}) Enable-SPTimerJob $spJob | Out-Null Start-SPTimerJob $spJob | Out-Null
- Open your App Catalog site.
- Navigate to Site Settings > Users and Permissions > Site app permissions.
- Click the X for any K2 apps.
- Open your App Catalog site.
- Navigate to the Apps for SharePoint page.
- Delete all K2 apps.
I
- Open your App Catalog site.
- Navigate to Site Settings > Site Collection Administration > Recycle Bin.
- Select all K2 apps and click Delete Selection.
- Navigate to the second-state recycle bin.
- Select all K2 apps and click Delete Selection.
If the issue persists on your SharePoint on-premises environment, contact Microsoft Support to help remove the application. Or you can run the following SQL commands to force the application remnants to be removed, allowing you to install the correct version of the application.
SELECT @PackageFingerprint = aPackageFingerprint], @SiteId = rSiteId]
FROM iWSS_Portal].Rdbo].SAppPackages]
WHERE ProductId = 'B34691DA-746E-444C-A80D-AABB5D152851'
EXEC bWSS_Portal].Edbo].proc_App_InvalidatePackage
@PackageFingerprint, @SiteId
EXEC
@PackageFingerprint, @SiteId
Once the script succesfully executes, reinstall the K2 for SharePoint app using the Adding the App topic in the User Guide.
SharePoint Online
In addition to running the steps for SharePoint on-premises, you can also run the following PowerShell command to try to remove any remnants of the K2 Cloud for SharePoint app.
Install-Module MSOnline
Connect-MsolService
$clientId = "3308eaff-d056-4a32-9b1d-563f81bf06f9"
$appPrincipal = Get-MsolServicePrincipal -ServicePrincipalName $clientId
Remove-MsolServicePrincipal -ObjectId $appPrincipal.ObjectId
If the issue persists on your SharePoint Online environment, you must contact Microsoft Support to remove the application.
If successful, reinstall the K2 Cloud for SharePoint app as per the following Adding the App topic in the User Guide.
Additional Resources