C9Glax / tranga

Docker-Container to monitor (Manga) Scanlation-Sites for download new chapters.
GNU General Public License v3.0
157 stars 15 forks source link

App completely broken #289

Closed Hooteo closed 6 hours ago

Hooteo commented 7 hours ago

What is broken?

Today I changed the config in portainer, i created a volume pointing to cifs folder and from that moment tranga is unusable. From web side there is a loop loading API screen and in settings nothing is set. This doesn’t happens everytime and after rebooting the container sometimes the settings are configured but in the manga list only bleach is shown. The permission is ok because i logged in the api container and with the command touch i can create files inside manga repository and the path logs has new info. Attaching logs.

Log-output

_______                                   
|_     _|.----..---.-..-----..-----..---.-.
  |   |  |   _||  _  ||     ||  _  ||  _  |
  |___|  |__|  |___._||__|__||___  ||___._|
                             |_____|       

[12/04/2024 18:39:53.479]       JobBoss | Adding Tranga.Jobs.DownloadNewChapters-638689300428106085.json
[12/04/2024 18:39:53.519]       JobBoss | Adding Job Tranga.Jobs.DownloadNewChapters-638689343935162499 Manga: Publication Bleach 638689343935162499
[12/04/2024 18:39:53.519]       JobBoss | Added Tranga.Jobs.DownloadNewChapters-638689343935162499 Manga: Publication Bleach 638689343935162499
[12/04/2024 18:39:53.520]       JobBoss | Exporting Job /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadNewChapters-638689343935162499.json
[12/04/2024 18:39:53.546]       JobBoss | Adding Tranga.Jobs.DownloadNewChapters-638689343303615961.json
[12/04/2024 18:39:53.547]       JobBoss | Adding Job Tranga.Jobs.DownloadNewChapters-638689343935473905 Manga: Publication Bleach 638689343935473905
[12/04/2024 18:39:53.548]       JobBoss | Already Contains Job Tranga.Jobs.DownloadNewChapters-638689343935473905 Manga: Publication Bleach 638689343935473905
[12/04/2024 18:39:53.548]       JobBoss | Duplicate detected or otherwise not able to add job to list.
Moved job Tranga.Jobs.DownloadNewChapters-638689343935473905 Manga: Publication Bleach 638689343935473905 to /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadNewChapters-638689343303615961.json.duplicate
[12/04/2024 18:39:53.548]       JobBoss | Adding Tranga.Jobs.DownloadChapter-638689277731929076-124.json
[12/04/2024 18:39:53.553]       JobBoss | Adding Job Tranga.Jobs.DownloadChapter-638689343935497893-124 Chapter: Chapter Fairy Tail 638689343935497893 124 
[12/04/2024 18:39:53.553]       JobBoss | Added Tranga.Jobs.DownloadChapter-638689343935497893-124 Chapter: Chapter Fairy Tail 638689343935497893 124 
[12/04/2024 18:39:53.553]       JobBoss | Exporting Job /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689343935497893-124.json
[12/04/2024 18:39:53.557]       JobBoss | Loading Job Tranga.Jobs.DownloadNewChapters-638689343935162499 Manga: Publication Bleach 638689343935162499
[12/04/2024 18:39:53.558]       JobBoss | Loading Job Tranga.Jobs.DownloadChapter-638689343935497893-124 Chapter: Chapter Fairy Tail 638689343935497893 124 
[12/04/2024 18:39:53.560]       JobBoss | Next job in -20061.18:39:53.5598333 Tranga.Jobs.DownloadChapter-638689343935497893-124
[12/04/2024 18:39:53.564]       JobBoss | Adding Job to Queue. Tranga.Jobs.DownloadChapter-638689343935497893-124 Chapter: Chapter Fairy Tail 638689343935497893 124 
[12/04/2024 18:39:53.574]       JobBoss | Deleting Job-file /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689343935497893-124.json
[12/04/2024 18:39:53.574]       JobBoss | Exporting Job /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689343935497893-124.json
[12/04/2024 18:39:53.576]    Mangaworld | Copy cover Publication Fairy Tail 638689343935497893
[12/04/2024 18:39:53.581]        Tranga | {
  "downloadLocation": "/Manga",
  "workingDirectory": "/usr/share/tranga-api",
  "apiPortNumber": 6531,
  "userAgent": "Tranga (Unix; x64) / 1.0",
  "aprilFoolsMode": true,
  "version": 2,
  "requestLimits": {
    "MangaInfo": 250,
    "MangaDexFeed": 250,
    "MangaDexImage": 40,
    "MangaImage": 60,
    "MangaCover": 250,
    "Default": 60
  },
  "bufferLibraryUpdates": false,
  "bufferNotifications": false
}
[12/04/2024 18:39:53.588]        Server | Listening on http://*:6531/
[12/04/2024 18:39:53.605]    Mangaworld | Cover exists Publication Fairy Tail 638689343935497893
[12/04/2024 18:39:53.605]    Mangaworld | Retrieving chapter-info Chapter Fairy Tail 638689343935497893 124  Publication Fairy Tail 638689343935497893
[12/04/2024 18:39:53.675]       JobBoss | Adding Job to Queue. Tranga.Jobs.DownloadNewChapters-638689343935162499 Manga: Publication Bleach 638689343935162499
[12/04/2024 18:39:54.129]    Mangaworld | Downloading Images for /Manga/Fairy Tail/Fairy Tail - Vol.15 Ch.124.cbz
[12/04/2024 18:39:54.176]       JobBoss | Removing Tranga.Jobs.DownloadChapter-638689343935497893-124 Chapter: Chapter Fairy Tail 638689343935497893 124 
[12/04/2024 18:39:54.176] DownloadChapt | Cancelling Tranga.Jobs.DownloadChapter-638689343935497893-124 Chapter: Chapter Fairy Tail 638689343935497893 124 
[12/04/2024 18:39:54.177]       JobBoss | Deleting Job-file /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689343935497893-124.json
[12/04/2024 18:39:54.177]       JobBoss | Next job in -01:39:55.2775473 Tranga.Jobs.DownloadNewChapters-638689343935162499
[12/04/2024 18:39:54.282]    Mangaworld | Getting new Chapters for Publication Bleach 638689343935162499
[12/04/2024 18:39:54.282]    Mangaworld | Getting chapters Publication Bleach 638689343935162499
[12/04/2024 18:39:54.283] HttpDownloadC | Waiting 0.8408502 seconds
[12/04/2024 18:39:55.487]    Mangaworld | Got 705 chapters. Publication Bleach 638689343935162499
Unhandled exception. System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.FormatException: Value could not be parsed
   at Tranga.Chapter.CompareTo(Object obj) in /src/Tranga/Chapter.cs:line 78
   at System.Collections.Generic.ObjectComparer`1.Compare(T x, T y)
   at System.Linq.EnumerableSorter`2.CompareAnyKeys_DefaultComparer_NoNext_Ascending(Int32 index1, Int32 index2)
   at System.Collections.Generic.ArraySortHelper`1.PickPivotAndPartition(Span`1 keys, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.IntrospectiveSort(Span`1 keys, Comparison`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
   --- End of inner exception stack trace ---
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, Comparison`1 comparer)
   at System.MemoryExtensions.Sort[T](Span`1 span, Comparison`1 comparison)
   at System.Linq.EnumerableSorter`2.QuickSort(Int32[] keys, Int32 lo, Int32 hi)
   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
   at System.Linq.OrderedEnumerable`1.SortedMap(Buffer`1 buffer)
   at System.Linq.OrderedEnumerable`1.Fill(Buffer`1 buffer, Span`1 destination)
   at System.Linq.OrderedEnumerable`1.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Tranga.MangaConnectors.Mangaworld.GetChapters(Manga manga, String language) in /src/Tranga/MangaConnectors/Mangaworld.cs:line 141
   at Tranga.MangaConnectors.MangaConnector.GetNewChapters(Manga manga, String language) in /src/Tranga/MangaConnectors/MangaConnector.cs:line 58
   at Tranga.Jobs.DownloadNewChapters.ExecuteReturnSubTasksInternal(JobBoss jobBoss) in /src/Tranga/Jobs/DownloadNewChapters.cs:line 37
   at Tranga.Jobs.Job.ExecuteReturnSubTasks(JobBoss jobBoss) in /src/Tranga/Jobs/Job.cs:line 92
   at Tranga.Jobs.JobBoss.CheckJobs() in /src/Tranga/Jobs/JobBoss.cs:line 279
   at Tranga.Tranga.<StartJobBoss>b__10_0() in /src/Tranga/Tranga.cs:line 75

Additional stuff

I tried to recreate the container from zero

Hooteo commented 7 hours ago

The logs are in loop. Sometimes when it restarts by itself I can access the web page and the only manga I can see is bleach and all the other ones disappeared. If I try to delete bleach the container crash.

C9Glax commented 7 hours ago

Can you pull cuttingedgeagain when this build is done: https://github.com/C9Glax/tranga/actions/runs/12166427356 And post the Exception again?

Looks like there is an issue with parsing Volume/Chapter-numbers from the webpage...

Hooteo commented 6 hours ago

This with image glax/tranga-api:cuttingedge:

[12/04/2024 19:42:43.888]       JobBoss | Adding Tranga.Jobs.DownloadNewChapters-638689300428106085.json
[12/04/2024 19:42:43.928]       JobBoss | Adding Job Tranga.Jobs.DownloadNewChapters-638689381639255827 Manga: Publication Bleach 638689381639255827
[12/04/2024 19:42:43.929]       JobBoss | Added Tranga.Jobs.DownloadNewChapters-638689381639255827 Manga: Publication Bleach 638689381639255827
[12/04/2024 19:42:43.929]       JobBoss | Exporting Job /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadNewChapters-638689381639255827.json
[12/04/2024 19:42:43.956]       JobBoss | Adding Tranga.Jobs.DownloadNewChapters-638689381007051118.json
[12/04/2024 19:42:43.957]       JobBoss | Adding Job Tranga.Jobs.DownloadNewChapters-638689381639572411 Manga: Publication Bleach 638689381639572411
[12/04/2024 19:42:43.958]       JobBoss | Already Contains Job Tranga.Jobs.DownloadNewChapters-638689381639572411 Manga: Publication Bleach 638689381639572411
[12/04/2024 19:42:43.958]       JobBoss | Duplicate detected or otherwise not able to add job to list.
Moved job Tranga.Jobs.DownloadNewChapters-638689381639572411 Manga: Publication Bleach 638689381639572411 to /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadNewChapters-638689381007051118.json.duplicate
[12/04/2024 19:42:43.958]       JobBoss | Adding Tranga.Jobs.DownloadChapter-638689277731929076-124.json
[12/04/2024 19:42:43.963]       JobBoss | Adding Job Tranga.Jobs.DownloadChapter-638689381639594655-124 Chapter: Chapter Fairy Tail 638689381639594655 124 
[12/04/2024 19:42:43.963]       JobBoss | Added Tranga.Jobs.DownloadChapter-638689381639594655-124 Chapter: Chapter Fairy Tail 638689381639594655 124 
[12/04/2024 19:42:43.963]       JobBoss | Exporting Job /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689381639594655-124.json
[12/04/2024 19:42:43.966]       JobBoss | Loading Job Tranga.Jobs.DownloadNewChapters-638689381639255827 Manga: Publication Bleach 638689381639255827
[12/04/2024 19:42:43.967]       JobBoss | Loading Job Tranga.Jobs.DownloadChapter-638689381639594655-124 Chapter: Chapter Fairy Tail 638689381639594655 124 
[12/04/2024 19:42:43.970]       JobBoss | Next job in -20061.19:42:43.9694668 Tranga.Jobs.DownloadChapter-638689381639594655-124
[12/04/2024 19:42:43.973]       JobBoss | Adding Job to Queue. Tranga.Jobs.DownloadChapter-638689381639594655-124 Chapter: Chapter Fairy Tail 638689381639594655 124 
[12/04/2024 19:42:43.983]    Mangaworld | Copy cover Publication Fairy Tail 638689381639594655
[12/04/2024 19:42:43.985]       JobBoss | Deleting Job-file /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689381639594655-124.json
[12/04/2024 19:42:43.985]       JobBoss | Exporting Job /usr/share/tranga-api/jobs/Tranga.Jobs.DownloadChapter-638689381639594655-124.json
[12/04/2024 19:42:43.986]        Tranga | {
  "downloadLocation": "/Manga",
  "workingDirectory": "/usr/share/tranga-api",
  "apiPortNumber": 6531,
  "userAgent": "Tranga (Unix; x64) / 1.0",
  "aprilFoolsMode": true,
  "version": 2,
  "requestLimits": {
    "MangaInfo": 250,
    "MangaDexFeed": 250,
    "MangaDexImage": 40,
    "MangaImage": 60,
    "MangaCover": 250,
    "Default": 60
  },
  "bufferLibraryUpdates": false,
  "bufferNotifications": false
}
[12/04/2024 19:42:43.991]        Server | Listening on http://*:6531/
[12/04/2024 19:42:44.13 ]    Mangaworld | Cover exists Publication Fairy Tail 638689381639594655
[12/04/2024 19:42:44.13 ]    Mangaworld | Retrieving chapter-info Chapter Fairy Tail 638689381639594655 124  Publication Fairy Tail 638689381639594655
[12/04/2024 19:42:44.86 ]       JobBoss | Adding Job to Queue. Tranga.Jobs.DownloadNewChapters-638689381639255827 Manga: Publication Bleach 638689381639255827
C9Glax commented 6 hours ago

Okay, so far no issue?

Hooteo commented 6 hours ago

I still had the issue but now i created again the persistent volume for tranga-api and readded all the mangas. This time with cuttingedge is working and downloading missing episodes.image Can I keep this image? What's the difference with the latest image?

C9Glax commented 6 hours ago

https://github.com/C9Glax/tranga/commit/85d7c07b13943d94dfe3903faaaf75b6f365cfc7 This is the only difference. With the next PR it will be the same again :)