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

Download as .cbz results in error #540

Closed
doctorniz opened this issue Apr 23, 2023 · 6 comments · Fixed by #676
Closed

Download as .cbz results in error #540

doctorniz opened this issue Apr 23, 2023 · 6 comments · Fixed by #676
Labels
bug Something isn't working

Comments

@doctorniz
Copy link

Able to download the conventional way, but when i toggle the cbz setting in server.conf to true, I get an error with downloading.

On review of the log, I get this. I am not sure how useful it is
[DefaultDispatcher-worker-2] INFO suwayomi.tachidesk.manga.impl.download.Downloader - Downloader faced an exception
java.io.IOException: No such file or directory
at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.base/java.io.File.createNewFile(Unknown Source)
at suwayomi.tachidesk.manga.impl.download.ArchiveProvider$download$2.invokeSuspend(ArchiveProvider.kt:37)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Apr 23, 2023 5:22:46 PM okhttp3.internal.platform.Platform log

@doctorniz doctorniz added the bug Something isn't working label Apr 23, 2023
@AriaMoradi
Copy link
Member

use a preview version of Tachidesk-Server

@doctorniz
Copy link
Author

Does not fix the issue. Doesn't display error but as "downloading" and gets stuck 0-2%.

@AriaMoradi AriaMoradi reopened this Apr 24, 2023
@LoneNomadBlue
Copy link

I have used the latest preview version of the webui which is r1050 and it works... only for Mangadex. I have tried a couple more extensions like Mangalife, Mangabat, Mangahere etc. but they all give errors when downloading in .cbz format.

@VoidFox
Copy link

VoidFox commented Jun 5, 2023

same error.. folders are not getting created.. permissions are fine thought
CBZ downloads & converts just fine, as long as the necessary folders exist...

changed docker-compose.yml to:
image: ghcr.io/suwayomi/tachidesk:preview

and now its working fine.. thanks @LoneNomadBlue

@LoneNomadBlue
Copy link

LoneNomadBlue commented Jun 5, 2023

Thanks for letting me know @VoidFox

Yeah it seems like it's giving errors because it can't create the folders whenever you download any manga. For those wondering in the ".\Tachidesk\Tachidesk Manga" folder you need both a folder for the extension and another folder for every single manga you are going to download. Please note that the above directory is how I set my downloads path so you will have to create the folders wherever your download path is set as [ -Dsuwayomi.tachidesk.config.server.downloadsPath="your download location" ]. If you haven't set a custom download path then it will use the default download path which is the "downloads" folder inside of the default data directory which can be found as:

"The default data directory is located below depending on your operating system:

Replace with your account/user name.

On Windows 7 and later : C:\Users<Account>\AppData\Local\Tachidesk

On Windows XP : C:\Documents and Settings<Account>\Application Data\Local Settings\Tachidesk

On Mac OS X : /Users//Library/Application Support/Tachidesk

On Unix/Linux : /home//.local/share/Tachidesk"

For example let's say that you are going to download the manga "Ruri Dragon" from the "MangaLife" extension. You would need to create a "MangaLife (EN)" folder in your downloads path. Inside of that folder you would also need to create a "Ruri Dragon" folder. Then it will properly download the chapters as .cbz without giving any error. However you need to remember that you will have to create a folder for every single manga so it will take a long time to create a folder for each one especially if you have a really big library. However there is a way to partially automate the folder creation process and make it significantly faster.

To partially automate the folder creation you will need to set the "server.downloadAsCbz = {...}" as "false" so that it will download the chapters as seperate images inside of a folder. Then start downloading 1 chapter from every single manga and extension you want to download. Now going back to your downloads path you will see that it automatically created a folder for each extension and manga that you downloaded from. Now you can delete the chapter folders that were downloaded but make sure to not delete the extension or manga folders. Now you can go back and set "server.downloadAsCbz = {...}" as "true" so that you can download chapters as .cbz files. With the folder already in place you can download all the chapters that you want. Please note that if you want to download another manga or if you wanted to download from another extension you will have to go and create those individual folders again either manually or partially automated with the method above.

This seems to be a workaround but hopefully it'll get fixed in the near future.

Apparently Mangadex was the only one that worked for me before, because I had already downloaded some manga chapters from that extension as plain image files so the extension folder and the folder containing the manga name were created before I switched to downloading as a .cbz format by setting "server.downloadAsCbz = {...}" as "true". I just never realized that that was why it worked only for specific manga from the Mangadex extension. Thanks once again @VoidFox since I wouldn't have figured it out without your comment.

@Syer10 Syer10 closed this as completed Aug 5, 2023
@barrelltitor
Copy link

barrelltitor commented Sep 2, 2023

@Syer10 this issue is still not fixed, I am getting the exact same errors on a newly installed tachidesk via docker.

Exactly as @LoneNomadBlue said, the directories do not get automatically created in the downloads folder, resulting in this error

Compose

services:
  tachidesk:
      image: ghcr.io/suwayomi/tachidesk:preview
      environment:
        - DEBUG=false
        - BIND_IP=0.0.0.0
        - BIND_PORT=4567
        - SOCKS_PROXY_ENABLED=false
        - DOWNLOAD_AS_CBZ=true
        - MAX_PARALLEL_UPDATE=10
        - AUTO_DOWNLOAD_CHAPTERS=true
        - WEB_UI_CHANNEL="preview"
      volumes:
        - /volumes/tachidesk:/home/suwayomi/.local/share/Tachidesk
      ports:
        - "4567:4567"
      restart: on-failure:3

I then installed a random extension, ComicCastle, clicked on a random comic and downloaded a chapter. This resulted in the following error:

16:48:39.353 [DefaultDispatcher-worker-4] WARN suwayomi.tachidesk.manga.impl.download.Downloader source(1232262904653448061) - downloadChapter(Web Warriors (1) - Issue : 01 (1) | state= Error, tries= 2, progress= 1.0)) -- failed due to

java.io.IOException: No such file or directory

	at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method)

	at java.base/java.io.File.createNewFile(Unknown Source)

	at suwayomi.tachidesk.manga.impl.download.fileProvider.impl.ArchiveProvider$downloadImpl$2.invokeSuspend(ArchiveProvider.kt:39)

	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)

	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)

	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)

	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)

	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)

	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)

	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

16:48:39.637 [DefaultDispatcher-worker-4] INFO suwayomi.tachidesk.manga.impl.download.DownloadManager -- Running: 0, Queued: 0, Failed: 1

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

Successfully merging a pull request may close this issue.

6 participants