mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Cancelling playback of audiobook before it starts crashes server / causes container to stop #535
Closed
opened 2026-04-24 23:12:16 +02:00 by adam
·
15 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
playlists
video
v2.35.1
v2.35.0
v2.34.0
v2.33.2
v2.33.1
v2.33.0
v2.32.1
v2.32.0
v2.31.0
v2.30.0
v2.29.0
v2.28.0
v2.27.0
v2.26.3
v2.26.2
v2.26.1
v2.26.0
v2.25.1
v2.25.0
v2.24.0
v2.23.0
v2.22.0
v2.21.0
v2.20.0
v2.19.5
v2.19.4
v2.19.3
v2.19.2
v2.19.1
v2.19.0
v2.18.1
v2.18.0
v2.17.7
v2.17.6
v2.17.5
v2.17.4
v2.17.3
v2.17.2
v2.17.1
v2.17.0
v2.16.2
v2.16.1
v2.16.0
v2.15.1
v2.15.0
v2.14.0
v2.13.4
v2.13.3
v2.13.2
v2.13.1
v2.13.0
v2.12.3
v2.12.2
v2.12.1
v2.12.0
v2.11.0
v2.10.1
v2.10.0
v2.9.0
v2.8.1
v2.8.0
v2.7.2
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.23
v2.2.22
v2.2.21
v2.2.20
v2.2.19
v2.2.18
v2.2.17
v2.2.16
v2.2.15
v2.2.14
v2.2.13
v2.2.12
v2.2.11
v2.2.10
v2.2.9
v2.2.8
v2.2.7
v2.2.6
v2.2.5
v2.2.4
v2.2.3
v2.2.2
v2.2.1
v2.2.0
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
v2.0.24
v2.0.23
v2.0.22
v2.0.21
v2.0.20
v2.0.19
v2.0.18
v2.0.17
v2.0.16
v2.0.15
v2.0.14
v2.0.13
v2.0.12
v2.0.11
v2.0.10
v2.0.9
v2.0.8
v2.0.7
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v1.7.2
v1.7.1
v1.7.0
v1.6.0
v1.5.5
v1.5.0
v1.4.11
v1.4.9
v1.4.7
v1.4.6
v1.4.4
v1.4.2
v1.4.0
v1.4.1
v1.3.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#535
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 @Leondre on GitHub (Jul 19, 2022).
Describe the issue
100% reproducible on my end. Simply stop playback of an audiobook while it is still loading and the container will crash.
Steps to reproduce the issue
Audiobookshelf version
v2.1.0
How are you running audiobookshelf?
Docker
@advplyr commented on GitHub (Jul 19, 2022):
What browser are you using and what is the audio file you are playing that is requiring a transcode?
@Leondre commented on GitHub (Jul 19, 2022):
I am using firefox (102.0.1) and all of my audio files are in m4b. Converted using openaudible if that helps at all.
@BCNelson commented on GitHub (Jul 19, 2022):
I can't reproduce on firefox 102.0 or chrome 103.0.5060.114. It is a little hard to be sure as I need to be pretty fast. I tried on several diffrent books from Google Play, and openaudible
@advplyr commented on GitHub (Jul 19, 2022):
I'm not sure how the audio player was made to look like that screenshot.
@Leondre commented on GitHub (Jul 19, 2022):
I can't replicate it using edge, in fact none of the files that transcode when trying to play them on firefox do so with edge. Tried firefox in safe mode, same issue so it doesn't seem to be extension related. Also able to replicate on another machine using firefox. Both with and without using nginx as a reverse proxy.
If I can provide any more logs just let me know where from.
That screenshot was just cropped, this is on said other machine in firefox while waiting for playback to start. Sits there for about 20 seconds and then starts playing.
@advplyr commented on GitHub (Jul 19, 2022):
Firefox has some issue with direct playing m4b files. We have discussed this in Discord but m4b file will direct play in any chromium based browser. Edge/chrome/brave
@ohare93 commented on GitHub (Oct 25, 2022):
It seems like I am also getting this crash. Playback from the iOS app, docker version hosted on Unraid. Crashes silently (no entry in the logs) sometimes after opening and hitting play.
@itzexor commented on GitHub (Oct 30, 2022):
@advplyr i'm not sure if this is the exact issue here, but I ran into a case where multiple m4bs, direct drm-stripped from audible, were causing a re-encode when other m4bs work fine direct. My issue turned out to be some bit that audible sets on specific books, someone did a write up on it here: https://rentry.co/n4ost
after using that example script with bento4 mp4 tools to fix my entire library, this problem no longer occurs. I believe it may be the issue here due to this line:
[2022-07-18 19:55:21] INFO: [adts @ 0x148eb72be640] Scalable configurations are not allowed in ADTSexcerpt from page linked above:
Trying to extract the AAC audio to an ADTS file with ffmpeg yields the error “Scalable configurations are not allowed in ADTS”, which would suggest this bit is something to do with Scalable Sampling Rate AAC.Whether that's actually the issue here or not, you should probably be aware of it. I never had this issue with any software for direct listening, and only noticed it when I had higher than expected cpu usage on the host + a large delay in the stream starting. Running that script is now part of my post-procesing when I get a new Audible book. Also, contrary to the stated frequency on this issue, I've had it with completely normal books not just audio plays and audible shorts or whatever they say it's used on there.
@advplyr commented on GitHub (Oct 30, 2022):
@itzexor Thanks for that info. There was just someone in discord having issues with direct playing m4b and I believe a re-encode fixed it. Were you using firefox when testing this? I believe chromium browsers do a better job with m4b but I have since tested m4b in firefox and all of mine are able to direct play.
@itzexor commented on GitHub (Oct 30, 2022):
yes i was use firefox, but i think it may also have occurred with the android client. it has been some weeks since i found that so i can't remember the exact details.
@itzexor commented on GitHub (Oct 30, 2022):
If you have an audible plus account, I think this one should be available free for testing and it should be pretty small download. This book exhibits the bug:
https://www.audible.com/pd/Killer-by-Nature-Audiobook/B076XNN4KF
edit:
Here's a list of items in my library which the fix script repairs, mostly audible originals and such as stated in the writeup, but at the bottom of the list is several novels that also have the issue.
@itzexor commented on GitHub (Oct 30, 2022):
Sorry to spam this thread so much, but I also remembered that I did have the same initial issue as here where cancelling the playback would crash the container. I think it only happens when you close the player in the browser during the fallback period, where it's trying to play or whatever but hasn't fallen back to a transcode yet. So you should be able to test that issue if you can find a broken m4b and figure out what is going on there, the underlying cause for the delay/transcode I think is this bit issue tho.
@Pimmetje commented on GitHub (Feb 1, 2023):
Not sure if this is the same but it looks like it. It's a raise condition. It happened when i started playback and my browser had a issue. Not sure what happened. But at the end the container was stopped/crashed.
@ohare93 commented on GitHub (Apr 12, 2023):
For the past month, this bug has been completely absent 👍 it seems the recent updates have helped stabilise whatever was causing it. Thanks! 🎉
@advplyr commented on GitHub (Apr 12, 2023):
@ohare93 Thanks for that follow up. A lot has changed since this original issue so we can consider it closed until someone reproduces.