Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
5.91k stars 304 forks source link

Hangfire - Index must be within the bounds of the List #2783

Closed DieselTech closed 5 months ago

DieselTech commented 6 months ago

What happened?

majora2007 (Joe) — Today at 4:29 PM

That one is def a bug but not related to the changes. I can def look into this. Throw a bug up for it.

What did you expect?

hangfire not to hang.

Kavita Version Number - Don't see your version number listed? Then your install is out of date. Please update and see if your issue still persists.

Nightly Testing Branch

What operating system is Kavita being hosted from?

Docker (Dockerhub Container)

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 UI, what browsers are you seeing the problem on?

No response

Relevant log output

[Kavita] [2024-03-15 07:14:12.369 -04:00  37] [Error] Hangfire.AutomaticRetryAttribute Failed to process the job 'f6cff69e-7b94-4b17-9cd2-69add0a81627': an exception occurred.
System.ArgumentOutOfRangeException: Index must be within the bounds of the List. (Parameter 'index')
   at API.Helpers.OrderableHelper.ReorderItems(List`1 items, Int32 readingListItemId, Int32 toPosition) in /home/runner/work/Kavita/Kavita/API/Helpers/OrderableHelper.cs:line 53
   at API.Services.ReadingListService.CreateReadingListsFromSeries(Series series, Library library) in /home/runner/work/Kavita/Kavita/API/Services/ReadingListService.cs:line 483
   at API.Services.ReadingListService.CreateReadingListsFromSeries(Int32 libraryId, Int32 seriesId) in /home/runner/work/Kavita/Kavita/API/Services/ReadingListService.cs:line 423
   at InvokeStub_TaskAwaiter.GetResult(Object, Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Additional Notes

No response

majora2007 commented 6 months ago

Notes from initial look. Seems to be toPosition being out of range, likely a negative number as this is list and not array based.