Symptoms
Numerous errors in K2 logs:
SharePointRoleProvider.GetGroups: System.Reflection.TargetInvocationException: An unexpected failure was encountered when contacting SharePoint to get information from the group provider %GROUP PROVIDER NAME%: The SharePoint server has indicated that the web service could not be found. Consider updating the group provider configuration. ---> System.Net.WebException: The request failed with HTTP status 404: Not Found.
These error started to occur after URL of web application was changed on SharePoint farm. This is happening despite URL for related group provider(s) was updated via K2 Workspace GUI (K2 Workspace > Management Console > User Managers > SP > Group Providers).
Diagnoses
K2 for SharePoint app was not removed from the site before changing web app URL, which most likely caused this issue. Apart from error mentioned above there was an issue of opening/removing K2 app from the site.
Resolution
Following steps were used to resolve this:
1. Remove app via PowerShell script by productId (see RemoveAPP.zip attached)
2. Next remove problematic group provider from eK2].oHostServer].SGroupProvider] * Make sure to backup K2 DB before doing this
3. Assuming you removed app with no issue on step (1), please add it again and if it works run Registration Wizard for K2 app - this process will create group provider for specific site correctly. This step is necessary if you still need K2 app on this site.