Kea
Kea copied to clipboard
Bug report: Kea hangs on 404 error
Describe the bug When attempting to download "Room of Swords", I got a 404 error. After closing it, the program doesn't progress with the download and is stuck on the image it was trying to download. Repeating this comic download for me always gets a 404 error at around this time.
To Reproduce
- Add https://www.webtoons.com/en/sf/room-of-swords/list?title_no=1261 to your queue.
- I'm saving my comics in a folder using Google Drive File Stream, but this is probably not relevant to the bug.
- Check "each cartoon", and leave "each chapter" unchecked.
- Save chapters as "CBZ"
- Click start.

- After a while, you will get a popup with a 404 error. Closing the error box will have Kea hang on "Currently processing: downloading image 47 of chapter 122 of the comic "room-of-swords"".

Kea Version What version of Kea were you using? Kea v1.3.4
Error text:
Consulte el final de este mensaje para obtener más detalles sobre cómo invocar a la depuración
Just-In-Time (JIT) en lugar de a este cuadro de diálogo.
************** Texto de la excepción **************
System.Net.WebException: Error en el servidor remoto: (404) No se encontró.
en System.Net.WebClient.DownloadFile(Uri address, String fileName)
en Kea.Main.downloadComic(Int32 t)
en Kea.Main.<>c__DisplayClass17_1.<DownloadQueueAsync>b__1()
en System.Threading.Tasks.Task.InnerInvoke()
en System.Threading.Tasks.Task.Execute()
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Kea.Main.<DownloadQueueAsync>d__17.MoveNext()
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
en Kea.Main.<startBtn_Click>d__16.MoveNext()
--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---
en System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
************** Ensamblados cargados **************
mscorlib
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4395.0 built by: NET48REL1LAST_W
Código base: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Kea
Versión del ensamblado: 1.0.0.0
Versión Win32: 1.0.0.0
Código base: file:///C:/Users/hi/Desktop/Kea.v1.3.4/Kea.exe
----------------------------------------
System.Windows.Forms
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4395.0 built by: NET48REL1LAST_W
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4360.0 built by: NET48REL1LAST_C
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4395.0 built by: NET48REL1LAST_W
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4341.0 built by: NET48REL1LAST_C
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4395.0 built by: NET48REL1LAST_W
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4161.0 built by: NET48REL1
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4161.0 built by: NET48REL1
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4161.0 built by: NET48REL1
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_es_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
HtmlAgilityPack
Versión del ensamblado: 1.11.24.0
Versión Win32: 1.11.24
Código base: file:///C:/Users/hi/Desktop/Kea.v1.3.4/HtmlAgilityPack.DLL
----------------------------------------
System.IO.Compression.FileSystem
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4161.0
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.IO.Compression.FileSystem/v4.0_4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll
----------------------------------------
itextsharp
Versión del ensamblado: 5.5.13.1
Versión Win32: 5.5.13.1
Código base: file:///C:/Users/hi/Desktop/Kea.v1.3.4/itextsharp.DLL
----------------------------------------
System.IO.Compression
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4161.0 built by: NET48REL1
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.IO.Compression/v4.0_4.0.0.0__b77a5c561934e089/System.IO.Compression.dll
----------------------------------------
System.resources
Versión del ensamblado: 4.0.0.0
Versión Win32: 4.8.4161.0 built by: NET48REL1
Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.resources.dll
----------------------------------------
************** Depuración JIT **************
Para habilitar la depuración Just In Time (JIT), el archivo de configuración de esta
aplicación o equipo (machine.config) debe tener el
valor jitDebugging establecido en la sección system.windows.forms.
La aplicación también se debe compilar con la depuración
habilitada
Por ejemplo:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Cuando esté habilitada la depuración JIT, cualquier excepción no controlada
se enviará al depurador JIT registrado en el equipo
en lugar de controlarlo mediante el cuadro de diálogo.
Ok, so I looked at the 122nd chapter of room of swords and turns out that the 47th image doesn't exist. (or more accurate: the image link doesn't point to an image file)

So instead of displaying an image it displays the alternative text (as we can see by the alt="image" tag in the html) and the next image is noticeably cut of on the top (were image 47 would have been) here's the link so you can see it for yourself: https://www.webtoons.com/en/sf/room-of-swords/s2-ep-120/viewer?title_no=1261&episode_no=123

So what would be the best way of handling this situation?
Probably implementing a try{}catch{} to skip unavailable or missing images. The resulting PDF / CBZ etc. would be incomplete but at least the download could continue. Replacing the missing image with a "image not found" image would also be an option but let me know what you think about that.
For a quick fix you can re-download room of swords and set the starting chapter to 123 but I'm thinking of refactoring kea massively to also fix the other bugs you mentioned and that might take a while.
Ok, so I looked at the 122nd chapter of room of swords and turns out that the 47th image doesn't exist.
(or more accurate: the image link doesn't point to an image file)
So instead of displaying an image it displays the alternative text (as we can see by the alt="image" tag in the html)
and the next image is noticeably cut of on the top (were image 47 would have been)
here's the link so you can see it for yourself: https://www.webtoons.com/en/sf/room-of-swords/s2-ep-120/viewer?title_no=1261&episode_no=123
So what would be the best way of handling this situation?
Probably implementing a
try{}catch{}to skip unavailable or missing images. The resulting PDF / CBZ etc. would be incomplete but at least the download could continue. Replacing the missing image with a "image not found" image would also be an option but let me know what you think about that.For a quick fix you can re-download room of swords and set the starting chapter to 123 but I'm thinking of refactoring kea massively to also fix the other bugs you mentioned and that might take a while.
Ooh, I like your idea of showing an "Image Not Found", which would make it really easy to diagnose errors, then showing some sort of error message at the end of the download or in a log somewhere to let you know about the error.