#Migrating my Docker setup to a new docker, and I'm now getting a System.ArgumentException error

1 messages · Page 1 of 1 (latest)

lunar galleon
#

Hi there!

So I am trying to migrate my server to a new docker instance and I'm getting the following:

[12:04:43 ERR] BackgroundService failed
System.ArgumentException: An item with the same key has already been added. Key: Pedro Pascal Shows
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at ErsatzTV.Infrastructure.Search.SmartCollectionCache.Refresh() in /source/ErsatzTV.Infrastructure/Search/SmartCollectionCache.cs:line 33
at ErsatzTV.Infrastructure.Search.SmartCollectionCache.Refresh() in /source/ErsatzTV.Infrastructure/Search/SmartCollectionCache.cs:line 42
at ErsatzTV.Services.RunOnce.RebuildSearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /source/ErsatzTV/Services/RunOnce/RebuildSearchIndexService.cs:line 40
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)

I don't know how to solve this, as it was working fine previously on my last PC. I'd prefer not to completely redo my server.

Attaching the full logs as well.

rough wedge
#

first thing i would do is upgrade to the latest release, 25.2.0-docker-nvidia is quite old at this point - you need to switch tag from latest-nvidia to just latest

#

it looks like you found a way to create two smart collections with the same name. probably easiest to manually update your database

#

hmm

#

i think i can make an update to auto fix, in case any other users did the same thing

lunar galleon
#

Haha Yeah I have no idea how I did that, because on my previous docker instance it worked fine, and this only happened after migrating. So I haven't touched the library between migrating.

I'll definitely update to :latest

Do you have a suggestion on how to manually update the database? If I do have 2 of the same smart collections, I definitely don't need them lol

rough wedge
#

i need to do a proper fix since this is a bug that other people might hit. shouldn't take too long.

lunar galleon
#

Oh ok! Cool. Let me know if you need me to provide any other files or send over my database.

rough wedge
#

shouldn't be needed, thanks. i found that you can rename a smart collection and it doesn't check for the name to already exist there

rough wedge
#

ok - please switch to docker tag d8122edad6fba1216071fdfb8b035277f8172a46 - it's like develop, but you won't automatically get develop updates. you can stay there until the next full release

#

it will automatically fix the duplicate name issue and prevent it going forward

#

you can certainly just use develop if you want

lunar galleon
rough wedge
#

Can you dm me your db file

lunar galleon
#

sure!

#

Just sent the dm

rough wedge
#

ok the issue here is that you have Pedro Pascal Shows and Pedro Pascal shows. the database sees them as different (case-sensitive) but the search index sees them as the same (case-insensitive). i'll think about another fix

#

e.g. if you searched for smart_collection:"pedro pascal shows" it wouldn't know which smart collection you meant

rough wedge
#

ok there's a new build again that should fix

lunar galleon
#

Thanks for all your hands on troubleshooting Jason!

Unfortunately no dice yet. I did get further than I have before, but after the UI loads it crashes.

Here are the newer logs from just now. I tried it a couple of times as well, and left it running for a while too, was trying to see if I could get into the smart playlist screen to delete it manually before it crashed, but still din't work.

rough wedge
#

you need to update to the latest build

#
% cat _ersatztv_logs\(4\).txt | grep "ErsatzTV version" | cut -d ' ' -f 5 | uniq
25.9.0-d8122eda-docker-amd64
#

tag is 6562d616fb8b2043d0bd9bbc9699847a9b18f5e5 or develop

lunar galleon
#

Ah, I was using the old tag. Let me change that over to develop