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] Unable to read manga with very long titles #948

Open
xkww3n opened this issue May 11, 2024 · 3 comments
Open

[Bug] Unable to read manga with very long titles #948

xkww3n opened this issue May 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@xkww3n
Copy link

xkww3n commented May 11, 2024

Device information

  • Suwayomi-Server version: 1.0.0
  • Server Operating System: Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-101-generic x86_64)
  • Server Desktop Environment: N/A
  • Server JVM version: bundled (Official Docker image)
  • Client Operating System: N/A
  • Client Web Browser: N/A

Steps to reproduce

  1. Read a manga that has a very long title using Web UI or mobile client. (In my case that is 214 characters)
  2. Error occoured.

Expected behavior

The manga should load normally.

Actual behavior

Client recieved an error icon (piece of broken paper).

Other details

Log:

java.io.FileNotFoundException: /tmp/Tachidesk/manga-cache/Certain_Source/Certain_Loooooong_Title_Manga/Chapter/024.tmp (File name too long)
tachidesk-1  |  at java.base/java.io.FileOutputStream.open0(Native Method)
tachidesk-1  |  at java.base/java.io.FileOutputStream.open(Unknown Source)
tachidesk-1  |  at java.base/java.io.FileOutputStream.<init>(Unknown Source)
tachidesk-1  |  at java.base/java.io.FileOutputStream.<init>(Unknown Source)
tachidesk-1  |  at suwayomi.tachidesk.manga.impl.util.storage.ImageResponse.saveImage(ImageResponse.kt:95)
tachidesk-1  |  at suwayomi.tachidesk.manga.impl.util.storage.ImageResponse.getImageResponse(ImageResponse.kt:74)
tachidesk-1  |  at suwayomi.tachidesk.manga.impl.util.storage.ImageResponse$getImageResponse$1.invokeSuspend(ImageResponse.kt)
tachidesk-1  |  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
tachidesk-1  |  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
tachidesk-1  |  at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
tachidesk-1  |  at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
tachidesk-1  |  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
@xkww3n xkww3n added the bug Something isn't working label May 11, 2024
@WROIATE
Copy link

WROIATE commented Sep 13, 2024

I got the same exception with long title. Is there any way to solve the problem?

@Robonau
Copy link
Contributor

Robonau commented Sep 13, 2024

i believe the error is an OS error. the different OSs have different limits, 214 chars should be fine in all of them tho.
Windows : 256
Linux: 255 (EXT4: 4096)
Mac: 255

i would expect truncating to 254 chars would fix it (idk about the 214 chars breaking tho, maybe he counted wrong)

@xkww3n
Copy link
Author

xkww3n commented Sep 13, 2024

i believe the error is an OS error. the different OSs have different limits, 214 chars should be fine in all of them tho.

Windows : 256

Linux: 255 (EXT4: 4096)

Mac: 255

i would expect truncating to 254 chars would fix it (idk about the 214 chars breaking tho, maybe he counted wrong)

I just found that 214 characters is the parent folder's length (Book Name), the full path length is 301 (/tmp/Tachidesk/manga-cache/<Source Name>/<Book Name>/Chapter/001.tmp)

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

3 participants