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

[Bug] Download marked as completed but chapter is corrupted #29

Closed
Nonobis opened this issue Apr 7, 2020 · 6 comments
Closed

[Bug] Download marked as completed but chapter is corrupted #29

Nonobis opened this issue Apr 7, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@Nonobis
Copy link

Nonobis commented Apr 7, 2020

Describe the bug
For a test, trying to download chapter 0 of https://mangadex.org/title/18964/kenja-no-mago

To Reproduce
Try to download from Mangadex with a slow connection...

Expected behavior
Download witouth error :) Could you check validity of CBZ before mark file as downloaded ?

Docker (if you are running Mango in a Docker container)

  • The docker-compose.yml file you are using

Additional context

With 7Zip

image

With Komga (Marked as empty)
image

Thanks !

@Nonobis Nonobis added the bug Something isn't working label Apr 7, 2020
@Nonobis
Copy link
Author

Nonobis commented Apr 7, 2020

Extract from logsq :

�[93m[INFO] �[0m2020/04/07 12:47:16 | The library directory /root/mango/library does not exist. Attempting to create it
�[93m[INFO] �[0m2020/04/07 12:47:16 | Scanned 0 titles in 0.442ms
�[91m[ERROR] �[0m2020/04/07 12:49:58 | Error reading socket: Connection reset by peer

�[95m[WARN] �[0m2020/04/07 12:49:58 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x6.png. Retrying... Remaining retries: 3

�[91m[ERROR] �[0m2020/04/07 12:51:22 | Error reading socket: Connection reset by peer

�[95m[WARN] �[0m2020/04/07 12:51:22 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x11.png. Retrying... Remaining retries: 3

�[95m[WARN] �[0m2020/04/07 12:52:16 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 12:52:16 | Scanned 0 titles in 9.699ms
�[95m[WARN] �[0m2020/04/07 12:57:16 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 12:57:16 | Scanned 0 titles in 1.962ms
�[95m[WARN] �[0m2020/04/07 13:02:16 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 13:02:16 | Scanned 0 titles in 1.815ms
�[95m[WARN] �[0m2020/04/07 13:07:16 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 13:07:16 | Scanned 0 titles in 1.717ms
�[95m[WARN] �[0m2020/04/07 13:09:40 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[95m[WARN] �[0m2020/04/07 13:12:16 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 13:12:16 | Scanned 0 titles in 3.058ms
�[95m[WARN] �[0m2020/04/07 13:17:16 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 13:17:16 | Scanned 0 titles in 2.777ms
�[91m[ERROR] �[0m2020/04/07 13:18:00 | connect: Operation timed out

�[95m[WARN] �[0m2020/04/07 13:18:00 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x5.png. Retrying... Remaining retries: 3

�[91m[ERROR] �[0m2020/04/07 13:19:04 | SSL_read: Unexpected EOF

�[95m[WARN] �[0m2020/04/07 13:19:04 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x8.png. Retrying... Remaining retries: 3

�[91m[ERROR] �[0m2020/04/07 13:19:52 | connect: Operation timed out

�[95m[WARN] �[0m2020/04/07 13:19:52 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x9.png. Retrying... Remaining retries: 3

�[91m[ERROR] �[0m2020/04/07 13:20:21 | Error reading socket: Connection reset by peer

�[95m[WARN] �[0m2020/04/07 13:20:21 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x9.png. Retrying... Remaining retries: 2

�[91m[ERROR] �[0m2020/04/07 13:20:32 | SSL_read: Unexpected EOF

�[95m[WARN] �[0m2020/04/07 13:20:32 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x9.png. Retrying... Remaining retries: 1

�[91m[ERROR] �[0m2020/04/07 13:20:44 | Error reading socket: Connection reset by peer

�[95m[WARN] �[0m2020/04/07 13:20:44 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x9.png. Retrying... Remaining retries: 0

�[91m[ERROR] �[0m2020/04/07 13:21:12 | SSL_read: Unexpected EOF

�[95m[WARN] �[0m2020/04/07 13:21:12 | Failed to download page https://s5.mangadex.org/data/e4743dfe492b9ddccf160f07f1f6146c/x11.png. Retrying... Remaining retries: 3

�[95m[WARN] �[0m2020/04/07 13:22:17 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 13:22:17 | Scanned 0 titles in 2.668ms
�[95m[WARN] �[0m2020/04/07 13:27:17 | File /root/mango/library/Kenja no Mago/Vol.1 Ch.0 Prequel.cbz is corrupted or is not a valid zip archive. Ignoring it.
�[93m[INFO] �[0m2020/04/07 13:27:17 | Scanned 0 titles in 2.911ms

image

@hkalexling
Copy link
Member

Thanks for the report!

Normally Mango would set the status as "Missing Pages" if it fails to download any page of the chapter. It looks like the log you provided above is not complete. Could you show me the full log? If it's too long, you can paste it in a gist and link it here.

I am running Mango on a remote server, so it's not easy for me to test it with a slow connection. With a normal connection speed I can download the same chapter without any issues.

BTW it looks like your console does not support ANSI escape codes so the log formatting is messed up. Normally it should look something like this

Screenshot from 2020-04-07 22-04-53

I should probably add an option to disable the log coloring to make it readable.

@Nonobis
Copy link
Author

Nonobis commented Apr 7, 2020

Hello,

I am on unraid 6.8.3 on your new docker image :) The console is only a html screen displaying log...not a true console.

image

full log as file
mango_logs.txt

@hkalexling
Copy link
Member

I tried to reproduce the bug by:

  • Modifying the code to make the downloads fail randomly (20% of the pages would fail to download)
  • Running Mango on a local machine and throttling the connection speed to 300kbps

Unfortunately, neither of these reproduced the issue you are having.

It's easy to verify the integrity of the downloaded file before marking it as completed, but it still bugs me why this would happen. Does the problem persist when you download the same chapter again? Also, it would be helpful if you could send me the .cbz file so I can inspect to see what went wrong.

@Nonobis
Copy link
Author

Nonobis commented Apr 8, 2020

Hello,

Yes i have always the problem with this chapter. I can't delete incomplet chapter, i must stop the docker before deleting the chapter. A process must be using the file ...

The incomplet file is in this post (decompress the zip, the cbz is inside).
Thanks a lot :)

PS : i have restarted the docker, and now the chapter is available for reading and readable ... Maybe downlaod is working but a process crash and block end of writing of file ?

Vol.1 Ch.0 Prequel.zip

@hkalexling
Copy link
Member

In v0.3.0, Mango will check if the downloaded cbz file is valid before marking the job as completed. I am closing this, but feel free to reopen if you could find a reliable way to reproduce the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants