Home > Forum > Data sources > System.ArgumentException: An item with the same key has already been added. Key: (311, 5116)

System.ArgumentException: An item with the same key has already been added. Key: (311, 5116)
0

After app migration between enviroments strange error occured which shows up every time existing instance is opened or new instance is started in all apps. Reverting back the previous version of the app did not solve the problem. Designer studio throws the error on clicking every item as well. Restarting server did not help.
Has anyone came acress similar issue? Any ideas on how to find the source of the problem?
What does the phrase Key: (311, 5116) refer to?
Thanks in advance.

Designer studio error message:

Typ: System.ArgumentException
-------------------------------------------------------

Wiadomość:Element o tym samym kluczu został już dodany.
-------------------------------------------------------

Ścieżka wywołania
-------------------------------------------------------
w System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

w System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)

w System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)

w WebCon.WorkFlow.Data.Caching.Collections.AttributeDocTypeAssocCacheEntityCollection.<Init>b__6_0()

w WebCon.WorkFlow.Data.Caching.LazyEx`1.get_Value()

w WebCon.WorkFlow.Data.Caching.Collections.AttributeDocTypeAssocCacheEntityCollection.TryGetByAssociation(Int32 dtypeId, Int32 wfconId)

w WebCon.WorkFlow.Studio.Logic.Managers.AttributeDocumentTypeAssocsManager.GetAssociations(DocumentType documentType)

w WebCon.WorkFlow.Studio.Logic.Managers.DocumentTypesManager.FillDocumentTypes(DocumentTypesCollection documentTypes, Int32 procID, ICacheStore cacheStore)

w WebCon.WorkFlow.Studio.Logic.Managers.ProcessesManager.FillProcessData(Process process)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessControl.set_DataSource(Process value)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessView.ProcessViewPresenterBase`2.Plug(TDataSource dataSource)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessView.SetDataSourceInner[TDataSource](ProcessNodeGroup processNodeGroup, IProcessViewPresenterBase`1 chosenPresenter, TDataSource dataSource)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessView.SetDataSourceInner[TDataSource](ProcessNodeGroup processNodeGroup, IProcessViewPresenterBase`1 chosenPresenter, TDataSource dataSource, StudioWaitStats waitStats)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessView.SetDataSource(Process process)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessController.SetViewDataSource(IProcessVirtualNode dataSource)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessController.HandlePanelFocusedNodeChangedImpl(IProcessVirtualNode node)

w DevExpress.XtraTreeList.TreeList.RaiseAfterFocusNode(TreeListNode node)

w DevExpress.XtraTreeList.TreeList.InternalSetFocusedRowIndex(Int32 newFocusedRowIndex)

w DevExpress.XtraTreeList.TreeList.SetFocusedNode(TreeListNode node)

w WebCon.WorkFlow.Studio.Forms.ModuleProcess.ProcessPanel.HandleShowMenu(MouseEventArgs e)

w System.Windows.Forms.Control.OnMouseClick(MouseEventArgs e)

w System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

w System.Windows.Forms.Control.WndProc(Message& m)

w DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message& m)

w DevExpress.XtraTreeList.TreeList.WndProc(Message& m)

w System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Web browser error message:

url: https://webcon-dev.pol.ad.egisplc.com/api/nav/db/1/app/28/element/15852/desktop | action: Get
ip: 10.210.1.14 | msg: An unhandled exception has occurred while executing the request. | agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 | href: | ex: System.ArgumentException: An item with the same key has already been added. Key: (311, 5116)
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](TSource[] source, Func`2 keySelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
at WebCon.WorkFlow.Data.Caching.Collections.AttributeDocTypeAssocCacheEntityCollection.<Init>b__6_0()
at WebCon.WorkFlow.Data.Caching.LazyEx`1.get_Value()
at WebCon.WorkFlow.Data.Caching.Collections.AttributeDocTypeAssocCacheEntityCollection.TryGetByAssociation(Int32 dtypeId, Int32 wfconId)
at WebCon.WorkFlow.Data.Caching.CacheStore.<>c__DisplayClass855_1.<GetWFStepOrderedStepFormFields>b__6(WFStepFormFieldCacheEntity stepFormField)
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToArray()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.OrderedEnumerable`1.GetEnumerator()+MoveNext()
at System.Linq.Enumerable.SelectIPartitionIterator`2.MoveNext()
at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
at System.Linq.Lookup`2.Create[TSource](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToLookup[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToLookup[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at WebCon.WorkFlow.Data.Caching.CacheStore.<>c__DisplayClass855_0.<GetWFStepOrderedStepFormFields>b__0()
at WebCon.WorkFlow.Data.Caching.Entities.Relations.CacheEntityFKRelationStore`1.GetRelation(Int32 id, Func`1 getEntity)
at WebCon.WorkFlow.Data.Caching.CacheStore.GetWFStepOrderedStepFormFields(WFStepFormCacheEntity entity)
at WebCon.WorkFlow.Data.Caching.TypedCacheStore.GetWFStepOrderedStepFormFields(WFStepFormCacheEntity entity)
at WebCon.WorkFlow.Data.Caching.Entities.WFStepFormCacheEntityExtension.OrderedStepFormFieldsForDocType(WFStepFormCacheEntity entity, Int32 dtypeId, ICacheStore cs)
at WebCon.WorkFlow.Base.DataHelpers.StepFormsDataHelper.GetAllStepFormFields(Int32 stepFormId, Int32 docTypeId, ICacheStore cacheStore)
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.FormFields.Generation.FormFieldsGenerationParamsProvider.GetAttributesToGenerate()
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.FormFields.FormFieldsLoader.Fill(ElementForm form, Action`1 formFieldsSetter)
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.ElementFormObjects.Fields.ElementFormFieldsLoader.Fill(ElementForm form)
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.ElementFormObjects.Fields.ElementFormFields.Fill(ElementForm form)
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.ExistingElementFormCreator.GetExistingElementForm(GetExistingElementFormParams args)
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.ElementFormManagerFacade.<>c__DisplayClass9_0.<GetExistingElementForm>b__0()
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.ElementFormManagerFacade.WrapInOpenUsage(Func`1 func, Nullable`1 id)
at WebCon.WorkFlow.Base.BusinessLogic.ElementManagement.ElementFormManagerFacade.GetExistingElementForm(GetExistingElementFormParams args)
at WebCon.BPSCloud.Core.WfDynamic.Helpers.WFDynamicFormLoaderLogic.GetExistingElementForm()
at WebCon.BPSCloud.Core.WfDynamic.Helpers.WFDynamicFormLoaderLogic.LoadProperForm()
at WebCon.BPSCloud.Core.WfDynamic.WFDynamicFormLoader.LoadForm(IWFDynamicFormLoaderParams requestParams, UpdateFrom updateFrom)
at WebCon.BPSCloud.Core.WfDynamic.WFDynamicLiteManager.LoadExistingElementForm(IWFDynamicFormLoader formLoader, WFDynamicFormLoaderParams formLoaderParams, DisplayMode displayMode)
at WebCon.BPSCloud.Core.WfDynamic.WFDynamicLiteManager.LoadJsModel(IWFDynamicFormLoader formLoader, WFDynamicFormLoaderParams formLoaderParams, DisplayMode displayMode)
at WebCon.BPSCloud.Core.Elements.ExistingElementsManager.Get(ElementInfo existenceAndMode, DisplayMode displayMode)
at WebCon.BPSCloud.Core.Elements.ExistingElementsManager.GetDesktop(Boolean isCompact)
at WebCon.BPSCloud.Core.Elements.ExistingElementsManager.GetDesktop()
at WebCon.BPSCloud.Portal.API.FormConfigChangedController.Get(IElementsManager elementsManager, String displayMode)
at WebCon.BPSCloud.Portal.API.FormsController.Get(Int32 wfdId, String displayMode, String editMode, Nullable`1 historicalVersionId, Boolean isStandardMode, Nullable`1 workFlowId, Nullable`1 docTypeId)
at lambda_method1283(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at WebCon.BPSCloud.Portal.Extensions.LicenceSetupMiddleware.InvokeAsync(HttpContext context)
at JSNLog.JSNLogMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at WebCon.BPSCloud.Portal.Extensions.RouteValuesTypeVerificationMiddleware.InvokeAsync(HttpContext context)
at WebCon.BPSCloud.Portal.Extensions.DesignerDesk.DesignerDeskActiveContextMiddleware.NotActive(HttpContext context)
at WebCon.BPSCloud.Portal.Extensions.DesignerDesk.DesignerDeskActiveContextMiddleware.InvokeAsync(HttpContext context)
at WebCon.BPSCloud.Portal.Extensions.DebugInfo.DebugInfoMiddleware.Invoke(HttpContext context, IDebugInfoGetter debugInfoGetter, IPerformanceCounterFactory counterFactory, IFrontendTraceProvider formatter, IDefaultableDbInfoProvider defaultableDbInfoProvider, IUserCredentialsManager userCredentialsManager, IDebugInfoManager debugInfoManager, IHttpContext synchronizedHttpCtx)
at WebCon.BPSCloud.Portal.Extensions.RestApiLogging.RestApiLoggingMiddleware.Invoke(HttpContext context, IPerformanceCounterFactory counterFactory, IVersionPathParser versionParser, ICurrentUserProvider userProvider, IRestApiLoggingManager restApiLoggingManager)
at WebCon.BPSCloud.Portal.Extensions.RestApiLogging.RestApiStatusCodeMiddleware.Invoke(HttpContext context, IApiLogger apiLogger)
at WebCon.BpsCloud.IdentityServer.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events)
at WebCon.BpsCloud.IdentityServer.Hosting.MutualTlsTokenEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at WebCon.BpsCloud.IdentityServer.Hosting.BaseUrlMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at WebCon.BPSCloud.Portal.Extensions.DesignerDesk.DesignerDeskContextMiddleware.InvokeAsync(HttpContext context)
at WebCon.BPSCloud.Portal.Extensions.MainContext.MainContextMiddleware.Invoke(HttpContext context, IDbRegistrator dbRegistrator, IHttpContextAccessor httpContextAccessor)
at WebCon.BPSCloud.Portal.Extensions.Transactions.TransactionManagerMiddleware.Invoke(HttpContext context, ITransactionMgrFactorySetter transactionMgrFactorySetter)
at WebCon.BPSCloud.Identity.MSOFBA.MSOFBAuthenticationMiddleware.Invoke(HttpContext context)
at WebCon.BPSCloud.Identity.Token.TokenEnforceMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.ResponseCaching.ResponseCachingMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

Nobody has replied in this thread yet.