[GH-ISSUE #309] System.ArgumentException: An item with the same key has already been added. Key: #268

Closed
opened 2026-02-26 11:57:30 +03:00 by kerem · 5 comments
Owner

Originally created by @yourh3ro on GitHub (Oct 28, 2022).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/309

Originally assigned to: @VShawn on GitHub.

  1. Export connetions from MRemoteNG csv
  2. Try Import to PRemoteM

Error:

[T:019][17:42:00.885] Debug`

System.ArgumentException: An item with the same key has already been added. Key: 0a85de34-347f-43bf-a65e-c4e02f75181f
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at PRM.Utils.mRemoteNG.MRemoteNgImporter.GetMRemoteNgItems(String[]& csvLines) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 200 at PRM.Utils.mRemoteNG.MRemoteNgImporter.FromCsv(String csvPath, List1 icons) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 258
at PRM.View.ServerListPageViewModel.<>c__DisplayClass49_0.<get_CmdImportFromCsv>b__1() in D:\DemoProject\PRemoteM-NET6\Ui\View\ServerListPageViewModel.cs:line 361

StackTrace: at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at PRM.Utils.mRemoteNG.MRemoteNgImporter.GetMRemoteNgItems(String[]& csvLines) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 200 at PRM.Utils.mRemoteNG.MRemoteNgImporter.FromCsv(String csvPath, List1 icons) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 258
at PRM.View.ServerListPageViewModel.<>c__DisplayClass49_0.<get_CmdImportFromCsv>b__1() in D:\DemoProject\PRemoteM-NET6\Ui\View\ServerListPageViewModel.cs:line 361`

But I don't have any connections. I tried to delete all the program files, the database and do it from scratch. I always see this error.

Originally created by @yourh3ro on GitHub (Oct 28, 2022). Original GitHub issue: https://github.com/1Remote/1Remote/issues/309 Originally assigned to: @VShawn on GitHub. 1. Export connetions from MRemoteNG csv 2. Try Import to PRemoteM Error: `[T:019][17:42:00.885] `Debug` > System.ArgumentException: An item with the same key has already been added. Key: 0a85de34-347f-43bf-a65e-c4e02f75181f at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at PRM.Utils.mRemoteNG.MRemoteNgImporter.GetMRemoteNgItems(String[]& csvLines) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 200 at PRM.Utils.mRemoteNG.MRemoteNgImporter.FromCsv(String csvPath, List`1 icons) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 258 at PRM.View.ServerListPageViewModel.<>c__DisplayClass49_0.<get_CmdImportFromCsv>b__1() in D:\DemoProject\PRemoteM-NET6\Ui\View\ServerListPageViewModel.cs:line 361 > StackTrace: at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at PRM.Utils.mRemoteNG.MRemoteNgImporter.GetMRemoteNgItems(String[]& csvLines) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 200 at PRM.Utils.mRemoteNG.MRemoteNgImporter.FromCsv(String csvPath, List`1 icons) in D:\DemoProject\PRemoteM-NET6\Ui\Utils\mRemoteNG\mRemoteNGImporter.cs:line 258 at PRM.View.ServerListPageViewModel.<>c__DisplayClass49_0.<get_CmdImportFromCsv>b__1() in D:\DemoProject\PRemoteM-NET6\Ui\View\ServerListPageViewModel.cs:line 361` But I don't have any connections. I tried to delete all the program files, the database and do it from scratch. I always see this error.
kerem 2026-02-26 11:57:30 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@VShawn commented on GitHub (Oct 29, 2022):

I made a test for the improt and confirm it works.

image

could you please check if there is a duplicate Id in your csv file form mRemoteNG?

image

Maybe mRemoteNG will export a same Id twice in some case, we can find out how it come out :)

<!-- gh-comment-id:1295672531 --> @VShawn commented on GitHub (Oct 29, 2022): I made a test for the improt and confirm it works. ![image](https://user-images.githubusercontent.com/10143738/198754897-d93898f6-0017-450d-b82d-bdd20c1cd55a.png) could you please check if there is a duplicate Id in your csv file form mRemoteNG? ![image](https://user-images.githubusercontent.com/10143738/198755022-fa315e3b-31f1-4966-92ac-24c707a4b615.png) Maybe mRemoteNG will export a same Id twice in some case, we can find out how it come out :)
Author
Owner

@yourh3ro commented on GitHub (Oct 29, 2022):

Yes! I exported my entire list of 700+ connections and there were several duplicates. When I removed the duplicates, the connections started to be exported... I waited for more than an hour, but I didn't get it. Then I tried to export one group (~20 connections), everything turned out successfully.
Still, there are very few connection directories like in mRemoteNG. Even with the number of ~ 100 connections, it is difficult to navigate, and if there are 200-400-600 of them...

<!-- gh-comment-id:1295849640 --> @yourh3ro commented on GitHub (Oct 29, 2022): Yes! I exported my entire list of 700+ connections and there were several duplicates. When I removed the duplicates, the connections started to be exported... I waited for more than an hour, but I didn't get it. Then I tried to export one group (~20 connections), everything turned out successfully. Still, there are very few connection directories like in mRemoteNG. Even with the number of ~ 100 connections, it is difficult to navigate, and if there are 200-400-600 of them...
Author
Owner

@VShawn commented on GitHub (Oct 30, 2022):

FYI, PRemoteM may hard to handle 700+ connections, it design to serve about 50+ connections.

I never test the performance on that large number of connections.

That means, you may get stuck or frozen when search something with PRemoteM.

So just let me know if you have any needs.

<!-- gh-comment-id:1296066769 --> @VShawn commented on GitHub (Oct 30, 2022): FYI, PRemoteM may hard to handle 700+ connections, it design to serve about 50+ connections. I never test the performance on that large number of connections. That means, you may get stuck or frozen when search something with PRemoteM. So just let me know if you have any needs.
Author
Owner

@majkinetor commented on GitHub (Oct 30, 2022):

FYI, PRemoteM may hard to handle 700+ connections, it design to serve about 50+ connections.

It should handle many more then 700 connections. What is so performance problematic in 1000 connections ? Not talking about Running the connections, but about managing them.

People that need remote management usually have more then 50.

<!-- gh-comment-id:1296241943 --> @majkinetor commented on GitHub (Oct 30, 2022): > FYI, PRemoteM may hard to handle 700+ connections, it design to serve about 50+ connections. It should handle many more then 700 connections. What is so performance problematic in 1000 connections ? Not talking about Running the connections, but about managing them. People that need remote management usually have more then 50.
Author
Owner

@VShawn commented on GitHub (Oct 31, 2022):

What is so performance problematic in 1000 connections ?

Because of the low render performance. New search keyword makes the list redraw, that cost much time Even though I have virtualization turned on.

<!-- gh-comment-id:1296511298 --> @VShawn commented on GitHub (Oct 31, 2022): > What is so performance problematic in 1000 connections ? Because of the low render performance. New search keyword makes the list redraw, that cost much time Even though I have virtualization turned on.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/1Remote#268
No description provided.