mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: Not possible to upgrade to latest version #2771
Open
opened 2026-04-25 00:10:22 +02:00 by adam
·
50 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
sql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1.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#2771
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 @Cotignac on GitHub (May 15, 2025).
What happened?
I have just tried to upgrade my setup of Audiobookshelf to the latest version. After the upgrade I'm getting the error message from the log below.
I'm running docker on a Synology NAS and have been using Portainer to upgrade Audiobookshelf to the latest version.
The version of Portainer I'm using is portainer.io Community Edition 2.19.4.
I've noticed that the size of the latest image is only 311.4 MB while the previous one that I deployed on April 27 is 603.4 MB.
The status of the container in Portainer is "exited".
What did you expect to happen?
I expected (as before) Audiobookshelf to start with the latest version.
Steps to reproduce the issue
Audiobookshelf version
Don't know the exact version since I can't start Audiobookshelf. It's the latest as of today.
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Linux
If the issue is being seen in the UI, what browsers are you seeing the problem on?
Edge
Logs
Additional Notes
No response
@Vito0912 commented on GitHub (May 15, 2025):
Duplicate of https://github.com/advplyr/audiobookshelf/issues/4289
@Kapot commented on GitHub (May 15, 2025):
This is marked as a duplicate, but i'd like to add that the suggested solutions there dont seem to work for me.
Only using advplyr/audiobookshelf:2.21.0 as image (so a downgrade) makes me able to run it again.
@Cotignac commented on GitHub (May 15, 2025):
I'm not familiar with how to downgrade. Never been forced to do that. Please let me know how to do it.
@Kapot commented on GitHub (May 15, 2025):
Duplicate/Edit the container, but edit the image to advplyr/audiobookshelf:2.21.0. Deploy the container.
@Vito0912 commented on GitHub (May 15, 2025):
I also think that the original issue should be reopened because the solutions listed there do not work for everyone (but I am just a contributor, not a maintainer, so it's any opinion anyways). It would be better to collect logs and solutions in one issue instead of having several, which is why I made a notice about duplicates.
@Cotignac commented on GitHub (May 15, 2025):
I have to agree.
I've tried to downgrade to version 2.21.0 and to 2.20.0 and none of them works.
@Vito0912 commented on GitHub (May 15, 2025):
One idea I have is to completely delete the container by running
docker compose downand thendocker compose up -d. Keep in mind that this will remove all data and volumes that are not properly bound.I don't see how this should help, but I also don't see why this issue is there in the first place and then only for a few people
@ykarus117 commented on GitHub (May 15, 2025):
Same error with portainer after re-creating the container with latest image from 2.21.0
@mkstephenson commented on GitHub (May 15, 2025):
On Synology I was able to get it running after cleaning the project and rebuilding (I am running it using docker compose in the container manager).
@advplyr commented on GitHub (May 15, 2025):
Last time this came up with Synology someone broke down exactly why this happens. It is a Synology bug with container caching or something like that, idk I don't have a Synology to test with.
@advplyr commented on GitHub (May 15, 2025):
Here is some info. https://github.com/advplyr/audiobookshelf/issues/3868#issuecomment-2605327783
@Vito0912 commented on GitHub (May 15, 2025):
For anyone using Portainer (or ofc docker compose), this was resolved by accident when I tried the following with someone:
Add these lines to your Docker Compose file (using the same indentation as
image):Recreate the container, then remove these lines and recreate the container again.
If you still have the issue after this, please contact me. Hopefully, we can figure out the problem together.
Just note that these lines
doshould not actually solve the problem. I only add thes to stop the Docker container from restarting over and over to get a look at the file system.These just prevent the node command from running and won't start ABS
Unfortunately, this is not just a Synology issue (although Synology does seem to be affected more often).
@ykarus117 commented on GitHub (May 15, 2025):
I'm not using Synology (I'm on a default Ubuntu server 24.04.2 LTS installation), apologies I should have specified it beforehand.
@nathang21 commented on GitHub (May 15, 2025):
I confirmed this worked for me, without changing anything else. Super weird, not sure how to explain this.
docker compose down --> add those 2 lines to compose file --> docker compose up --> wait a min --> docker compose down --> remove those 2 lines from compose file --> docker compose up again.
Edit I spoke too soon, it started crash looping again but it might be due to my healthcheck, which I have since disabled.
@DieselTech commented on GitHub (May 15, 2025):
Yes, ABS does not use
curlat all and it was removed from the container image. The project also never included healthchecks in any of the documentation. Unless your actively monitoring your healthchecks using another program / outside service you are likely just causing more headache than your solving with them. If you really must run a healthcheck,wgetis installed in the container you can use. Otherwise I would just recommend disabling the check.@postnick commented on GitHub (May 15, 2025):
Using this image worked for me for now. I thought I broke my permissions because I was having issues with a few containers as well.
ghcr.io/advplyr/audiobookshelf:2.20.0
@waschinski commented on GitHub (May 15, 2025):
I am using Cosmos Cloud for my docker stuff and got it working by removing all
NUSQLITErelated env vars as well as changing the working_dir path in its compose file from/to/app.@nichwall commented on GitHub (May 15, 2025):
You'll want to keep the NUSQLITE variables, that is used for SQLite extensions for sorting and filtering.Edit, I misunderstood, you can safely remove these variables from your compose. I thought you meant manually changing the Dockerfile that builds the image to get rid of them.@waschinski commented on GitHub (May 15, 2025):
I think those have been NUSQLITE3_DIR and NUSQLITE3_PATH. But I can't tell for sure.
Anyway, I didn't explicitly set those env vars and they must have been set to a(n old, outdated?) default value anyway when I set up the container right before the new version released.
@friral commented on GitHub (May 15, 2025):
I have a Synology and encountered the same error.
To rollback to Version 2.21.0 - which ran fine right before the update - I did the following:
Since Synology UI doesnt let you edit things like that this solved the problem for me because I could rollback to the previous version
@nichwall commented on GitHub (May 15, 2025):
The latest version is
2.22.0, not2.20.0@sbsaylors commented on GitHub (May 16, 2025):
I should've given more info. On ubuntu, coming from 2.21.0
Tried and the result...
ghcr.io/advplyr/audiobookshelf::latest -> Got the error.
ghcr.io/advplyr/audiobookshelf:2.22.0 -> Got the error.
ghcr.io/advplyr/audiobookshelf:2.20.0 -> Was good
ghcr.io/advplyr/audiobookshelf:2.21.0 -> Was good
ghcr.io/advplyr/audiobookshelf:2.22.0 -> Again got the error. Went back to 2.21.0 with success.
@decaba commented on GitHub (May 16, 2025):
This totally worked for me. I am not using Synology.
@Cotignac commented on GitHub (May 16, 2025):
I'm sorry but I'm not technical enough to find the Docker Compose file.
Can anyone tell me where to find it and be able to add the lines proposed?
@nichwall commented on GitHub (May 16, 2025):
@waschinski sorry I think I misunderstood. Were you saying you removed those paths from your docker compose, or the Dockerfile (which builds the image)? I was thinking the Dockerfile, you would be fine to remove from the compose, my bad.
@waschinski commented on GitHub (May 16, 2025):
Yeah, just from the compose file.
Cosmos Cloud is basically using an enhanced docker compose file internally (called cosmos compose). I just removed it from there in order to reset it to any defaults. I think it's caching those values in there and it can be one reason to break images with significant changes, similar to Synology etc
Thanks for clearing this up as I was a little confused about the comment to be honest. :)
@Vito0912 commented on GitHub (May 16, 2025):
Before adding any new comments, please check if the following descriptions help resolve your issue.
Before trying any of the steps below, make sure you have already recreated or reset your container.
Next, check your Docker Compose file.
It should include the following volumes:
Here,
/any/pathcan be any path on your system, and/libraryshould be the path defined as your library in ABS. Each path you add should have its own line undervolumes.Note:
/configand/metadataare required regardless of how many libraries you have or where they are located.A library with
/audiobooksand/ebooksas library paths should look somewhat like this:Environment Variables
Curl and Health Checks
If your logs mention issues with
curl, you have likely added a custom health check.If you’re unsure what this means, you may have copied a tutorial. The simple solution:
Remove the healthcheck section from your Compose file. It might look like this:
Remove everything including
healthcheckuntil the next same indentation level. The whole section above would be needed to be removed.If you really need health checks (only necessary if you actively use them), see: https://github.com/advplyr/audiobookshelf/issues/4292#issuecomment-2888360553
Issue with
index.jsThis issue often occurs when using a container manager like Synology or Portainer. There are three (or two) simple solutions:
Portainer:
See this solution by Juzif: https://github.com/advplyr/audiobookshelf/issues/4292#issuecomment-2888299461
(Accuracy not verified, but linked for reference.)
Synology Container Manager:
See this solution by edoubleoo: https://github.com/advplyr/audiobookshelf/issues/4292#issuecomment-2888288664
(Accuracy not verified, but linked for reference.)
General Solution:
Go to your stack, copy the content of your Compose file (starting with
services:), delete the stack, and create a new one with the pasted content.Warning: This will delete all volumes that are not bind mounts. (See the explanation about volumes at the start of this comment.)
Safest Option:
Add the following to your Docker Compose file:
Example:
Example Docker Compose
!After recreating the container, simply remove these lines and recreate again. You should now be good to go.!
You can use the same approach with
working_diras described in Option 4, but it is important to remove it afterwards.@edoubleoo commented on GitHub (May 17, 2025):
For those struggling with this issue within a Synology deployment:
This issue occurs between the previous container and the newly created upgrade container. Once the new container is started, it will not be able to connect to index.js.
To overcome this issue, once the image has been updated within the Synology Container Manager, you will have to STOP and delete the container (DO NOT DELETE ANY LOCAL VOLUMES) and start a new container connected to all local volumes as was previously used.
This issue will be resolved once a new container has been deployed.
@Juzif commented on GitHub (May 17, 2025):
For those struggling with this issue within a Portainer deployment:
I had this error on Portainer when running Audiobookshelf 2.22.0:
Error: Cannot find module '/index.js'
Following the suggested solution, this issue results from overriding the container’s startup settings. Here’s how to fix it entirely from the Portainer UI—no CLI needed.
1. Revert Command and Entrypoint
2. Verify Volume Mappings
Under Volumes, keep only these binds:
/podcasts→host_path/Podcasts/audiobooks→host_path/audiobooks/config→host_path/audiobookshelf/config/metadata→host_path/MetadataRemove any mount on
/,/appor the container root.3. Check Environment Variables
In Env, define only:
PORT=80NODE_ENV=productionCONFIG_PATH=/configMETADATA_PATH=/metadataDelete extras such as
NODE_VERSIONorYARN_VERSION.4. Pull and Redeploy
Portainer will fetch a fresh copy and use the built-in
index.js. Your Audiobookshelf container should start without errors.I hope this helps, and thanks. Happy listening! 🎧
@noticons commented on GitHub (May 17, 2025):
For anyone who is unsure how to get
wgetproperly setup, since it uses different flags from curl, here is what I use in my docker-compose for audiobookshelf:Of course, you may prefer (or need) to have
localhostinstead of127.0.0.1. But there you go!@designgears commented on GitHub (May 18, 2025):
This change broke something. I had to change CMD from
node index.jstonode /app/index.jsthen it works fine.@advplyr commented on GitHub (May 18, 2025):
I responded to your comment https://github.com/advplyr/audiobookshelf/commit/fd0af6b2dddce3f951f5a27da8e9568baaaeb59c#commitcomment-157328322
Both of those CMD's are valid
@designgears commented on GitHub (May 19, 2025):
I deploy with a docker-compose.yml file from command line. I have been deploying it like this for at least a year now. I can trace the problem back to that commit I commented on.
Normally when you attach to a container from command line it drops into the working dir, but I get dropped into root now instead of /app.
Furthermore, I can symlink /index.js from /app/index.js and it works fine.
@nichwall commented on GitHub (May 19, 2025):
Yes, that commit changed how the docker image is built. Make sure you have fully removed any existing Audiobookshelf containers and images, then upgrade to ensure you are pulling a new image. You can read the above comments to get more information.
Edit to add because you have added more information:
Audiobookshelf has never used the UID or GID environment variables. You can use the
user: [uid]:[gid]directive. Is there a reason you are manually specifying the working directory?@designgears commented on GitHub (May 19, 2025):
Im testing this on a completely different server.
@designgears commented on GitHub (May 19, 2025):
Yes, I was trying to get it to work, setting it outside and pointing directly to the file got it working for me. UID/GID is my copy/paste fail, most of my docker images come from linuxservers.io and that's something they all do.
@advplyr commented on GitHub (May 19, 2025):
Ah yeah if you are overriding the working dir like that then the CMD won't work because the CMD is for if the working dir is /app.
@designgears commented on GitHub (May 19, 2025):
@designgears commented on GitHub (May 19, 2025):
In the end I blew everything away, and setup fresh and it worked as intended without the workarounds. Not sure why it wasn't working before.
@nichwall commented on GitHub (May 19, 2025):
It still sounds like you are using a cached version of the image or container. Please make sure you have fully removed all of the local Audiobookshelf images and containers. You can also try manually specifying the version number instead of
:latest.@designgears commented on GitHub (May 19, 2025):
I was manually starting the containers while testing with 4 different version, manually specifying the version, the 3 most recent releases and my own compiled version.
@postnick commented on GitHub (May 20, 2025):
I'm on Portioner - I have a Custom Stack - I keep my config in a NFS Drive but you all could just backup your config.
I deleted my whole stack and made a new stack and it is working fine on 2.23.0 now using the :Latest tag.
I do see the image is half the size of before but it seems to be working fine for now.
So Solution - Docker is like Cattle, Kill it and grow a new one.
@advplyr commented on GitHub (May 20, 2025):
That is the improvement that was made to the Dockerfile
@designgears commented on GitHub (May 21, 2025):
I have my data mounted to another drive as well, it still took blowing away the data directory and pulling the new image to get things working oob like it should. Not sure why that is, but works now.
@000al000 commented on GitHub (May 21, 2025):
Change the working directory to /app, so node index.js resolves correctly
@designgears commented on GitHub (May 23, 2025):
another person not reading, nice.
@BastionNtB commented on GitHub (May 26, 2025):
Just want to add here, these improvements, while I understand them, they removed the ability for a healthcheck in the container as curl no longer exists on the image. Not too big of an issue, but it would be nice if it was still there so that the healthcheck could pass.
@nichwall commented on GitHub (May 26, 2025):
https://github.com/advplyr/audiobookshelf/issues/4292#issuecomment-2884326993
@BastionNtB commented on GitHub (May 26, 2025):
Missed the point about wget on there, I skipped that part it seems lol :P my bad.
@DanielOaks commented on GitHub (Jun 14, 2025):
https://github.com/advplyr/audiobookshelf/issues/4292#issuecomment-2888299461
I'm on Portainer and this fixed my issue – thanks very much for the clear instructions mate!