Symptoms
We have a problem to activate K2 features in some Sharepoint site collections (not all).
Diagnoses
In the log file, we found this error:
"1442586","2017-01-19 17:52:49","Error","General","0","ErrorMessage","1","0 SharePointRoleProvider.GetGroups: System.Reflection.TargetInvocationException: An unexpected failure was encountered when contacting SharePoint to get information from the group provider INTRANET: Group cannot be found. ---> System.Exception: Group cannot be found.
at SourceCode.SharePoint15.Client.CSOMFunctions.GroupFunctions.LoadGroup(Group group, Boolean throwException)
at SourceCode.Security.Providers.SharePoint.Shared.SPCsomClient.SourceCode.Security.Providers.SharePoint.Shared.ISPGroupProviderClient.GetGroup(String groupName)
--- End of inner exception stack trace ---","anonymous","0.0.0.0","K22016:C:Program Files (x86)K2 blackpearlHost ServerBin","1442586","56e8f65158664023a656d2080110bec5",""
and
"1443327","2017-01-19 17:53:14","Error","General","0","ErrorMessage","SharePoint Broker","0 Microsoft.SharePoint.Client.ServerException: Group cannot be found.
at SourceCode.SmartObjects.Services.SharePoint.TransientPlanExecutor.ExecutePlan()
at SourceCode.SmartObjects.Services.SharePoint.Operations.SPGroup.GroupExecutableObject.GetGroupTitlesForIds()
at SourceCode.SmartObjects.Services.SharePoint.Operations.SPGroup.GroupExecutableObject.ExecuteObject()
at SourceCode.SmartObjects.Services.SharePoint.SharePointService.Execute(). Additional info: Group cannot be found.SPRequestGuid : 259dcc9d-f0b0-3000-ac9f-6315f9f9eb83
Broker Method : GetGroupTitlesForIds
For these error messages, could you go to the K2 workspace/Management/Management Console/User Managers > SP > Group Providers and check if the url corresponding to the Group provide INTRANET is correct.
For the error "Data at the root level is invalid", the issue could be linked to some smart object already present for the current site collection.
Could you try to remove manually these smart objects?
Resolution
Finally the issue of on the SharePoint Site collection has been fixed by
1) Go to the AppCatalog
2) choose "Manage App Activations"
3) Remove all sites
4) Re-Add necessary Site collection