Originally created by @Cossty on GitHub (Jul 5, 2024).
What was the Problem?
Recently, I finished setting up audiobookshelf for the first time. I decided to download 30+ audiobooks. Some of them have multiple tracks, so the android app was downloading around 400 files. After it downloaded around 100 it was stuck and didn't continue. I had to restart the app, disconnect and reconnect to the server, just to be able to download again. Tried again to download a lot of files at once. Same result, stalled after a while.
Then I tried to find some answers here. The only thing I found was that when you start downloading a book, you should wait a little on it's page, to let the download set up. So I did that, I waited on each book 5-10s, before leaving for another one. It looked like it helped a little, because a lot more files got downloaded this time, but it stalled anyway. My internet is downloading books 5-6 m/s.
After that, I was downloading books one by one, which worked until it didn't. I have 42 local books. Audiobookshelf app uses 25.61 gb of user data. Now the download stalls before finishing one book.
Connecting on local network. Battery optimization is set to unrestricted.
Steps to Reproduce the Issue
Have no local books
Que a lot of books/files for download. 400+
Have a 42+ local books/25.61gb of user data
try to download another book
What was Expected?
To be able to download books without stalling.
Phone Model
Fairphone 4
Phone OS
Android 13, stock, but stock for fairphone is /e/OS
Audiobookshelf App Version
Android App - 0.9.74
Installation Source
Google Play Store, Other (List in "Additional Notes")
Additional Notes
App downloaded with Aurora Store, but if I understand it correctly, that's just google play version.
I don't have logs for when I was downloading a lot of books at once.
There are a lot of ping timeouts in my logs, is this intended?
2024-07-05 07:03:21.735 INFO [SocketAuthority] Socket 00Pu9GzjwYI4xz8fAABl disconnected from client "cossty" after 426859ms (Reason: ping timeout)
2024-07-05 07:03:58.566 INFO [SocketAuthority] Socket Connected HoT8oJ3gsiCfn9bYAABn
2024-07-05 07:11:51.829 INFO [SocketAuthority] Socket HoT8oJ3gsiCfn9bYAABn disconnected from client "cossty" after 473263ms (Reason: ping timeout)
2024-07-05 07:33:51.669 INFO [SocketAuthority] Socket Connected zbqvUMnkO3__VytrAABp
2024-07-05 07:39:37.720 INFO [SocketAuthority] Socket zbqvUMnkO3__VytrAABp disconnected from client "cossty" after 346052ms (Reason: ping timeout)
2024-07-05 07:48:16.824 INFO [SocketAuthority] Socket Connected xbxnmWj_Vzf71wsnAABr
2024-07-05 07:57:49.795 INFO [SocketAuthority] Socket xbxnmWj_Vzf71wsnAABr disconnected from client "cossty" after 572972ms (Reason: ping timeout)
I don't know if this is the reason for downloads stalling, but they sometimes stall without there being ping timeout in logs. Like here
2024-07-05 06:50:13.411 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 036.m4b"
2024-07-05 06:50:19.328 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 037.m4b"
2024-07-05 06:55:52.883 INFO [SocketAuthority] Socket yCuxkU41IPxg2XxTAABh disconnected from client "cossty" after 567679ms (Reason: transport close)
2024-07-05 06:56:02.604 INFO [SocketAuthority] Socket Connected eJQOpeLn_q9IUUlkAABj
2024-07-05 06:56:07.071 INFO [SocketAuthority] Socket eJQOpeLn_q9IUUlkAABj disconnected from client "cossty" after 4467ms (Reason: client namespace disconnect)
It stalled after file 37 and I had to restart the app and disconnect and reconnect to the server.
Here I tried to download it again, but it stalled on file 20, timeout happened 5m later, so that was probably not the cause.
2024-07-05 06:57:36.876 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 019.m4b"
2024-07-05 06:58:01.392 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 020.m4b"
2024-07-05 07:03:21.735 INFO [SocketAuthority] Socket 00Pu9GzjwYI4xz8fAABl disconnected from client "cossty" after 426859ms (Reason: ping timeout)
Originally created by @Cossty on GitHub (Jul 5, 2024).
### What was the Problem?
Recently, I finished setting up audiobookshelf for the first time. I decided to download 30+ audiobooks. Some of them have multiple tracks, so the android app was downloading around 400 files. After it downloaded around 100 it was stuck and didn't continue. I had to restart the app, disconnect and reconnect to the server, just to be able to download again. Tried again to download a lot of files at once. Same result, stalled after a while.
Then I tried to find some answers here. The only thing I found was that when you start downloading a book, you should wait a little on it's page, to let the download set up. So I did that, I waited on each book 5-10s, before leaving for another one. It looked like it helped a little, because a lot more files got downloaded this time, but it stalled anyway. My internet is downloading books 5-6 m/s.
After that, I was downloading books one by one, which worked until it didn't. I have 42 local books. Audiobookshelf app uses 25.61 gb of user data. Now the download stalls before finishing one book.
Connecting on local network. Battery optimization is set to unrestricted.
### Steps to Reproduce the Issue
1. Have no local books
2. Que a lot of books/files for download. 400+
1. Have a 42+ local books/25.61gb of user data
2. try to download another book
### What was Expected?
To be able to download books without stalling.
### Phone Model
Fairphone 4
### Phone OS
Android 13, stock, but stock for fairphone is /e/OS
### Audiobookshelf App Version
Android App - 0.9.74
### Installation Source
Google Play Store, Other (List in "Additional Notes")
### Additional Notes
_**App downloaded with Aurora Store, but if I understand it correctly, that's just google play version.
I don't have logs for when I was downloading a lot of books at once.
There are a lot of ping timeouts in my logs, is this intended?**_
2024-07-05 07:03:21.735 INFO [SocketAuthority] Socket 00Pu9GzjwYI4xz8fAABl disconnected from client "cossty" after 426859ms (Reason: ping timeout)
2024-07-05 07:03:58.566 INFO [SocketAuthority] Socket Connected HoT8oJ3gsiCfn9bYAABn
2024-07-05 07:11:51.829 INFO [SocketAuthority] Socket HoT8oJ3gsiCfn9bYAABn disconnected from client "cossty" after 473263ms (Reason: ping timeout)
2024-07-05 07:33:51.669 INFO [SocketAuthority] Socket Connected zbqvUMnkO3__VytrAABp
2024-07-05 07:39:37.720 INFO [SocketAuthority] Socket zbqvUMnkO3__VytrAABp disconnected from client "cossty" after 346052ms (Reason: ping timeout)
2024-07-05 07:48:16.824 INFO [SocketAuthority] Socket Connected xbxnmWj_Vzf71wsnAABr
2024-07-05 07:57:49.795 INFO [SocketAuthority] Socket xbxnmWj_Vzf71wsnAABr disconnected from client "cossty" after 572972ms (Reason: ping timeout)
_**I don't know if this is the reason for downloads stalling, but they sometimes stall without there being ping timeout in logs. Like here**_
2024-07-05 06:50:13.411 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 036.m4b"
2024-07-05 06:50:19.328 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 037.m4b"
2024-07-05 06:55:52.883 INFO [SocketAuthority] Socket yCuxkU41IPxg2XxTAABh disconnected from client "cossty" after 567679ms (Reason: transport close)
2024-07-05 06:56:02.604 INFO [SocketAuthority] Socket Connected eJQOpeLn_q9IUUlkAABj
2024-07-05 06:56:07.071 INFO [SocketAuthority] Socket eJQOpeLn_q9IUUlkAABj disconnected from client "cossty" after 4467ms (Reason: client namespace disconnect)
_**It stalled after file 37 and I had to restart the app and disconnect and reconnect to the server.
Here I tried to download it again, but it stalled on file 20, timeout happened 5m later, so that was probably not the cause.**_
2024-07-05 06:57:36.876 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 019.m4b"
2024-07-05 06:58:01.392 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 020.m4b"
2024-07-05 07:03:21.735 INFO [SocketAuthority] Socket 00Pu9GzjwYI4xz8fAABl disconnected from client "cossty" after 426859ms (Reason: ping timeout)
adam
added the bugandroid labels 2026-04-24 23:45:05 +02:00
After some more testing, this is not entirely true. I just downloaded some very small book, around 90mb. That worked fine. But bigger books always stall for me. I want to download Count of Monte Cristo right now, it is 1.4 gb. It doesn't work and always get stuck, in different places. Once it was stuck on 54%, then 14%, then 86%. I just can't download it, because after restart of the app I have to download it from the beginning, and it always stalls again. Having the screen always on doesn't help.
@Cossty commented on GitHub (Jul 5, 2024):
After some more testing, this is not entirely true. I just downloaded some very small book, around 90mb. That worked fine. But bigger books always stall for me. I want to download Count of Monte Cristo right now, it is 1.4 gb. It doesn't work and always get stuck, in different places. Once it was stuck on 54%, then 14%, then 86%. I just can't download it, because after restart of the app I have to download it from the beginning, and it always stalls again. Having the screen always on doesn't help.
Sorry this is the same error whether on local wifi connection to the audiobookshelf server OR on cellular data ...
@timwiel commented on GitHub (Sep 24, 2024):
Sorry this is the same error whether on local wifi connection to the audiobookshelf server OR on cellular data ...
I have been working on refactoring the Android download logic over the past few months (progress was a bit slow due to life getting in the way). This refactor was primarily focused on cleaning up the framework, and not specifically aimed at fixing any particular issue. However, it is possible that the changes may have resolved this issue as a side effect.
If you get a chance, please try sideloading the APK located at the end of the pull request and let me know if you run into other issues, whether this issue still occurs, or if this issue appears to be resolved. The APK can be downloaded from the "Build APK" workflow at the end of the page by clicking on "View Details", then clicking on "Summary", then downloading the APK. The PR is https://github.com/advplyr/audiobookshelf-app/pull/1587
I am requesting feedback on all of the open Android download issues, so apologies if you receive multiple notifications.
@nichwall commented on GitHub (May 26, 2025):
I have been working on refactoring the Android download logic over the past few months (progress was a bit slow due to life getting in the way). This refactor was primarily focused on cleaning up the framework, and not specifically aimed at fixing any particular issue. However, it is possible that the changes may have resolved this issue as a side effect.
If you get a chance, please try sideloading the APK located at the end of the pull request and let me know if you run into other issues, whether this issue still occurs, or if this issue appears to be resolved. The APK can be downloaded from the "Build APK" workflow at the end of the page by clicking on "View Details", then clicking on "Summary", then downloading the APK. The PR is https://github.com/advplyr/audiobookshelf-app/pull/1587
I am requesting feedback on all of the open Android download issues, so apologies if you receive multiple notifications.


Damm... I would love to try it. But I moved two months ago, and I don't have my home server running yet, let alone audiobookshelf.
Idk when I will find the time to set up everything. Sorry
@Cossty commented on GitHub (Jun 4, 2025):
Damm... I would love to try it. But I moved two months ago, and I don't have my home server running yet, let alone audiobookshelf.
Idk when I will find the time to set up everything. Sorry
Damm... I would love to try it. But I moved two months ago, and I don't have my home server running yet, let alone audiobookshelf.
Idk when I will find the time to set up everything. Sorry
No worries. I commented on most of the download related issues and there are a few things I need to look at again from other feedback.
@nichwall commented on GitHub (Jun 4, 2025):
> Damm... I would love to try it. But I moved two months ago, and I don't have my home server running yet, let alone audiobookshelf.
> Idk when I will find the time to set up everything. Sorry
No worries. I commented on most of the download related issues and there are a few things I need to look at again from other feedback.
@NathanSweet commented on GitHub (Feb 15, 2026):
My downloads stall at ~600MB downloaded. Is there a request timeout or similar somewhere?
It happens on the desktop app (advplyr/audiobookshelf#5043) so maybe it's a server config issue.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Cossty on GitHub (Jul 5, 2024).
What was the Problem?
Recently, I finished setting up audiobookshelf for the first time. I decided to download 30+ audiobooks. Some of them have multiple tracks, so the android app was downloading around 400 files. After it downloaded around 100 it was stuck and didn't continue. I had to restart the app, disconnect and reconnect to the server, just to be able to download again. Tried again to download a lot of files at once. Same result, stalled after a while.
Then I tried to find some answers here. The only thing I found was that when you start downloading a book, you should wait a little on it's page, to let the download set up. So I did that, I waited on each book 5-10s, before leaving for another one. It looked like it helped a little, because a lot more files got downloaded this time, but it stalled anyway. My internet is downloading books 5-6 m/s.
After that, I was downloading books one by one, which worked until it didn't. I have 42 local books. Audiobookshelf app uses 25.61 gb of user data. Now the download stalls before finishing one book.
Connecting on local network. Battery optimization is set to unrestricted.
Steps to Reproduce the Issue
Have no local books
Que a lot of books/files for download. 400+
Have a 42+ local books/25.61gb of user data
try to download another book
What was Expected?
To be able to download books without stalling.
Phone Model
Fairphone 4
Phone OS
Android 13, stock, but stock for fairphone is /e/OS
Audiobookshelf App Version
Android App - 0.9.74
Installation Source
Google Play Store, Other (List in "Additional Notes")
Additional Notes
App downloaded with Aurora Store, but if I understand it correctly, that's just google play version.
I don't have logs for when I was downloading a lot of books at once.
There are a lot of ping timeouts in my logs, is this intended?
2024-07-05 07:03:21.735 INFO [SocketAuthority] Socket 00Pu9GzjwYI4xz8fAABl disconnected from client "cossty" after 426859ms (Reason: ping timeout)
2024-07-05 07:03:58.566 INFO [SocketAuthority] Socket Connected HoT8oJ3gsiCfn9bYAABn
2024-07-05 07:11:51.829 INFO [SocketAuthority] Socket HoT8oJ3gsiCfn9bYAABn disconnected from client "cossty" after 473263ms (Reason: ping timeout)
2024-07-05 07:33:51.669 INFO [SocketAuthority] Socket Connected zbqvUMnkO3__VytrAABp
2024-07-05 07:39:37.720 INFO [SocketAuthority] Socket zbqvUMnkO3__VytrAABp disconnected from client "cossty" after 346052ms (Reason: ping timeout)
2024-07-05 07:48:16.824 INFO [SocketAuthority] Socket Connected xbxnmWj_Vzf71wsnAABr
2024-07-05 07:57:49.795 INFO [SocketAuthority] Socket xbxnmWj_Vzf71wsnAABr disconnected from client "cossty" after 572972ms (Reason: ping timeout)
I don't know if this is the reason for downloads stalling, but they sometimes stall without there being ping timeout in logs. Like here
2024-07-05 06:50:13.411 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 036.m4b"
2024-07-05 06:50:19.328 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 037.m4b"
2024-07-05 06:55:52.883 INFO [SocketAuthority] Socket yCuxkU41IPxg2XxTAABh disconnected from client "cossty" after 567679ms (Reason: transport close)
2024-07-05 06:56:02.604 INFO [SocketAuthority] Socket Connected eJQOpeLn_q9IUUlkAABj
2024-07-05 06:56:07.071 INFO [SocketAuthority] Socket eJQOpeLn_q9IUUlkAABj disconnected from client "cossty" after 4467ms (Reason: client namespace disconnect)
It stalled after file 37 and I had to restart the app and disconnect and reconnect to the server.
Here I tried to download it again, but it stalled on file 20, timeout happened 5m later, so that was probably not the cause.
2024-07-05 06:57:36.876 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 019.m4b"
2024-07-05 06:58:01.392 INFO [LibraryItemController] User "cossty" requested file download at "/audiobooks/Alexandre Dumas/The Count of Monte Cristo/The Count of Monte Cristo (Unabridged) - 020.m4b"
2024-07-05 07:03:21.735 INFO [SocketAuthority] Socket 00Pu9GzjwYI4xz8fAABl disconnected from client "cossty" after 426859ms (Reason: ping timeout)
@Cossty commented on GitHub (Jul 5, 2024):
After some more testing, this is not entirely true. I just downloaded some very small book, around 90mb. That worked fine. But bigger books always stall for me. I want to download Count of Monte Cristo right now, it is 1.4 gb. It doesn't work and always get stuck, in different places. Once it was stuck on 54%, then 14%, then 86%. I just can't download it, because after restart of the app I have to download it from the beginning, and it always stalls again. Having the screen always on doesn't help.
@timwiel commented on GitHub (Sep 24, 2024):
Same issue for me here ... same socket issue in my logs...
Phone Model
Samsung A24
Phone OS
Android 14
Audiobookshelf App Version
Android App - 0.9.74
Installation Source
Google Play Store
Logs
@timwiel commented on GitHub (Sep 24, 2024):
Sorry this is the same error whether on local wifi connection to the audiobookshelf server OR on cellular data ...
@nichwall commented on GitHub (May 26, 2025):
I have been working on refactoring the Android download logic over the past few months (progress was a bit slow due to life getting in the way). This refactor was primarily focused on cleaning up the framework, and not specifically aimed at fixing any particular issue. However, it is possible that the changes may have resolved this issue as a side effect.
If you get a chance, please try sideloading the APK located at the end of the pull request and let me know if you run into other issues, whether this issue still occurs, or if this issue appears to be resolved. The APK can be downloaded from the "Build APK" workflow at the end of the page by clicking on "View Details", then clicking on "Summary", then downloading the APK. The PR is https://github.com/advplyr/audiobookshelf-app/pull/1587
I am requesting feedback on all of the open Android download issues, so apologies if you receive multiple notifications.
@Cossty commented on GitHub (Jun 4, 2025):
Damm... I would love to try it. But I moved two months ago, and I don't have my home server running yet, let alone audiobookshelf.
Idk when I will find the time to set up everything. Sorry
@nichwall commented on GitHub (Jun 4, 2025):
No worries. I commented on most of the download related issues and there are a few things I need to look at again from other feedback.
@NathanSweet commented on GitHub (Feb 15, 2026):
My downloads stall at ~600MB downloaded. Is there a request timeout or similar somewhere?
It happens on the desktop app (advplyr/audiobookshelf#5043) so maybe it's a server config issue.