# Internal Error

**URL:** <https://forum.manager.io/t/internal-error/36313>\
**Category:** Uncategorized\
**Created:** [July 29, 2021, 11:46am UTC](https://forum.manager.io/t/internal-error/36313 "2021-07-29T11:46:50Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 11:46am UTC](https://forum.manager.io/t/internal-error/36313/1 "2021-07-29T11:46:51Z")

</div>

Hi Team,

I have been using manager for some time now. Today when I open my company in manager I got the following internal Error. This error comes up even when I use the files from the backup. Can anyone help?

Uploading: image.png…

System.AggregateException: One or more errors occurred. (An item with the same key has already been added. Key: a227bc14-3229-48ae-a7f1-6d01022f07d2)  
—\> System.ArgumentException: An item with the same key has already been added. Key: a227bc14-3229-48ae-a7f1-6d01022f07d2  
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey](ParallelQuery`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)  
— End of inner exception stack trace —  
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey](ParallelQuery`1 source, Func`2 keySelector, IEqualityComparer`1 comparer) at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey](ParallelQuery`1 source, Func`2 keySelector)  
at Manager.ApplicationData.Get(String entityId) in C:\projects\manager\Manager\ApplicationData.cs:line 125  
at Manager.ApplicationData.Get(Byte entityId) in C:\projects\manager\Manager\ApplicationData.cs:line 106  
at ManagerServer.HttpHandlers.Businesses.Business.Start.InnerGet() in C:\projects\manager\ManagerServer\HttpHandlers\Businesses\Business\Start.cs:line 24  
at ManagerServer.HttpHandlers.Template.Get() in C:\projects\manager\ManagerServer\HttpHandlers\Template.cs:line 321  
at ManagerServer.HttpHandlers.HttpHandler.ProcessRequest() in C:\projects\manager\ManagerServer\HttpHandlers\HttpHandler.cs:line 146  
at ManagerServer.Startup.\<\>c.\<b\_\_1\_1\>d.MoveNext() in C:\projects\manager\ManagerServer\Startup.cs:line 89  
— End of stack trace from previous location —  
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.g\_\_Awaited|6\_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [July 29, 2021, 11:56am UTC](https://forum.manager.io/t/internal-error/36313/2 "2021-07-29T11:56:19Z")

</div>

What edition and version of Manager are you using?

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 11:59am UTC](https://forum.manager.io/t/internal-error/36313/3 "2021-07-29T11:59:21Z")

</div>

I am currently using window destop edition 21.7.52

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [July 29, 2021, 12:17pm UTC](https://forum.manager.io/t/internal-error/36313/4 "2021-07-29T12:17:03Z")

</div>

Can you explain when this error occurs?

Do you get a list of tour businesses?

Where are your business files stored?

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [July 29, 2021, 1:03pm UTC](https://forum.manager.io/t/internal-error/36313/5 "2021-07-29T13:03:36Z")

</div>

V21.7.52 is the latest version today at this time. You reference that you have been using Manager for a while. So what version number where you using before the update and is it a Windows, macOS, Linux, Cloud or Server edition. Then how did you do the upgrade to the latest version and what are the steps you took to get the error message as asked by @Joe91

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 1:05pm UTC](https://forum.manager.io/t/internal-error/36313/6 "2021-07-29T13:05:52Z")

</div>

Yes I do get a list of businesses I have two of them, one works okay the other give this error when I tried to gain access into it. I then romeved the business and and attached one from a backup file, it open once and the second time it give me the same error messages. Files are stored on my “C” drive.

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [July 29, 2021, 1:07pm UTC](https://forum.manager.io/t/internal-error/36313/7 "2021-07-29T13:07:30Z")

</div>

And where did you tell Manager (bottom left) screen where business are stored to store the business. You maybe importing somehting at exact the same place as where it already is… (Just a wild guess.)

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 1:46pm UTC](https://forum.manager.io/t/internal-error/36313/8 "2021-07-29T13:46:27Z")

</div>

The current defualt loction is c:\Users\*\*\*\*\AppData\Local\Manager

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 1:47pm UTC](https://forum.manager.io/t/internal-error/36313/9 "2021-07-29T13:47:40Z")

</div>

About 2 weeks ago I did manager update, and all will well.

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [July 29, 2021, 2:05pm UTC](https://forum.manager.io/t/internal-error/36313/10 "2021-07-29T14:05:08Z")

</div>

Two weeks ago, the version was not 21.7.52 so you must have updated since then

The error message implies that there is a data error in your file - as if it was open twice and a new records added

It is not clear what the duplicate key referenced in the error message is - it could be almost anything in the database

Are you saying that when you import the backup it opens correctly, but if you close it and re-open it there is an error?

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 2:13pm UTC](https://forum.manager.io/t/internal-error/36313/11 "2021-07-29T14:13:34Z")

</div>

The previous 3 backups have the same issue. The first time you attach the backup file it opens and if you go out of manager and log in again then I will get the same error. And yes I did upgrade manager today, I thought that was will solve problem.

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [July 29, 2021, 2:14pm UTC](https://forum.manager.io/t/internal-error/36313/12 "2021-07-29T14:14:50Z")

</div>

That’s almost as if your Manager installation has a problem.

Do you have an previous version of Manager you can restore ?

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [July 29, 2021, 2:24pm UTC](https://forum.manager.io/t/internal-error/36313/13 "2021-07-29T14:24:16Z")

</div>

When you import, did you change the business name?

There could be a problem with duplicate business names

Check what files are in the default Manager folder

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 2:38pm UTC](https://forum.manager.io/t/internal-error/36313/14 "2021-07-29T14:38:07Z")

</div>

![SQLite](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/a/b/ab27613912a68b0cc32a127f1bdf22cf49adc75c.jpeg)  
I have downloaded DB Browser for SQLite and I can see the duplicate, am not sure if it is possible to just delete them?

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 3:01pm UTC](https://forum.manager.io/t/internal-error/36313/15 "2021-07-29T15:01:17Z")

</div>

@Joe91 and @eko Thank you for your help, I have fixed it. DB Browser for SQLite, I attended the manager file, then went on Browse Data, under Table I went to Changes and searched for a duplicate object, I found two of the as shown on the image above I deleted them and also under Table I went from “Changes” table to “Object” table I found two records there as well and I deleted them and I wrote the changes to the database. And wala it works…Thank you so much for jumping in so quick to help.

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [July 29, 2021, 8:54pm UTC](https://forum.manager.io/t/internal-error/36313/16 "2021-07-29T20:54:24Z")

</div>

@Dickson 2 entries with the same `Object` field in `Changes` table is not considered duplicate. However, two entries with the same `Key` field in `Objects` tab is a duplicate. Now, Manager doesn’t know how to handle it because `Key` field is a primary key so the database should ensure it will never happen.

I’m really curious how this could have happened though. If you could send me the broken database (before your fix) to `lubos@manager.io`, I’d appreciate that.

---

<div class="post-metadata">

**Author:** ![Dickson](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/dickson/32/33495_2.png) [@Dickson](https://forum.manager.io/u/Dickson)\
**Post date:** [July 29, 2021, 9:55pm UTC](https://forum.manager.io/t/internal-error/36313/17 "2021-07-29T21:55:09Z")

</div>

@lubos you are quite right when I delete the line on Changes the problem continued and the database only got fixed after I deleted the duplicate under Objects. I fixed the file but I should have copies of it, I will send it through to you. Thanks.

---

<div class="post-metadata">

**Author:** ![Ealfardan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/ealfardan/32/63166_2.png) [@Ealfardan](https://forum.manager.io/u/Ealfardan)\
**Post date:** [January 18, 2023, 2:45pm UTC](https://forum.manager.io/t/internal-error/36313/18 "2023-01-18T14:45:15Z")

</div>

Closed on January 18, 2023, 2:45pm UTC


