Crashes/restarts after adding large amount of podcast episodes toi download #655

Closed
opened 2026-04-24 23:32:53 +02:00 by adam · 10 comments
Owner

Originally created by @BarbellDwarf on GitHub (Jul 31, 2023).

Steps to reproduce

  1. Add new podcast
  2. Find all episodes and set to download all episodes
  3. Server side service will restart/crash

Expected behaviour

  • It should just add them all to the queue and then download them one by one

Actual behaviour

  • Service will crash/restart, clearing out all downloads, thereby never actually downloading more than 5-10 episodes of the podcast

Environment data

Audiobookshelf Version:

  • Debian V 2.3.3
  • Latest Docker version as well

Notes

How is it handling download data? Is it storing it to a database table or is it adding it somewhere in memory? If it simply added it to a database table and then slowly worked down the table, that may prevent the issue from occurring.

Originally created by @BarbellDwarf on GitHub (Jul 31, 2023). ### Steps to reproduce 1. Add new podcast 2. Find all episodes and set to download all episodes 3. Server side service will restart/crash ### Expected behaviour - It should just add them all to the queue and then download them one by one ### Actual behaviour - Service will crash/restart, clearing out all downloads, thereby never actually downloading more than 5-10 episodes of the podcast ### Environment data Audiobookshelf Version: - Debian V 2.3.3 - Latest Docker version as well ### Notes How is it handling download data? Is it storing it to a database table or is it adding it somewhere in memory? If it simply added it to a database table and then slowly worked down the table, that may prevent the issue from occurring.
adam added the bug label 2026-04-24 23:32:53 +02:00
adam closed this issue 2026-04-24 23:32:54 +02:00
Author
Owner

@BarbellDwarf commented on GitHub (Jul 31, 2023):

Here is the log file:
`2023-07-31 12:18:16

DEBUG

Library Item "/mnt/Media/Podcasts/Jocko Podcast" Media file scan took 15377ms with 398 audio files averaging 626ms per MB

2023-07-31 12:18:17

DEBUG

[FfmpegHelpers] downloadPodcastEpisode: Complete

2023-07-31 12:19:23

DEBUG

[DailyLog] 2023-07-31: Loaded 2394 Logs

2023-07-31 12:19:22

INFO

=== Starting Server ===

2023-07-31 12:19:22

INFO

[Server] Init v2.3.3

2023-07-31 12:19:22

INFO

[Database] Initializing db at "/mnt/Storage/Dockers/audiobookshelf/config/absdatabase.sqlite"

2023-07-31 12:19:22

INFO

[Database] Db connection was successful

2023-07-31 12:19:22

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`

@BarbellDwarf commented on GitHub (Jul 31, 2023): Here is the log file: `2023-07-31 12:18:16 DEBUG Library Item "/mnt/Media/Podcasts/Jocko Podcast" Media file scan took 15377ms with 398 audio files averaging 626ms per MB 2023-07-31 12:18:17 DEBUG [FfmpegHelpers] downloadPodcastEpisode: Complete 2023-07-31 12:19:23 DEBUG [DailyLog] 2023-07-31: Loaded 2394 Logs 2023-07-31 12:19:22 INFO === Starting Server === 2023-07-31 12:19:22 INFO [Server] Init v2.3.3 2023-07-31 12:19:22 INFO [Database] Initializing db at "/mnt/Storage/Dockers/audiobookshelf/config/absdatabase.sqlite" 2023-07-31 12:19:22 INFO [Database] Db connection was successful 2023-07-31 12:19:22 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`
Author
Owner

@advplyr commented on GitHub (Jul 31, 2023):

Downloads are queued and handled 1 by 1. All of this is stored in memory so the queue will be gone on server restart. I believe there is a feature request open to persist the queue on server restart but ideally we fix the crash.

That log isn't going to show anything useful unfortunately. You'll have to capture the log of the container or the journalctl of the debian package.

@advplyr commented on GitHub (Jul 31, 2023): Downloads are queued and handled 1 by 1. All of this is stored in memory so the queue will be gone on server restart. I believe there is a feature request open to persist the queue on server restart but ideally we fix the crash. That log isn't going to show anything useful unfortunately. You'll have to capture the log of the container or the `journalctl` of the debian package.
Author
Owner

@BarbellDwarf commented on GitHub (Aug 1, 2023):

Here we go, this is the journalctl output during a crash.

Also ignore the storage, that is just where i had the docker storage for it initially and then i moved it over to a directly installed application and it uses the same storage.

Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           enclosureURL: 'https://dts.podtrac.com/redirect.mp3/chrt.fm/track/E7B282/pdst.fm/e/pfx.vpixl.com/3Q5mz/pscrb.fm/rss/p/injector.simplecastaudio.com/8b762d4e-bdd5-443d-8f47-846abbbf96e1/episodes/11bb8b07-b976-4ac6-a4ae-7d40d1cb5c50/audio/128/default.mp3?aid=rss_feed&awCollectionId=8b762d4e-bdd5-443d-8f47-846abbbf96e1&awEpisodeId=11bb8b07-b976-4ac6-a4ae-7d40d1cb5c50&feed=HKIkuyHi',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           enclosureSize: '3816703',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           enclosureType: 'audio/mpeg',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           publishedAt: 2021-09-10T02:34:12.000Z,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           podcastId: 'ad929c46-ef71-479b-9fd3-9d79f3e129f8',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           audioFile: {
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             index: 1,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             ino: '2002204',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             metadata: [Object],
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             addedAt: 1690840754645,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             updatedAt: 1690840754645,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             trackNumFromMeta: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             discNumFromMeta: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             trackNumFromFilename: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             discNumFromFilename: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             manuallyVerified: false,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             invalid: false,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             exclude: false,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             error: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             format: 'MP2/3 (MPEG audio layer 2/3)',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             duration: 215.719184,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             bitRate: 128000,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             language: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             codec: 'mp3',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             timeBase: '1/14112000',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             channels: 2,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             channelLayout: 'stereo',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             chapters: [],
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             embeddedCoverArt: 'png',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             metaTags: [Object],
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:             mimeType: 'audio/mpeg'
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           chapters: [],
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           extraData: {},
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           updatedAt: 2023-07-31T22:00:17.455Z,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           createdAt: 2023-07-31T22:00:17.455Z
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         _previousDataValues: {
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           id: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           index: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           season: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           episode: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           episodeType: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           title: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           subtitle: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           description: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           pubDate: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           enclosureURL: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           enclosureSize: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           enclosureType: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           publishedAt: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           podcastId: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           audioFile: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           chapters: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           extraData: undefined
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         uniqno: 1,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         _changed: Set(17) {
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'id',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'index',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'season',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'episode',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'episodeType',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'title',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'subtitle',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'description',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'pubDate',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'enclosureURL',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'enclosureSize',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'enclosureType',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'publishedAt',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'podcastId',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'audioFile',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'chapters',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           'extraData'
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         _options: {
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           isNewRecord: true,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           _schema: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           _schemaDelimiter: '',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           attributes: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           include: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           raw: undefined,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:           silent: undefined
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:         isNewRecord: true
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:       },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:       validatorKey: 'not_unique',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:       validatorName: null,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:       validatorArgs: []
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     }
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   ],
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] {
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     errno: 19,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     code: 'SQLITE_CONSTRAINT',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);'
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] {
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     errno: 19,
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     code: 'SQLITE_CONSTRAINT',
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:     sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);'
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   },
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   fields: [ 'id' ],
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]:   sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);'
Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: production Config /mnt/Storage/Dockers/audiobookshelf/config /mnt/Storage/Dockers/audiobookshelf/metadata
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: === Starting Server ===
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Server] Init v2.3.3
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Database] Initializing db at "/mnt/Storage/Dockers/audiobookshelf/config/absdatabase.sqlite"
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Database] Db connection was successful
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] 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
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] DEBUG: Set Log Level to DEBUG (    at Logger.setLogLevel (/snapshot/audiobookshelf/server/Logger.js))
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Database] Loading db data...
Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [LibraryItem] Loading podcast episodes...
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [LibraryItem] Finished loading 8470 podcast episodes in 0.72s
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [LibraryItem] Loading library items...
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [LibraryItem] Finished loading 90 library items in 0.13s
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 90 library items
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 4 users
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 2 libraries
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 0 collections
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 0 playlists
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 39 authors
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 2 series
Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Db data loaded in 1.12s```
@BarbellDwarf commented on GitHub (Aug 1, 2023): Here we go, this is the journalctl output during a crash. Also ignore the storage, that is just where i had the docker storage for it initially and then i moved it over to a directly installed application and it uses the same storage. ```Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: pubDate: 'Fri, 10 Sep 2021 02:34:12 +0000', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: enclosureURL: 'https://dts.podtrac.com/redirect.mp3/chrt.fm/track/E7B282/pdst.fm/e/pfx.vpixl.com/3Q5mz/pscrb.fm/rss/p/injector.simplecastaudio.com/8b762d4e-bdd5-443d-8f47-846abbbf96e1/episodes/11bb8b07-b976-4ac6-a4ae-7d40d1cb5c50/audio/128/default.mp3?aid=rss_feed&awCollectionId=8b762d4e-bdd5-443d-8f47-846abbbf96e1&awEpisodeId=11bb8b07-b976-4ac6-a4ae-7d40d1cb5c50&feed=HKIkuyHi', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: enclosureSize: '3816703', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: enclosureType: 'audio/mpeg', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: publishedAt: 2021-09-10T02:34:12.000Z, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: podcastId: 'ad929c46-ef71-479b-9fd3-9d79f3e129f8', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: audioFile: { Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: index: 1, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: ino: '2002204', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: metadata: [Object], Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: addedAt: 1690840754645, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: updatedAt: 1690840754645, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: trackNumFromMeta: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: discNumFromMeta: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: trackNumFromFilename: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: discNumFromFilename: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: manuallyVerified: false, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: invalid: false, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: exclude: false, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: error: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: format: 'MP2/3 (MPEG audio layer 2/3)', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: duration: 215.719184, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: bitRate: 128000, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: language: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: codec: 'mp3', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: timeBase: '1/14112000', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: channels: 2, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: channelLayout: 'stereo', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: chapters: [], Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: embeddedCoverArt: 'png', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: metaTags: [Object], Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: mimeType: 'audio/mpeg' Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: chapters: [], Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: extraData: {}, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: updatedAt: 2023-07-31T22:00:17.455Z, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: createdAt: 2023-07-31T22:00:17.455Z Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: _previousDataValues: { Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: id: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: index: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: season: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: episode: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: episodeType: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: title: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: subtitle: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: description: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: pubDate: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: enclosureURL: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: enclosureSize: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: enclosureType: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: publishedAt: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: podcastId: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: audioFile: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: chapters: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: extraData: undefined Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: uniqno: 1, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: _changed: Set(17) { Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'id', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'index', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'season', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'episode', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'episodeType', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'title', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'subtitle', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'description', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'pubDate', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'enclosureURL', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'enclosureSize', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'enclosureType', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'publishedAt', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'podcastId', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'audioFile', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'chapters', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: 'extraData' Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: _options: { Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: isNewRecord: true, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: _schema: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: _schemaDelimiter: '', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: attributes: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: include: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: raw: undefined, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: silent: undefined Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: isNewRecord: true Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: validatorKey: 'not_unique', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: validatorName: null, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: validatorArgs: [] Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: } Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: ], Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] { Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: errno: 19, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: code: 'SQLITE_CONSTRAINT', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);' Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] { Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: errno: 19, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: code: 'SQLITE_CONSTRAINT', Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);' Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: }, Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: fields: [ 'id' ], Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);' Jul 31 15:00:17 <ServerName> audiobookshelf[8656]: } Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: production Config /mnt/Storage/Dockers/audiobookshelf/config /mnt/Storage/Dockers/audiobookshelf/metadata Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: === Starting Server === Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Server] Init v2.3.3 Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Database] Initializing db at "/mnt/Storage/Dockers/audiobookshelf/config/absdatabase.sqlite" Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Database] Db connection was successful Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] 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 Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] DEBUG: Set Log Level to DEBUG ( at Logger.setLogLevel (/snapshot/audiobookshelf/server/Logger.js)) Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [Database] Loading db data... Jul 31 15:00:18 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:18] INFO: [LibraryItem] Loading podcast episodes... Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [LibraryItem] Finished loading 8470 podcast episodes in 0.72s Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [LibraryItem] Loading library items... Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [LibraryItem] Finished loading 90 library items in 0.13s Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 90 library items Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 4 users Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 2 libraries Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 0 collections Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 0 playlists Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 39 authors Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Loaded 2 series Jul 31 15:00:19 <ServerName> audiobookshelf[17613]: [2023-07-31 15:00:19] INFO: [Database] Db data loaded in 1.12s```
Author
Owner

@tonyedwardspz commented on GitHub (Aug 16, 2023):

I've started getting a similar error to the OP in the last couple of days for two difference series. For reference, the logs from the container are below.

audiobookshelf_1  | node:internal/process/promises:279
audiobookshelf_1  |             triggerUncaughtException(err, true /* fromPromise */);
audiobookshelf_1  |             ^
audiobookshelf_1  | 
audiobookshelf_1  | Error
audiobookshelf_1  |     at Database.<anonymous> (/node_modules/sequelize/lib/dialects/sqlite/query.js:185:27)
audiobookshelf_1  |     at Database.serialize (<anonymous>)
audiobookshelf_1  |     at /node_modules/sequelize/lib/dialects/sqlite/query.js:183:50
audiobookshelf_1  |     at new Promise (<anonymous>)
audiobookshelf_1  |     at Query.run (/node_modules/sequelize/lib/dialects/sqlite/query.js:183:12)
audiobookshelf_1  |     at /node_modules/sequelize/lib/sequelize.js:315:28
audiobookshelf_1  |     at async SQLiteQueryInterface.insert (/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21)
audiobookshelf_1  |     at async PodcastEpisode.save (/node_modules/sequelize/lib/model.js:2490:35)
audiobookshelf_1  |     at async Function.create (/node_modules/sequelize/lib/model.js:1362:12)
audiobookshelf_1  |     at async Function.fullUpdateFromOld (/server/models/LibraryItem.js:257:15) {
audiobookshelf_1  |   name: 'SequelizeUniqueConstraintError',
audiobookshelf_1  |   errors: [
audiobookshelf_1  |     ValidationErrorItem {
audiobookshelf_1  |       message: 'id must be unique',
audiobookshelf_1  |       type: 'unique violation',
audiobookshelf_1  |       path: 'id',
audiobookshelf_1  |       value: 'a49bf00f-a32b-4717-9f03-00e36d7f062d',
audiobookshelf_1  |       origin: 'DB',
audiobookshelf_1  |       instance: podcastEpisode {
audiobookshelf_1  |         dataValues: {
audiobookshelf_1  |           id: 'a49bf00f-a32b-4717-9f03-00e36d7f062d',
audiobookshelf_1  |           index: 277,
audiobookshelf_1  |           season: '1',
audiobookshelf_1  |           episode: '115',
audiobookshelf_1  |           episodeType: null,
audiobookshelf_1  |           title: '115. The Gunpowder Plot',
audiobookshelf_1  |           subtitle: '‘Remember, remember / the Fifth of November / Gunpowder, treason & plot.”  Tom & Dominic explore what - if it had succeeded - would have been the most spectacular terrorist attack in British history?',
audiobookshelf_1  |           description: '<p>‘Remember, remember / the Fifth of November / Gunpowder, treason &amp; plot.” But what is it exactly we are remembering on Bonfire Night? Tom &amp; Dominic explore what - if it had succeeded - would have been the most spectacular terrorist attack in British history: its background, its legacy, &amp; the controversies that still bedevil our understanding of it.</p><p><br /></p><p>*The Rest Is History Live Tour 2023*:</p><p><br /></p><p>Tom and Dominic are back on tour this autumn! See them live in London, New Zealand, and Australia!</p><p><br /></p><p>Buy your tickets here: restishistorypod.com</p><p><br /></p><p>Twitter: </p><p><br /></p><p>@TheRestHistory</p><p><br /></p><p>@holland_tom</p><p><br /></p><p>@dcsandbrook</p><p> </p><p>Learn more about your ad choices. Visit <a href="https://podcastchoices.com/adchoices">podcastchoices.com/adchoices</a></p>',
audiobookshelf_1  |           pubDate: 'Thu, 04 Nov 2021 02:00:00 -0000',
audiobookshelf_1  |           enclosureURL: null,
audiobookshelf_1  |           enclosureSize: null,
audiobookshelf_1  |           enclosureType: null,
audiobookshelf_1  |           publishedAt: 2021-11-04T02:00:00.000Z,
audiobookshelf_1  |           podcastId: '1ee96937-96fa-4189-889b-5e2da4dd1c91',
audiobookshelf_1  |           audioFile: {
audiobookshelf_1  |             index: 1,
audiobookshelf_1  |             ino: '110861',
audiobookshelf_1  |             metadata: [Object],
audiobookshelf_1  |             addedAt: 1692173199336,
audiobookshelf_1  |             updatedAt: 1692173199336,
audiobookshelf_1  |             trackNumFromMeta: 115,
audiobookshelf_1  |             discNumFromMeta: 1,
audiobookshelf_1  |             trackNumFromFilename: null,
audiobookshelf_1  |             discNumFromFilename: null,
audiobookshelf_1  |             manuallyVerified: false,
audiobookshelf_1  |             invalid: false,
audiobookshelf_1  |             exclude: false,
audiobookshelf_1  |             error: null,
audiobookshelf_1  |             format: 'MP2/3 (MPEG audio layer 2/3)',
audiobookshelf_1  |             duration: 3437.217959,
audiobookshelf_1  |             bitRate: 64000,
audiobookshelf_1  |             language: null,
audiobookshelf_1  |             codec: 'mp3',
audiobookshelf_1  |             timeBase: '1/14112000',
audiobookshelf_1  |             channels: 1,
audiobookshelf_1  |             channelLayout: 'mono',
audiobookshelf_1  |             chapters: [],
audiobookshelf_1  |             embeddedCoverArt: null,
audiobookshelf_1  |             metaTags: [Object],
audiobookshelf_1  |             mimeType: 'audio/mpeg'
audiobookshelf_1  |           },
audiobookshelf_1  |           chapters: [],
audiobookshelf_1  |           extraData: {},
audiobookshelf_1  |           updatedAt: 2023-08-16T08:06:48.572Z,
audiobookshelf_1  |           createdAt: 2023-08-16T08:06:48.572Z
audiobookshelf_1  |         },
audiobookshelf_1  |         _previousDataValues: {
audiobookshelf_1  |           id: undefined,
audiobookshelf_1  |           index: undefined,
audiobookshelf_1  |           season: undefined,
audiobookshelf_1  |           episode: undefined,
audiobookshelf_1  |           episodeType: undefined,
audiobookshelf_1  |           title: undefined,
audiobookshelf_1  |           subtitle: undefined,
audiobookshelf_1  |           description: undefined,
audiobookshelf_1  |           pubDate: undefined,
audiobookshelf_1  |           enclosureURL: undefined,
audiobookshelf_1  |           enclosureSize: undefined,
audiobookshelf_1  |           enclosureType: undefined,
audiobookshelf_1  |           publishedAt: undefined,
audiobookshelf_1  |           podcastId: undefined,
audiobookshelf_1  |           audioFile: undefined,
audiobookshelf_1  |           chapters: undefined,
audiobookshelf_1  |           extraData: undefined
audiobookshelf_1  |         },
audiobookshelf_1  |         uniqno: 1,
audiobookshelf_1  |         _changed: Set(17) {
audiobookshelf_1  |           'id',
audiobookshelf_1  |           'index',
audiobookshelf_1  |           'season',
audiobookshelf_1  |           'episode',
audiobookshelf_1  |           'episodeType',
audiobookshelf_1  |           'title',
audiobookshelf_1  |           'subtitle',
audiobookshelf_1  |           'description',
audiobookshelf_1  |           'pubDate',
audiobookshelf_1  |           'enclosureURL',
audiobookshelf_1  |           'enclosureSize',
audiobookshelf_1  |           'enclosureType',
audiobookshelf_1  |           'publishedAt',
audiobookshelf_1  |           'podcastId',
audiobookshelf_1  |           'audioFile',
audiobookshelf_1  |           'chapters',
audiobookshelf_1  |           'extraData'
audiobookshelf_1  |         },
audiobookshelf_1  |         _options: {
audiobookshelf_1  |           isNewRecord: true,
audiobookshelf_1  |           _schema: null,
audiobookshelf_1  |           _schemaDelimiter: '',
audiobookshelf_1  |           attributes: undefined,
audiobookshelf_1  |           include: undefined,
audiobookshelf_1  |           raw: undefined,
audiobookshelf_1  |           silent: undefined
audiobookshelf_1  |         },
audiobookshelf_1  |         isNewRecord: true
audiobookshelf_1  |       },
audiobookshelf_1  |       validatorKey: 'not_unique',
audiobookshelf_1  |       validatorName: null,
audiobookshelf_1  |       validatorArgs: []
audiobookshelf_1  |     }
audiobookshelf_1  |   ],
audiobookshelf_1  |   parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] {
audiobookshelf_1  |     errno: 19,
audiobookshelf_1  |     code: 'SQLITE_CONSTRAINT',
audiobookshelf_1  |     sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);'
audiobookshelf_1  |   },
audiobookshelf_1  |   original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] {
audiobookshelf_1  |     errno: 19,
audiobookshelf_1  |     code: 'SQLITE_CONSTRAINT',
audiobookshelf_1  |     sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);'
audiobookshelf_1  |   },
audiobookshelf_1  |   fields: [ 'id' ],
audiobookshelf_1  |   sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);'
audiobookshelf_1  | }
@tonyedwardspz commented on GitHub (Aug 16, 2023): I've started getting a similar error to the OP in the last couple of days for two difference series. For reference, the logs from the container are below. ``` audiobookshelf_1 | node:internal/process/promises:279 audiobookshelf_1 | triggerUncaughtException(err, true /* fromPromise */); audiobookshelf_1 | ^ audiobookshelf_1 | audiobookshelf_1 | Error audiobookshelf_1 | at Database.<anonymous> (/node_modules/sequelize/lib/dialects/sqlite/query.js:185:27) audiobookshelf_1 | at Database.serialize (<anonymous>) audiobookshelf_1 | at /node_modules/sequelize/lib/dialects/sqlite/query.js:183:50 audiobookshelf_1 | at new Promise (<anonymous>) audiobookshelf_1 | at Query.run (/node_modules/sequelize/lib/dialects/sqlite/query.js:183:12) audiobookshelf_1 | at /node_modules/sequelize/lib/sequelize.js:315:28 audiobookshelf_1 | at async SQLiteQueryInterface.insert (/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21) audiobookshelf_1 | at async PodcastEpisode.save (/node_modules/sequelize/lib/model.js:2490:35) audiobookshelf_1 | at async Function.create (/node_modules/sequelize/lib/model.js:1362:12) audiobookshelf_1 | at async Function.fullUpdateFromOld (/server/models/LibraryItem.js:257:15) { audiobookshelf_1 | name: 'SequelizeUniqueConstraintError', audiobookshelf_1 | errors: [ audiobookshelf_1 | ValidationErrorItem { audiobookshelf_1 | message: 'id must be unique', audiobookshelf_1 | type: 'unique violation', audiobookshelf_1 | path: 'id', audiobookshelf_1 | value: 'a49bf00f-a32b-4717-9f03-00e36d7f062d', audiobookshelf_1 | origin: 'DB', audiobookshelf_1 | instance: podcastEpisode { audiobookshelf_1 | dataValues: { audiobookshelf_1 | id: 'a49bf00f-a32b-4717-9f03-00e36d7f062d', audiobookshelf_1 | index: 277, audiobookshelf_1 | season: '1', audiobookshelf_1 | episode: '115', audiobookshelf_1 | episodeType: null, audiobookshelf_1 | title: '115. The Gunpowder Plot', audiobookshelf_1 | subtitle: '‘Remember, remember / the Fifth of November / Gunpowder, treason & plot.” Tom & Dominic explore what - if it had succeeded - would have been the most spectacular terrorist attack in British history?', audiobookshelf_1 | description: '<p>‘Remember, remember / the Fifth of November / Gunpowder, treason &amp; plot.” But what is it exactly we are remembering on Bonfire Night? Tom &amp; Dominic explore what - if it had succeeded - would have been the most spectacular terrorist attack in British history: its background, its legacy, &amp; the controversies that still bedevil our understanding of it.</p><p><br /></p><p>*The Rest Is History Live Tour 2023*:</p><p><br /></p><p>Tom and Dominic are back on tour this autumn! See them live in London, New Zealand, and Australia!</p><p><br /></p><p>Buy your tickets here: restishistorypod.com</p><p><br /></p><p>Twitter: </p><p><br /></p><p>@TheRestHistory</p><p><br /></p><p>@holland_tom</p><p><br /></p><p>@dcsandbrook</p><p> </p><p>Learn more about your ad choices. Visit <a href="https://podcastchoices.com/adchoices">podcastchoices.com/adchoices</a></p>', audiobookshelf_1 | pubDate: 'Thu, 04 Nov 2021 02:00:00 -0000', audiobookshelf_1 | enclosureURL: null, audiobookshelf_1 | enclosureSize: null, audiobookshelf_1 | enclosureType: null, audiobookshelf_1 | publishedAt: 2021-11-04T02:00:00.000Z, audiobookshelf_1 | podcastId: '1ee96937-96fa-4189-889b-5e2da4dd1c91', audiobookshelf_1 | audioFile: { audiobookshelf_1 | index: 1, audiobookshelf_1 | ino: '110861', audiobookshelf_1 | metadata: [Object], audiobookshelf_1 | addedAt: 1692173199336, audiobookshelf_1 | updatedAt: 1692173199336, audiobookshelf_1 | trackNumFromMeta: 115, audiobookshelf_1 | discNumFromMeta: 1, audiobookshelf_1 | trackNumFromFilename: null, audiobookshelf_1 | discNumFromFilename: null, audiobookshelf_1 | manuallyVerified: false, audiobookshelf_1 | invalid: false, audiobookshelf_1 | exclude: false, audiobookshelf_1 | error: null, audiobookshelf_1 | format: 'MP2/3 (MPEG audio layer 2/3)', audiobookshelf_1 | duration: 3437.217959, audiobookshelf_1 | bitRate: 64000, audiobookshelf_1 | language: null, audiobookshelf_1 | codec: 'mp3', audiobookshelf_1 | timeBase: '1/14112000', audiobookshelf_1 | channels: 1, audiobookshelf_1 | channelLayout: 'mono', audiobookshelf_1 | chapters: [], audiobookshelf_1 | embeddedCoverArt: null, audiobookshelf_1 | metaTags: [Object], audiobookshelf_1 | mimeType: 'audio/mpeg' audiobookshelf_1 | }, audiobookshelf_1 | chapters: [], audiobookshelf_1 | extraData: {}, audiobookshelf_1 | updatedAt: 2023-08-16T08:06:48.572Z, audiobookshelf_1 | createdAt: 2023-08-16T08:06:48.572Z audiobookshelf_1 | }, audiobookshelf_1 | _previousDataValues: { audiobookshelf_1 | id: undefined, audiobookshelf_1 | index: undefined, audiobookshelf_1 | season: undefined, audiobookshelf_1 | episode: undefined, audiobookshelf_1 | episodeType: undefined, audiobookshelf_1 | title: undefined, audiobookshelf_1 | subtitle: undefined, audiobookshelf_1 | description: undefined, audiobookshelf_1 | pubDate: undefined, audiobookshelf_1 | enclosureURL: undefined, audiobookshelf_1 | enclosureSize: undefined, audiobookshelf_1 | enclosureType: undefined, audiobookshelf_1 | publishedAt: undefined, audiobookshelf_1 | podcastId: undefined, audiobookshelf_1 | audioFile: undefined, audiobookshelf_1 | chapters: undefined, audiobookshelf_1 | extraData: undefined audiobookshelf_1 | }, audiobookshelf_1 | uniqno: 1, audiobookshelf_1 | _changed: Set(17) { audiobookshelf_1 | 'id', audiobookshelf_1 | 'index', audiobookshelf_1 | 'season', audiobookshelf_1 | 'episode', audiobookshelf_1 | 'episodeType', audiobookshelf_1 | 'title', audiobookshelf_1 | 'subtitle', audiobookshelf_1 | 'description', audiobookshelf_1 | 'pubDate', audiobookshelf_1 | 'enclosureURL', audiobookshelf_1 | 'enclosureSize', audiobookshelf_1 | 'enclosureType', audiobookshelf_1 | 'publishedAt', audiobookshelf_1 | 'podcastId', audiobookshelf_1 | 'audioFile', audiobookshelf_1 | 'chapters', audiobookshelf_1 | 'extraData' audiobookshelf_1 | }, audiobookshelf_1 | _options: { audiobookshelf_1 | isNewRecord: true, audiobookshelf_1 | _schema: null, audiobookshelf_1 | _schemaDelimiter: '', audiobookshelf_1 | attributes: undefined, audiobookshelf_1 | include: undefined, audiobookshelf_1 | raw: undefined, audiobookshelf_1 | silent: undefined audiobookshelf_1 | }, audiobookshelf_1 | isNewRecord: true audiobookshelf_1 | }, audiobookshelf_1 | validatorKey: 'not_unique', audiobookshelf_1 | validatorName: null, audiobookshelf_1 | validatorArgs: [] audiobookshelf_1 | } audiobookshelf_1 | ], audiobookshelf_1 | parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] { audiobookshelf_1 | errno: 19, audiobookshelf_1 | code: 'SQLITE_CONSTRAINT', audiobookshelf_1 | sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);' audiobookshelf_1 | }, audiobookshelf_1 | original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: podcastEpisodes.id] { audiobookshelf_1 | errno: 19, audiobookshelf_1 | code: 'SQLITE_CONSTRAINT', audiobookshelf_1 | sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);' audiobookshelf_1 | }, audiobookshelf_1 | fields: [ 'id' ], audiobookshelf_1 | sql: 'INSERT INTO `podcastEpisodes` (`id`,`index`,`season`,`episode`,`episodeType`,`title`,`subtitle`,`description`,`pubDate`,`enclosureURL`,`enclosureSize`,`enclosureType`,`publishedAt`,`audioFile`,`chapters`,`extraData`,`createdAt`,`updatedAt`,`podcastId`) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19);' audiobookshelf_1 | } ```
Author
Owner

@slords commented on GitHub (Aug 16, 2023):

I'm getting a similar issue but with audiobooks not podcasts.

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error
    at Database.<anonymous> (/node_modules/sequelize/lib/dialects/sqlite/query.js:185:27)
    at /node_modules/sequelize/lib/dialects/sqlite/query.js:183:50
    at new Promise (<anonymous>)
    at Query.run (/node_modules/sequelize/lib/dialects/sqlite/query.js:183:12)
    at /node_modules/sequelize/lib/sequelize.js:315:28
    at async SQLiteQueryInterface.insert (/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21)
    at async BookAuthor.save (/node_modules/sequelize/lib/model.js:2490:35)
    at async Function.create (/node_modules/sequelize/lib/model.js:1362:12)
    at async Function.fullCreateFromOld (/server/models/LibraryItem.js:180:11)
    at async Database.createBulkLibraryItems (/server/Database.js:417:7) {
  name: 'SequelizeUniqueConstraintError',
  errors: [
    ValidationErrorItem {
      message: 'bookId must be unique',
      type: 'unique violation',
      path: 'bookId',
      value: '3ca5082d-905d-47df-a331-efc3fc104bd0',
      origin: 'DB',
      instance: bookAuthor {
        dataValues: {
          id: '9dc175f8-4ea6-44fe-8ff4-1e75e7d46b0e',
          authorId: '7aa76eec-b4e2-4355-9930-8d789ee05fed',
          bookId: '3ca5082d-905d-47df-a331-efc3fc104bd0'
        },
        _previousDataValues: { authorId: undefined, bookId: undefined },
        uniqno: 1,
        _changed: Set(2) { 'authorId', 'bookId' },
        _options: {
          isNewRecord: true,
          _schema: null,
          _schemaDelimiter: '',
          attributes: undefined,
          include: undefined,
          raw: undefined,
          silent: undefined
        },
        isNewRecord: true
      },
      validatorKey: 'not_unique',
      validatorName: null,
      validatorArgs: []
    },
    ValidationErrorItem {
      message: 'authorId must be unique',
      type: 'unique violation',
      path: 'authorId',
      value: '7aa76eec-b4e2-4355-9930-8d789ee05fed',
      origin: 'DB',
      instance: bookAuthor {
        dataValues: {
          id: '9dc175f8-4ea6-44fe-8ff4-1e75e7d46b0e',
          authorId: '7aa76eec-b4e2-4355-9930-8d789ee05fed',
          bookId: '3ca5082d-905d-47df-a331-efc3fc104bd0'
        },
        _previousDataValues: { authorId: undefined, bookId: undefined },
        uniqno: 1,
        _changed: Set(2) { 'authorId', 'bookId' },
        _options: {
          isNewRecord: true,
          _schema: null,
          _schemaDelimiter: '',
          attributes: undefined,
          include: undefined,
          raw: undefined,
          silent: undefined
        },
        isNewRecord: true
      },
      validatorKey: 'not_unique',
      validatorName: null,
      validatorArgs: []
    }
  ],
  parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: bookAuthors.bookId, bookAuthors.authorId] {
    errno: 19,
    code: 'SQLITE_CONSTRAINT',
    sql: 'INSERT INTO `bookAuthors` (`id`,`bookId`,`authorId`) VALUES ($1,$2,$3);'
  },
  original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: bookAuthors.bookId, bookAuthors.authorId] {
    errno: 19,
    code: 'SQLITE_CONSTRAINT',
    sql: 'INSERT INTO `bookAuthors` (`id`,`bookId`,`authorId`) VALUES ($1,$2,$3);'
  },
  fields: [ 'bookId', 'authorId' ],
  sql: 'INSERT INTO `bookAuthors` (`id`,`bookId`,`authorId`) VALUES ($1,$2,$3);'
}
@slords commented on GitHub (Aug 16, 2023): I'm getting a similar issue but with audiobooks not podcasts. ``` node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^ Error at Database.<anonymous> (/node_modules/sequelize/lib/dialects/sqlite/query.js:185:27) at /node_modules/sequelize/lib/dialects/sqlite/query.js:183:50 at new Promise (<anonymous>) at Query.run (/node_modules/sequelize/lib/dialects/sqlite/query.js:183:12) at /node_modules/sequelize/lib/sequelize.js:315:28 at async SQLiteQueryInterface.insert (/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21) at async BookAuthor.save (/node_modules/sequelize/lib/model.js:2490:35) at async Function.create (/node_modules/sequelize/lib/model.js:1362:12) at async Function.fullCreateFromOld (/server/models/LibraryItem.js:180:11) at async Database.createBulkLibraryItems (/server/Database.js:417:7) { name: 'SequelizeUniqueConstraintError', errors: [ ValidationErrorItem { message: 'bookId must be unique', type: 'unique violation', path: 'bookId', value: '3ca5082d-905d-47df-a331-efc3fc104bd0', origin: 'DB', instance: bookAuthor { dataValues: { id: '9dc175f8-4ea6-44fe-8ff4-1e75e7d46b0e', authorId: '7aa76eec-b4e2-4355-9930-8d789ee05fed', bookId: '3ca5082d-905d-47df-a331-efc3fc104bd0' }, _previousDataValues: { authorId: undefined, bookId: undefined }, uniqno: 1, _changed: Set(2) { 'authorId', 'bookId' }, _options: { isNewRecord: true, _schema: null, _schemaDelimiter: '', attributes: undefined, include: undefined, raw: undefined, silent: undefined }, isNewRecord: true }, validatorKey: 'not_unique', validatorName: null, validatorArgs: [] }, ValidationErrorItem { message: 'authorId must be unique', type: 'unique violation', path: 'authorId', value: '7aa76eec-b4e2-4355-9930-8d789ee05fed', origin: 'DB', instance: bookAuthor { dataValues: { id: '9dc175f8-4ea6-44fe-8ff4-1e75e7d46b0e', authorId: '7aa76eec-b4e2-4355-9930-8d789ee05fed', bookId: '3ca5082d-905d-47df-a331-efc3fc104bd0' }, _previousDataValues: { authorId: undefined, bookId: undefined }, uniqno: 1, _changed: Set(2) { 'authorId', 'bookId' }, _options: { isNewRecord: true, _schema: null, _schemaDelimiter: '', attributes: undefined, include: undefined, raw: undefined, silent: undefined }, isNewRecord: true }, validatorKey: 'not_unique', validatorName: null, validatorArgs: [] } ], parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: bookAuthors.bookId, bookAuthors.authorId] { errno: 19, code: 'SQLITE_CONSTRAINT', sql: 'INSERT INTO `bookAuthors` (`id`,`bookId`,`authorId`) VALUES ($1,$2,$3);' }, original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: bookAuthors.bookId, bookAuthors.authorId] { errno: 19, code: 'SQLITE_CONSTRAINT', sql: 'INSERT INTO `bookAuthors` (`id`,`bookId`,`authorId`) VALUES ($1,$2,$3);' }, fields: [ 'bookId', 'authorId' ], sql: 'INSERT INTO `bookAuthors` (`id`,`bookId`,`authorId`) VALUES ($1,$2,$3);' } ```
Author
Owner

@advplyr commented on GitHub (Aug 24, 2023):

For podcasts I recommend disabling the folder watcher for now. You can do that by going to the libraries in config, pressing edit, then in the settings tab disable watcher. I'm pretty sure this is the issue so that is a temporary fix.

@slords That is separate. I'm pretty sure I've fixed that already for the next release.

@advplyr commented on GitHub (Aug 24, 2023): For podcasts I recommend disabling the folder watcher for now. You can do that by going to the libraries in config, pressing edit, then in the settings tab disable watcher. I'm pretty sure this is the issue so that is a temporary fix. @slords That is separate. I'm pretty sure I've fixed that already for the next release.
Author
Owner

@BarbellDwarf commented on GitHub (Aug 24, 2023):

I disabled it. So I will see what happens. Just set a bunch to download. Thank you for the help!

@BarbellDwarf commented on GitHub (Aug 24, 2023): I disabled it. So I will see what happens. Just set a bunch to download. Thank you for the help!
Author
Owner

@BarbellDwarf commented on GitHub (Aug 24, 2023):

That appeared to be the issue. It has been running all night, and has downloaded 4000 podcasts without a snag.
Is that a bug or just a issue with the watcher? @advplyr

@BarbellDwarf commented on GitHub (Aug 24, 2023): That appeared to be the issue. It has been running all night, and has downloaded 4000 podcasts without a snag. Is that a bug or just a issue with the watcher? @advplyr
Author
Owner

@advplyr commented on GitHub (Aug 24, 2023):

@SpirusNox Thanks for following up. That's a bug

@advplyr commented on GitHub (Aug 24, 2023): @SpirusNox Thanks for following up. That's a bug
Author
Owner

@BarbellDwarf commented on GitHub (Aug 24, 2023):

@advplyr Roger that. I will leave it off for now then. Appreciate the help! I feel better already knowing I can horde all the podcasts that I will most likely never listen to.

@BarbellDwarf commented on GitHub (Aug 24, 2023): @advplyr Roger that. I will leave it off for now then. Appreciate the help! I feel better already knowing I can horde all the podcasts that I will most likely never listen to.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#655