[Bug]: error code 1 #2343

Closed
opened 2026-02-20 02:16:06 -05:00 by deekerman · 4 comments
Owner

Originally created by @LordNyrox on GitHub (Aug 9, 2024).

What happened?

I just updated to the latest version, and it seemed to work. Then I deleted 4 audiobooks that were no longer on my PC, and everything stopped working.

What did you expect to happen?

?

Steps to reproduce the issue

  1. Update to v2.12.2
  2. Remove files that are not on your machine anymore
  3. Refresh WebUI

Audiobookshelf version

v2.12.2

How are you running audiobookshelf?

Windows Tray App

What OS is your Audiobookshelf server hosted from?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

None

Logs

production Config C:\Users\mysti\AppData\Local\Audiobookshelf\config C:\Users\mysti\AppData\Local\Audiobookshelf\metadata
[2024-08-10 01:16:22.866] INFO: === Starting Server ===
[2024-08-10 01:16:22.868] INFO: [Server] Init v2.12.2
[2024-08-10 01:16:22.868] INFO: [Server] Node.js Version: v20.11.1
[2024-08-10 01:16:22.868] INFO: [Server] Platform: win32
[2024-08-10 01:16:22.868] INFO: [Server] Arch: x64
[2024-08-10 01:16:24.790] INFO: [BinaryManager] Found valid binary ffmpeg at C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\ffmpeg.exe
[2024-08-10 01:16:24.790] INFO: [BinaryManager] Updating process.env.FFMPEG_PATH
[2024-08-10 01:16:29.503] INFO: [BinaryManager] Found valid binary ffprobe at C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\ffprobe.exe
[2024-08-10 01:16:29.503] INFO: [BinaryManager] Updating process.env.FFPROBE_PATH
[2024-08-10 01:16:29.560] INFO: [BinaryManager] Found valid binary unicode at C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\unicode.dll
[2024-08-10 01:16:29.561] INFO: [BinaryManager] Updating process.env.SQLEAN_UNICODE_PATH
[2024-08-10 01:16:29.561] INFO: [Database] Initializing db at "C:\Users\mysti\AppData\Local\Audiobookshelf\config\absdatabase.sqlite"
[2024-08-10 01:16:29.645] INFO: [Database] Loading extension C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\unicode.dll
[2024-08-10 01:16:30.153] INFO: [Database] Successfully loaded extension C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\unicode.dll
[2024-08-10 01:16:30.153] INFO: [Database] Db connection was successful
[2024-08-10 01:16:30.236] INFO: [Database] Db initialized with models: user, library, libraryFolder, book, podcast, podcastEpisode, libraryItem, mediaProgress, series, bookSeries, author, bookAuthor, collection, collectionBook, playlist, playlistMediaItem, device, playbackSession, feed, feedEpisode, setting, customMetadataProvider, mediaItemShare
[2024-08-10 01:16:30.252] WARN: Found book "Hésitation" with no libraryItem - removing it (    at Database.cleanDatabase (C:\snapshot\audiobookshelf\server\Database.js))
[2024-08-10 01:16:30.261] FATAL: [Server] Unhandled rejection: SequelizeDatabaseError: SQLITE_CORRUPT: database disk image is malformed, promise: Promise {
  <rejected> Error
      at Database.<anonymous> (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\sqlite\query.js:185:27)
      at C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\sqlite\query.js:183:50
      at new Promise (<anonymous>)
      at Query.run (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\sqlite\query.js:183:12)
      at C:\snapshot\audiobookshelf\node_modules\sequelize\lib\sequelize.js:315:28
      at async SQLiteQueryInterface.delete (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\abstract\query-interface.js:393:12)
      at async Book.destroy (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\model.js:2627:16)
      at async Database.cleanDatabase (C:\snapshot\audiobookshelf\server\Database.js)
      at async Database.loadData (C:\snapshot\audiobookshelf\server\Database.js)
      at async Database.init (C:\snapshot\audiobookshelf\server\Database.js) {
    name: 'SequelizeDatabaseError',
    parent: [Error: SQLITE_CORRUPT: database disk image is malformed] {
      errno: 11,
      code: 'SQLITE_CORRUPT',
      sql: "DELETE FROM `books` WHERE `id` = 'ed9661ae-40af-4488-a6ae-8a8ef30c2fb0'"
    },
    original: [Error: SQLITE_CORRUPT: database disk image is malformed] {
      errno: 11,
      code: 'SQLITE_CORRUPT',
      sql: "DELETE FROM `books` WHERE `id` = 'ed9661ae-40af-4488-a6ae-8a8ef30c2fb0'"
    },
    sql: "DELETE FROM `books` WHERE `id` = 'ed9661ae-40af-4488-a6ae-8a8ef30c2fb0'",
    parameters: {}
  }
} (    at process.<anonymous> (C:\snapshot\audiobookshelf\server\Server.js))

Additional Notes

No response

Originally created by @LordNyrox on GitHub (Aug 9, 2024). ### What happened? I just updated to the latest version, and it seemed to work. Then I deleted 4 audiobooks that were no longer on my PC, and everything stopped working. ### What did you expect to happen? ? ### Steps to reproduce the issue 1. Update to v2.12.2 2. Remove files that are not on your machine anymore 3. Refresh WebUI ### Audiobookshelf version v2.12.2 ### How are you running audiobookshelf? Windows Tray App ### What OS is your Audiobookshelf server hosted from? Windows ### If the issue is being seen in the UI, what browsers are you seeing the problem on? None ### Logs ```shell production Config C:\Users\mysti\AppData\Local\Audiobookshelf\config C:\Users\mysti\AppData\Local\Audiobookshelf\metadata [2024-08-10 01:16:22.866] INFO: === Starting Server === [2024-08-10 01:16:22.868] INFO: [Server] Init v2.12.2 [2024-08-10 01:16:22.868] INFO: [Server] Node.js Version: v20.11.1 [2024-08-10 01:16:22.868] INFO: [Server] Platform: win32 [2024-08-10 01:16:22.868] INFO: [Server] Arch: x64 [2024-08-10 01:16:24.790] INFO: [BinaryManager] Found valid binary ffmpeg at C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\ffmpeg.exe [2024-08-10 01:16:24.790] INFO: [BinaryManager] Updating process.env.FFMPEG_PATH [2024-08-10 01:16:29.503] INFO: [BinaryManager] Found valid binary ffprobe at C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\ffprobe.exe [2024-08-10 01:16:29.503] INFO: [BinaryManager] Updating process.env.FFPROBE_PATH [2024-08-10 01:16:29.560] INFO: [BinaryManager] Found valid binary unicode at C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\unicode.dll [2024-08-10 01:16:29.561] INFO: [BinaryManager] Updating process.env.SQLEAN_UNICODE_PATH [2024-08-10 01:16:29.561] INFO: [Database] Initializing db at "C:\Users\mysti\AppData\Local\Audiobookshelf\config\absdatabase.sqlite" [2024-08-10 01:16:29.645] INFO: [Database] Loading extension C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\unicode.dll [2024-08-10 01:16:30.153] INFO: [Database] Successfully loaded extension C:\Users\mysti\AppData\Local\Programs\Audiobookshelf\unicode.dll [2024-08-10 01:16:30.153] INFO: [Database] Db connection was successful [2024-08-10 01:16:30.236] INFO: [Database] Db initialized with models: user, library, libraryFolder, book, podcast, podcastEpisode, libraryItem, mediaProgress, series, bookSeries, author, bookAuthor, collection, collectionBook, playlist, playlistMediaItem, device, playbackSession, feed, feedEpisode, setting, customMetadataProvider, mediaItemShare [2024-08-10 01:16:30.252] WARN: Found book "Hésitation" with no libraryItem - removing it ( at Database.cleanDatabase (C:\snapshot\audiobookshelf\server\Database.js)) [2024-08-10 01:16:30.261] FATAL: [Server] Unhandled rejection: SequelizeDatabaseError: SQLITE_CORRUPT: database disk image is malformed, promise: Promise { <rejected> Error at Database.<anonymous> (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\sqlite\query.js:185:27) at C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\sqlite\query.js:183:50 at new Promise (<anonymous>) at Query.run (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\sqlite\query.js:183:12) at C:\snapshot\audiobookshelf\node_modules\sequelize\lib\sequelize.js:315:28 at async SQLiteQueryInterface.delete (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\dialects\abstract\query-interface.js:393:12) at async Book.destroy (C:\snapshot\audiobookshelf\node_modules\sequelize\lib\model.js:2627:16) at async Database.cleanDatabase (C:\snapshot\audiobookshelf\server\Database.js) at async Database.loadData (C:\snapshot\audiobookshelf\server\Database.js) at async Database.init (C:\snapshot\audiobookshelf\server\Database.js) { name: 'SequelizeDatabaseError', parent: [Error: SQLITE_CORRUPT: database disk image is malformed] { errno: 11, code: 'SQLITE_CORRUPT', sql: "DELETE FROM `books` WHERE `id` = 'ed9661ae-40af-4488-a6ae-8a8ef30c2fb0'" }, original: [Error: SQLITE_CORRUPT: database disk image is malformed] { errno: 11, code: 'SQLITE_CORRUPT', sql: "DELETE FROM `books` WHERE `id` = 'ed9661ae-40af-4488-a6ae-8a8ef30c2fb0'" }, sql: "DELETE FROM `books` WHERE `id` = 'ed9661ae-40af-4488-a6ae-8a8ef30c2fb0'", parameters: {} } } ( at process.<anonymous> (C:\snapshot\audiobookshelf\server\Server.js)) ``` ### Additional Notes _No response_
deekerman 2026-02-20 02:16:06 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Vito0912 commented on GitHub (Aug 9, 2024):

Please update to the newest version and load the db from an backup if you have.
It should be fixed

@Vito0912 commented on GitHub (Aug 9, 2024): Please update to the newest version and load the db from an backup if you have. It should be fixed
Author
Owner

@LordNyrox commented on GitHub (Aug 9, 2024):

Please update to the newest version and load the db from an backup if you have. It should be fixed

Thanks, might be a trivial question, but how do I manually update this since the tray says it's the latest?
Capture d'écran 2024-08-10 013227

@LordNyrox commented on GitHub (Aug 9, 2024): > Please update to the newest version and load the db from an backup if you have. It should be fixed Thanks, might be a trivial question, but how do I manually update this since the tray says it's the latest? ![Capture d'écran 2024-08-10 013227](https://github.com/user-attachments/assets/84549d7a-3d84-4a83-9002-00e33dc86bd6)
Author
Owner

@Vito0912 commented on GitHub (Aug 9, 2024):

I don't use the Windows app myself, but it appears to be a separate build available at
https://github.com/mikiher/audiobookshelf-windows/releases.

It seems that the latest version hasn't been built yet.

@Vito0912 commented on GitHub (Aug 9, 2024): I don't use the Windows app myself, but it appears to be a separate build available at https://github.com/mikiher/audiobookshelf-windows/releases. It seems that the latest version hasn't been built yet.
Author
Owner

@LordNyrox commented on GitHub (Aug 9, 2024):

I don't use the Windows app myself, but it appears to be a separate build available at https://github.com/mikiher/audiobookshelf-windows/releases.

It seems that the latest version hasn't been built yet.

Thanks, man! I tried downgrading to v2.12.2-beta and v2.12.1-beta, but they didn't work. I didn't try v2.11.0-beta, but v2.10.1-beta definitely fixed the problem. So if anyone reads this, just download the .exe from the link @Vito0912 shared, execute it, and it should downgrade to that version and work fine. Thanks again, @Vito0912!

@LordNyrox commented on GitHub (Aug 9, 2024): > I don't use the Windows app myself, but it appears to be a separate build available at https://github.com/mikiher/audiobookshelf-windows/releases. > > It seems that the latest version hasn't been built yet. Thanks, man! I tried downgrading to v2.12.2-beta and v2.12.1-beta, but they didn't work. I didn't try v2.11.0-beta, but v2.10.1-beta definitely fixed the problem. So if anyone reads this, just download the .exe from the link @Vito0912 shared, execute it, and it should downgrade to that version and work fine. Thanks again, @Vito0912!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/audiobookshelf#2343
No description provided.