Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating metadata #3412

Closed
infinitel8p opened this issue Nov 26, 2024 · 10 comments · Fixed by #3422
Closed

Error updating metadata #3412

infinitel8p opened this issue Nov 26, 2024 · 10 comments · Fixed by #3422
Labels
needs-triage Needs to be triaged by a developer and assigned a release

Comments

@infinitel8p
Copy link

infinitel8p commented Nov 26, 2024

What happened?

When updating metadata on some of them i get:

400 Error
Could not update metadata

The relevant log shows a windows path even though im running raspbian. Looks like #3350

What did you expect?

It's supposed to update the metadata without any error.

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.4 - Stable

What operating system is Kavita being hosted from?

Linux

If the issue is being seen on Desktop, what OS are you running where you see the issue?

None

If the issue is being seen in the UI, what browsers are you seeing the problem on?

No response

If the issue is being seen on Mobile, what OS are you running where you see the issue?

None

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

No response

Relevant log output

[Kavita] [2024-11-26 10:44:43.098 +01:00  167] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/series/metadata responded 400 in 17.1126 ms
[Kavita] [2024-11-26 10:45:32.032 +01:00  64] [Error] API.Services.SeriesService There was an exception when updating metadata
System.ArgumentException: An item with the same key has already been added. Key: youheitakemura
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at API.Services.SeriesService.HandlePeopleUpdateAsync(SeriesMetadata metadata, ICollection`1 peopleDtos, PersonRole role) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs:line 343
   at API.Services.SeriesService.UpdateSeriesMetadata(UpdateSeriesMetadataDto updateSeriesMetadataDto) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs:line 215
[Kavita] [2024-11-26 10:45:32.034 +01:00  64] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/series/metadata responded 400 in 15.6570 ms
[Kavita] [2024-11-26 10:45:40.124 +01:00  41] [Error] API.Services.SeriesService There was an exception when updating metadata
System.ArgumentException: An item with the same key has already been added. Key: youheitakemura
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](List`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at API.Services.SeriesService.HandlePeopleUpdateAsync(SeriesMetadata metadata, ICollection`1 peopleDtos, PersonRole role) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs:line 343
   at API.Services.SeriesService.UpdateSeriesMetadata(UpdateSeriesMetadataDto updateSeriesMetadataDto) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs:line 215

Additional Notes

Running on a Raspberry Pi 5

@infinitel8p infinitel8p added the needs-triage Needs to be triaged by a developer and assigned a release label Nov 26, 2024
@majora2007
Copy link
Member

Did you run any of the nightlies before the stable launch?

@infinitel8p
Copy link
Author

No i didnt, i was on v0.8.3.2 stable until i did the update today. I also dont know if this path should even be in my logs C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs

@majora2007
Copy link
Member

That's fine. It's the debug symbols from my machine.

Does the file have pre-existing metadata on it? Can you show me the different states? Like initial State X, What you added via the UI Y?

@infinitel8p
Copy link
Author

infinitel8p commented Nov 26, 2024

yes they already have metadata, the files usually are already automatically populated through komf. since i could not save my manual changes the files are the same after me trying to add stuff manually through the ui.

i have multiple manga i cant edit anymore, neither manually through webui nor through komf, its as ive they are locked while tze rest works fine as usual

if you need/want to see something specific ill gladly provide it as soon as im in front of my pc again

@majora2007
Copy link
Member

Pick one as an example, send me the comic info inside the file and an image of what you're making the manual modifications of. I can't reproduce this locally, so I need as much information as possible.

@infinitel8p
Copy link
Author

infinitel8p commented Nov 26, 2024

<?xml version="1.0" encoding="utf-8"?>
<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Title>Chapter 1</Title>
    <Series>Chronicles of the Demon Faction</Series>
    <PageCount>15</PageCount>
</ComicInfo>
Bildschirmfoto 2024-11-26 um 16 36 40

Is this actually all you need or did i get this wrong? This is the comicinfo.xml inside chapter 1 of the series.
Where does Kavita usually save the information i manually add? In the screenshot i tried changing the age rating to rating pending

@majora2007
Copy link
Member

I need the People UI showing.

Out of curiosity, why not tag your files with ComicInfo?

@infinitel8p
Copy link
Author

infinitel8p commented Nov 26, 2024

im using hakuneko to download and since it directly saves them as cbz thats the comic info i end up with. i didnt/dont know what i could and should put in there and since it always worked like that and usually requires no work from my side besides downloading and identifying new series with komf i just stayed with that :)

Here is a updated log for this specific manga when trying to change age rating (as the one earlier was for some other)

[Kavita] [2024-11-26 22:29:59.454 +01:00  120] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/series/all-related?seriesId=677 responded 200 in 16.9622 ms
[Kavita] [2024-11-26 22:29:59.496 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/series/series-detail?seriesId=677 responded 200 in 58.7987 ms
[Kavita] [2024-11-26 22:29:59.518 +01:00  118] [Information] API.Services.Tasks.Metadata.CoverDbService Kavita has already tried to fetch from https://comic.naver.com and failed. Skipping duplicate check
[Kavita] [2024-11-26 22:30:01.406 +01:00  120] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/publication-status responded 200 in 0.5818 ms
[Kavita] [2024-11-26 22:30:01.406 +01:00  40] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/age-ratings responded 200 in 0.5901 ms
[Kavita] [2024-11-26 22:30:01.411 +01:00  62] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/series/metadata?seriesId=677 responded 200 in 5.6235 ms
[Kavita] [2024-11-26 22:30:01.418 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/all-languages responded 200 in 13.1080 ms
[Kavita] [2024-11-26 22:30:01.431 +01:00  120] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/series/volumes?seriesId=677 responded 200 in 24.1861 ms
[Kavita] [2024-11-26 22:30:01.449 +01:00  40] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/people responded 200 in 10.4520 ms
[Kavita] [2024-11-26 22:30:01.464 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/people responded 200 in 9.9666 ms
[Kavita] [2024-11-26 22:30:01.479 +01:00  40] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/people responded 200 in 9.9334 ms
[Kavita] [2024-11-26 22:30:01.494 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/people responded 200 in 9.9141 ms
[Kavita] [2024-11-26 22:30:01.509 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/people responded 200 in 9.8532 ms
[Kavita] [2024-11-26 22:30:01.536 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP GET /api/metadata/people responded 200 in 9.8494 ms
[Kavita] [2024-11-26 22:30:06.418 +01:00  91] [Error] API.Services.SeriesService There was an exception when updating metadata
System.ArgumentException: An item with the same key has already been added. Key: posstudio
   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,TElement](List`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at API.Services.SeriesService.HandlePeopleUpdateAsync(SeriesMetadata metadata, ICollection`1 peopleDtos, PersonRole role) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs:line 346
   at API.Services.SeriesService.UpdateSeriesMetadata(UpdateSeriesMetadataDto updateSeriesMetadataDto) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\SeriesService.cs:line 215
[Kavita] [2024-11-26 22:30:06.421 +01:00  91] [Information] Serilog.AspNetCore.RequestLoggingMiddleware HTTP POST /api/series/metadata responded 400 in 13.2504 ms

and here is the screenshot (below colorist there are no other entries)
Bildschirmfoto 2024-11-26 um 22 33 43

I have some manga that seem to always throw the error but i also noticed that i can trigger the error on a manga that initially doesnt throw it - when i let the metadata populate through komfs Auto-Identify and then try to change the age rating for example i got the error aswell so maybe that does something weird aswell?

@Amatsu-Kami
Copy link

I'm getting the same error, I'm using Komf aswell. The problem seems to be that it creates the same person multiple times. For example, for the picture above, POS STUDIO is created 5 times.

@majora2007
Copy link
Member

This will be fixed shortly, a hotfix is going out.

@github-project-automation github-project-automation bot moved this from In Progress to Done in v0.8.4.1 - Hotfix Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs to be triaged by a developer and assigned a release
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants