mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Server download URL returning 404 #453
Closed
opened 2026-04-24 23:09:48 +02:00 by adam
·
22 comments
No Branch/Tag Specified
master
book_tags_genres_dedupe
episode_download_fallback
Issue-4540-SortBy-StartedDate-and-FinishedDate
episode_meta_tagging
fix_authorize_race_condition
redirect_transcode_requests
progress_updated_sort
fix_ereader_socket_event
fix_change_empty_root_password
fix_podcast_session_track_index
fix_set_token
session_modal_user
localize_durations
fix_oidc_create_user
jwt_auth_refactor
fix_scanner_deleting_single_file_books
fix_mediaprogress_updatedat_2
experimental_next_client
podcast_episode_duration
episode-timestamps-clickable
book_author_secondary_sort_title
podcast_useragents
pathexists_user_access
fix_pathexists_join
book_author_secondary_sort
clean_duplicate_mediaprogress
sanitize_html_description
trix_prevent_attachments
check_path_api_fix
fix_mediaprogress_updatedat
increase_express_json_limit
fix_dockerfile_nunicode
search_episodes
audiobook_tools_update
episode_secondary_sorts
hls_stream_url_update
new_session_track_endpoint
audiobook_tools_enhancements
watcher_rescans_update
player_track_tooltip
fix_exclude_prefixes_crash
socket_item_events
fix_podcast_episode_scanner_promise
new_stats_controller
count_cache_for_userpermissions
parsing-opf-v3
validate_migration_files
fix-quick-match-all-crash
fix-chapter-end-sleep-timer
stringify_sequelize_query
remove-col-ambiguity
fix_next_prev_edit_description
details_trim_whitespace
fix_content_url_basepath
fix_logger_fatal
progress_bar_visibility
batch-edit-populate-map-details
feed_generator_updates
bookmark-modal-updates
migrate-library-item-in-scanner
migrate-new-library-items
migrate-podcasts-new-library-item-2
migrate-podcasts-new-library-item
fix-remove-episode-from-playlist
playback-session-use-new-library-item
refactor-library-item
fix-heatmap-caption
feed-episodes-upsert
share-media-player-media-session-api
remove-old-playlist
remove_old_collection_object
plugin-implementation-demo
feed_migration
refactor-feeds-from-item
fix_remove_authors_no_books
v2.17.3-fk-constraints-migration
migrations-first-upgrade
sqlite_2
feature/nuxt-target-server
waveform
sqlite
play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.4
v1.3.3
v1.3.1
v1.2.8
v1.2.6
v1.2.5
v1.2.4
v1.2.1
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.0.0
0.9.61-beta.0
0.9.61-beta
Labels
Clear labels
authentication
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
pull-request
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
Mirrored from GitHub Pull Request
No Label
bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
adam (Adam Melkus)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/audiobookshelf#453
Reference in New Issue
Block a user
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.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tvories on GitHub (Jun 11, 2022).
Describe the issue
When trying to click the "download" button on a track on the app, a 404 is returned. This is causing crashes in the android app when trying to download local to the phone. Oddly, streaming works fine.
result:
Cannot GET /s/item/li_6vmhwv7q2tru6rxiei/Pachinko-Part01.mp3Steps to reproduce the issue
Audiobookshelf version
v2.0.21
How are you running audiobookshelf?
Other - Kubernetes
@jmt-gh commented on GitHub (Jun 11, 2022):
I'm not able to reproduce this.
Can you try this?
If successful, it should start streaming the part directly in your browser (at least that's what I see on firefox). As well, I'm curious -- when you hover over the download icon -- what URL is it directing you to? I'm curious if this is a DNS-esque issue
@helio4k commented on GitHub (Jun 11, 2022):
I am just wondering if you are going through a reveres proxy? I hade a similar experience long time ago but it was due to misconfiguration of my Nginx Proxy manager.
@tvories commented on GitHub (Jun 11, 2022):
I do run my setup through a reverse proxy, but I tried this with both the reverse proxy and direct. The error I posted above is from the direct connection (no reverse proxy).
@tvories commented on GitHub (Jun 11, 2022):
I copied that API key manually and replaced the token field with that API token copied from the user account. Same issue. When I right-click the link to the direct file and copy it, it is the same link with the same token.
Direct link URL (no reverse proxy): http://localhost:9911/s/item/li_6vmhwv7q2tru6rxiei/Pachinko-Part01.mp3?token=my-user-token
I also tried creating a new user and tried the same link logged in as the other user. Same result
@tvories commented on GitHub (Jun 11, 2022):
I went back versions until this worked again and the URLs work (with reverse proxy) as of 2.0.14. Something in 2.0.15 breaks these download URLs
I see there are some file permission changes in 2.0.15 that I wonder if they are the culprit.
@tvories commented on GitHub (Jun 11, 2022):
I have a feeling it's related to this: https://github.com/advplyr/audiobookshelf/issues/529
@advplyr commented on GitHub (Jun 13, 2022):
Are you able to re-create this issue on the latest release 2.0.21?
@advplyr commented on GitHub (Jun 13, 2022):
I see now that you originally had the issue with the latest version.
The last time the static router was updated was when adding support for downloading single file audiobooks.
Single file audiobooks are handled differently because they are put into the root of the library folder so they don't have a folder. https://github.com/advplyr/audiobookshelf/commit/6cfe583535217a8f4aa31329e57fa01208e282b4
I noticed in your screenshot that you don't have a "Manage Tracks" button.
That button is hidden when you have the "isFile" flag set on the audiobook. For some reason that flag was set on your audiobook.
Did you originally have the audio file inside the library folder root then moved it into a subfolder?
@tvories commented on GitHub (Jun 13, 2022):
I have gone through a few different iterations of my library. Originally, my books were mounted to:
/audiobooks. Then I moved to/media/books. When I was testing fixes, I thought maybe it was related to the directory level, so when I was doing this troubleshooting, I went back to/audiobooks. 2.0.21 did not work with /audiobooks or /media/books. I am back on 2.0.14 and downloads are working great.@advplyr commented on GitHub (Jun 13, 2022):
It's working in 2.0.14 because single file audiobooks weren't implemented yet. Somehow your audiobook was flagged as a single file audiobook.
Until we can get reproducible steps the workaround will be to remove the library item then scan the library again.
@tvories commented on GitHub (Jun 13, 2022):
In the process of troubleshooting, I have destroyed and re-created my library many times. Every item in my library is unable to be downloaded because of the 404.
I'll try removing the item and re-scanning after going to 2.0.21
@advplyr commented on GitHub (Jun 13, 2022):
If you don't see the "Manage Tracks" button on the tracks dropdown of the library item then you won't be able to download.
@tvories commented on GitHub (Jun 13, 2022):
I updated to 2.0.21 and removed the library item. I re-scanned, went to the library item, and same results - the book is not recognized as a multi-file audiobook.
Is there something in the logs I can look for when it does a scan to see why it's not getting the correct type of book?
@tvories commented on GitHub (Jun 14, 2022):
This definitely has something to do with the way my NFS volume is mounted. I mounted a direct file to my deployment, copied the same Pachinko book, and it comes up with the "Manage Tracks" option. I will mess around with NFS permissions a bit and see if I can determine which ones are throwing things off
Update:
I tried a few different NFS options and nothing made a difference. I don't think it's a permissions issue because I can create and delete directories and books from the container. I can also download any single file (top-level) books. Also, the same NFS mount works fine with 2.0.14
I think you're onto something about it being the scanner. I just don't know why my NFS storage is not scanning correctly.
Can anyone else with NFS storage chime in about whether or not theirs is working?
@advplyr commented on GitHub (Jun 17, 2022):
I'm not sure this is related to NFS, this could be a bug with how the scanner detects single file audiobooks in the library folder root.
What is the folder path and the library item path? I can re-create your directory structure for that audiobook that is scanned in wrong to test it.
@tvories commented on GitHub (Jun 17, 2022):
Currently, I have my audiobooks mounted to /audiobooks. Here is the structure:
@Thovi98 commented on GitHub (Jun 22, 2022):
I’ve same issue, although I didn’t have it a few released before (I discovered it in 2.0.20).
I can play any audiobook, but cannot download them.
I don’t know how I can help resolving this issue ?
@tvories commented on GitHub (Jun 22, 2022):
@Thovi98 are you using NFS for storage?
@Thovi98 commented on GitHub (Jun 22, 2022):
I don’t think so, at least I don’t have nfs- related packages installed and I don’t know understand exactly what it does, so I don’t think (I’m still a newbie) 😁
Edit : I’m self-hosting on a Yunohost debian 11 based system, thanks to this package, maybe it will help debugging : https://github.com/YunoHost-Apps/audiobookshelf_ynh/pull/13
@simonbh commented on GitHub (Jul 11, 2022):
I experienced this issue for one of my audiobooks. Single file download and playback returned a HTTP 404 message.
Running version 2.0.23 via docker-compose. My audiobooks are stored on a TrueNAS host via NFS.
I corrected the issue by changing the "&" character to "and" in the audiobook file name and author directory.
For example:
From:
/audiobooks/James Smith & Kevin Smith/Great Audiobook by James Smith & Kevin Smith.mp3
To:
/audiobooks/James Smith and Kevin Smith/Great Audiobook by James Smith and Kevin Smith.mp3
I then re-scanned my library, The new directory/file was then added. I then manually removed the old entry. After this, download and playback worked as expected.
@advplyr commented on GitHub (Jul 12, 2022):
Thanks for the breakdown. I don't believe the "&" had anything to do with the error here, I think in your case renaming the folder had the scanner pick it up as a new library item.
This issue was fixed in that last commit but just hasn't made it into a release yet.
@advplyr commented on GitHub (Jul 15, 2022):
Fixed in v2.0.24
For anyone having this issue run a regular scan on the library with the latest version and it will correct those library items.