mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-30 23:40:40 +02:00
[Bug]: edge container giving SQLite error on startup #2145
Closed
opened 2026-04-25 00:03:56 +02:00 by adam
·
29 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
sq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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#2145
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 @ic1415 on GitHub (Aug 4, 2024).
What happened?
When using the following compose file, I am getting an SQLite error at startup:
What did you expect to happen?
Expected that ABS server would start
Steps to reproduce the issue
Audiobookshelf version
edge
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?
None
Logs
Additional Notes
No response
@mikiher commented on GitHub (Aug 4, 2024):
OK, can I ask you to:
docker exec -it audiobookshelf /bin/shls -la /unicode.soPlease paste the result of the ls command here.
Also, which Linux is your docker running on?
@ic1415 commented on GitHub (Aug 4, 2024):
I can not open a shell in the container. I get:
running on raspberry pi OS (Debian bookworm)
@katertier commented on GitHub (Aug 4, 2024):
it's not there, but that's also true for current?
edge:
/ # find . -type f -name "unicode.so"
/ # find . -type f -name "libssl.so.3"
./lib/libssl.so.3
current:
/ # find . -type f -name "unicode.so"
/ # find . -type f -name "libssl.so.3"
./lib/libssl.so.3
@mikiher commented on GitHub (Aug 4, 2024):
It's a new binary that's downloaded and installed by Audiobokshelf itself. It's currently only in edge.
Ah, sorry - that figures, since your container crashes.
is your raspberry pi 32-bit or 64-bit?
@advplyr commented on GitHub (Aug 4, 2024):
The double file extension in the error seems unusual
SQLITE_ERROR: Error loading shared library /unicode.so.so.@mikiher commented on GitHub (Aug 4, 2024):
My hypothesis is that the file /unicode.so is there (we know it was downloaded successfully because the log says so), but sqlite is unable to load it, and so it tries to add another
.soto the name as an alternate path (I know it has this logic), and when that fails, it throws the error.My suspicion is that the reason it unable to load /unicode.so is becuase it is an armhf OS (32-bit), and the sqlean binaries are only available for arm64. @advplyr do we officially support 32-bit systems? If this is indeed the reason, and if we need to support armhf, I might have to either:
Since 2 might take a while to achieve, probably I'll need to implement 1.
But before we do all that, let's first hear from @ic1415
@advplyr commented on GitHub (Aug 4, 2024):
We don't officially support 32-bit. That was dropped in v2.8.0 https://github.com/advplyr/audiobookshelf/releases/tag/v2.8.0
@advplyr commented on GitHub (Aug 4, 2024):
If this is a broader issue we'll find out soon because I'm pushing the v2.12.0 release
@katertier commented on GitHub (Aug 4, 2024):
I see the same error on MacOS X, iMac M4, hence I don't think it's caused by a 32bit issue but it might be arm related...
@advplyr commented on GitHub (Aug 4, 2024):
@katertier Are you sure it is the same error? I just tested on mac and found a separate crash on startup due to a bug with dylib
@mikiher commented on GitHub (Aug 4, 2024):
macOS arm64 is supposed to be supported by SQLean (the binaries exist, at least). Can you please add your crash log to the bug?
@advplyr commented on GitHub (Aug 4, 2024):
It works now with that fix for me. I've now tested on all the platforms so I'm going to go ahead with this release
@katertier commented on GitHub (Aug 4, 2024):
I'm pretty sure... :)
2024-08-04 23:50:02 [2024-08-04 21:50:02.630] INFO: === Starting Server ===
2024-08-04 23:50:02 [2024-08-04 21:50:02.634] INFO: [Server] Init v2.11.0
2024-08-04 23:50:02 [2024-08-04 21:50:02.635] INFO: [Server] Node.js Version: v20.16.0
2024-08-04 23:50:02 [2024-08-04 21:50:02.748] INFO: [BinaryManager] Found valid binary ffmpeg at /ffmpeg
2024-08-04 23:50:02 [2024-08-04 21:50:02.749] INFO: [BinaryManager] Updating process.env.FFMPEG_PATH
2024-08-04 23:50:02 [2024-08-04 21:50:02.776] INFO: [BinaryManager] Found valid binary ffprobe at /ffprobe
2024-08-04 23:50:02 [2024-08-04 21:50:02.776] INFO: [BinaryManager] Updating process.env.FFPROBE_PATH
2024-08-04 23:50:02 [2024-08-04 21:50:02.776] INFO: [BinaryManager] Found valid binary unicode at /unicode.so
2024-08-04 23:50:02 [2024-08-04 21:50:02.776] INFO: [BinaryManager] Updating process.env.SQLEAN_UNICODE_PATH
2024-08-04 23:50:02 [2024-08-04 21:50:02.777] INFO: [Database] Initializing db at "/config/absdatabase.sqlite"
2024-08-04 23:50:02 [2024-08-04 21:50:02.802] INFO: [Database] Loading extension /unicode.so
2024-08-04 23:50:02 [2024-08-04 21:50:02.802] ERROR: [Database] Failed to load extension /unicode.so [Error: SQLITE_ERROR: Error loading shared library /unicode.so.so: No such file or directory] {
2024-08-04 23:50:02 errno: 1,
2024-08-04 23:50:02 code: 'SQLITE_ERROR'
2024-08-04 23:50:02 } (Database.js:236)
2024-08-04 23:50:02 [2024-08-04 21:50:02.803] ERROR: [Database] Failed to connect to db [Error: SQLITE_ERROR: Error loading shared library /unicode.so.so: No such file or directory] {
2024-08-04 23:50:02 errno: 1,
2024-08-04 23:50:02 code: 'SQLITE_ERROR'
2024-08-04 23:50:02 } (Database.js:214)
2024-08-04 23:50:02 [2024-08-04 21:50:02.804] FATAL: [Server] Unhandled rejection: Error: Database connection failed, promise: Promise {
2024-08-04 23:50:02 Error: Database connection failed
2024-08-04 23:50:02 at Database.init (/server/Database.js:168:13)
2024-08-04 23:50:02 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-08-04 23:50:02 at async Server.init (/server/Server.js:114:5)
2024-08-04 23:50:02 at async Server.start (/server/Server.js:177:5)
2024-08-04 23:50:02 } (Server.js:169)
@katertier commented on GitHub (Aug 4, 2024):
@advplyr: Thanks! A bit too late for me (midnight is approaching where I am), but I'll check first thing in the morning.
@advplyr commented on GitHub (Aug 5, 2024):
My fix isn't going to fix that error. My mac downloads the
.dylibbecause process.platform output isdarwin. Not sure why that wouldn't be the case for your mac@mikiher commented on GitHub (Aug 5, 2024):
Ah, sorry, and thanks for fixing that!
it would be good to add the following lines after
[Server] Node.js VersionI believe docker containers on macOS run in a lightweight linux virtual machine, similar to Windows. that's why @katertier's BinaryManager will still download the .so version (and hopefully the arm64 version).
@vutsalsinghal commented on GitHub (Aug 5, 2024):
Same error on 64bit raspberry pi
I've reverted to v2.11.0 for now
@ic1415 commented on GitHub (Aug 5, 2024):
Catching up, but it is arm64 so no compatibility issues there
Edit: attempted to install 2.12.0 and received the same error. Rolled back to 2.11 for the time being.
@advplyr commented on GitHub (Aug 5, 2024):
Can you share the new logs that were added below "Node.js version" when starting the server? That gives us the variables that are being used to decide which binaries to use
@ic1415 commented on GitHub (Aug 5, 2024):
[2024-08-04 20:30:01.283] INFO: === Starting Server ===
[2024-08-04 20:30:01.287] INFO: [Server] Init v2.12.0
[2024-08-04 20:30:01.288] INFO: [Server] Node.js Version: v20.16.0
[2024-08-04 20:30:01.289] INFO: [Server] Platform: linux
[2024-08-04 20:30:01.289] INFO: [Server] Arch: arm64
@mikiher commented on GitHub (Aug 5, 2024):
Ok, thank you all.
So to summarize what we know at this point, it looks like on linux-arm64, BinaryManager seems to have downloaded some version of unicode.so, but SQLite is unable to load that library.
I'll continue to investigate. In the the meantime, my recommendation would be of course to stay with release 2.11.0 if your system is running on Linux arm64.
Sorry for the hassle.
@2fst4u commented on GitHub (Aug 5, 2024):
Same issue for me on arm64. I have a mixed cluster so I have pinned audiobookshelf to one of my x86 nodes and it started fine so it definitely seems isolated to arm64.
@ScuttleSE commented on GitHub (Aug 5, 2024):
Same here, broken om arm64...
@JBaby9783 commented on GitHub (Aug 5, 2024):
I don't know anything about this error, but I installed 2.12.0 on my M4 iMac and I couldn't access my server. I'm back on 2.11.0.
@mikiher commented on GitHub (Aug 5, 2024):
OK, an update: I submitted a fix for review. Hopefully it will be merged (and released) later today.
@devnoname120 commented on GitHub (Aug 5, 2024):
Same issue on Asahi Linux (aarch64):
@Machou commented on GitHub (Aug 5, 2024):
Same Here :)
@devnoname120 commented on GitHub (Aug 5, 2024):
See this PR for a proper fix: https://github.com/advplyr/audiobookshelf/pull/3236
@github-actions[bot] commented on GitHub (Aug 5, 2024):
Fixed in v2.12.1.