advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.22k stars 166 forks source link

Download stuck at various percentages on android app #1024

Closed dkomljenovic2502 closed 9 months ago

dkomljenovic2502 commented 9 months ago

Steps to reproduce

  1. Point to audiobookshelf via reverse proxy, or directly
  2. Try to download the audio book
  3. Infinite stuck on download on different percentages
  4. restart the phone or app, same behavior it gets to e.g. 5% total and stops again

Expected behaviour

Actual behaviour

Environment data

Audiobookshelf Version:

Android Issue

Android version: 13 Device model: Honor 90 - REA-NX9 Samsung S23 ultra Stock or customized system: stock

Additional info

Streaming works normally

From docker log from audiobookshelf container:

[2024-01-03 12:21:24.369] INFO: [LibraryItemController] User "dkomljenovic2502" requested file download at "/audiobooks/Dune - Audiobook Collection 2015/01 - Dune Saga/03. Children of Dune.m4b" [2024-01-03 12:21:24.370] INFO: [LibraryItemController] User "dkomljenovic2502" requested file download at "/audiobooks/Dune - Audiobook Collection 2015/01 - Dune Saga/01. Dune.m4b" [2024-01-03 12:21:24.379] INFO: [LibraryItemController] User "dkomljenovic2502" requested file download at "/audiobooks/Dune - Audiobook Collection 2015/01 - Dune Saga/02. Dune Messiah.m4b"

nichwall commented 9 months ago

Are you downloading to Internal App Storage or to another folder you set up on Android?

dkomljenovic2502 commented 9 months ago

didn't modify anything at all with the app storage. I managed to download some books, but after multiple retries, reboots of server and client... Not sure how can i change the folder? and where is the data downloaded? didn't find that option

dkomljenovic2502 commented 9 months ago

Ok, created a new folder, added permission for usage, it said success, but same behavior even to external storage

nichwall commented 9 months ago

It should be going to Internal App Storage if you didn't set anything up. Internal App Storage tends to cause less issues, but doesn't let the data downloaded media be available to other apps.

https://www.audiobookshelf.org/guides/android_app_shared_storage

nichwall commented 9 months ago

How big is the book you're downloading? Does it work with smaller books?

Looks like you're downloading multiple Dune books, or at least they're showing up as the same library item (not sure if it's an omnibus or something)

advplyr commented 9 months ago

If you don't use the reverse proxy do you still have the issue? Have you tried with other books, maybe some smaller ones?

dkomljenovic2502 commented 9 months ago

Tried with and without reverse proxy, same behaviour Now i am trying directly to http://IP:13378, which is directly the exposed audiobookshelf without reverse proxy

The books are: image

Now i tried this image and this downloaded

nichwall commented 9 months ago

How much free space is on your device?

dkomljenovic2502 commented 9 months ago

180GB free space left... p.s. we can continue on discord if it would be faster

dkomljenovic2502 commented 9 months ago

i would say this is not app connected. After playing, updating kernel, docker and stuff i would say it is an issue with either the server in docker or my pc... Other containers don't do stuff like this one.

When downloading an image the server docker seems to "kill my ethernet" for few seconds, then continue..

The dmesg doesn't have any info when this happens i just realized that my ssh connection hangs, and other stuff which the pc does stop working for few seconds. And this only happens when i am downloading from audiobookshelf container, e.g. plex container for streaming which uses more cpu, and bandwidth doesn't do "kill the ethernet"

kirarpit commented 4 days ago

I have the same issue here. Downloading keeps hanging at arbitrary percentages. I am using a raspberry pi for running the ABS docker container, with my MacBook's hard drive mounted to it where all the audiobooks reside. The setup does work for streaming just fine and I have managed to download some books after repeated tries. But overall it's quite painful. Is the downloading meant to work in the background once the app is minimized? With my setup it immediately hangs if I minimize the app.

kirarpit commented 4 days ago

Sometimes most files download but the other ones are stuck. I think it's socket disconnecting intermittently that causing the issue. But it would be great to have a way to retry the unfinished downloads. I am happy to contribute to this project because it's a great project overall and I really appreciate it. If you could provide some pointers on how we could support such a functionality that'd be great! Cheers! Screenshot_20241001-085216