When using Citrix Receiver (running in Mac 11) to log on to StoreFront, the applications fail to enumerate. An internal server error occurs in the client device.
The following is the log trace of the issue in StoreFront server:
Log Name: Citrix Delivery Services Source: WebApplication Date: 06/02/2013 17:36:39 Event ID: 7 Task Category: (2) Level: Error Keywords: Classic User: N/A Computer: Z2T3GBGHVDH53.gb.batgen.com Description: Unhandled exception thrown for route "DazzleResources/List" System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector) at Citrix.DeliveryServices.DazzleResources.Web.Controllers.DazzleSubscriptionsPopulator.Populate(ControllerContext controllerContext, List`1 resources, ResourcesDto resourcesDto) at Citrix.DeliveryServices.ResourcesCommon.Web.Helpers.ResourcePopulatorUtilities.ConvertResources(ControllerContext controllerContext, IEnumerable`1 populators, IEnumerable`1 resourceWrappers) at Citrix.DeliveryServices.DazzleResources.Web.Controllers.DazzleResourcesController.GetResourcesDto(ResourcesEnumerationResult resourcesEnumerationResult, IEnumerable`1 groupNames, HashSet`1 subscriptionStatuses) at Citrix.DeliveryServices.DazzleResources.Web.Controllers.DazzleResourcesController.List(List`1 group, String scope, HashSet`1 subscriptionStatus) at lambda_method(ExecutionScope , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassd.<InvokeActionMethodWithFilters>b__a() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
To resolve the issue, run the following SQL scripts:
To identify the recently created duplicate entries, run:
select id_to_delete
from (select count(id) dup_count, MAX(id) id_to_delete from Subscription group by resource_id, user_id) as dups
where dup_count > 1;
To delete the duplicate entries, run:
delete from Subscription
where id
in (select id_to_delete
from (select count(id) dup_count, MAX(id) id_to_delete from Subscription group by resource_id, user_id) as dups
where dup_count > 1);
Note: When there are more duplicate entries, run the scripts more than once.
When logging in, the duplicate subscriptions are created in the StoreFront database preventing the applications to enumerate. The applications and desktops which are subscribed using the older version of the Citrix Receiver create duplicate entries. For more information refer to Citrix Documentation - Installing, setting up, upgrading, deploying, or removing Receiver for Mac.