[Bug]: Server crash while deleting a library item #1327

Closed
opened 2026-04-24 23:39:56 +02:00 by adam · 2 comments
Owner

Originally created by @mikiher on GitHub (Aug 26, 2023).

Describe the issue

The server crashed when a library item was deleted using the "Delete" from the menu. The "Delete from filesystem" checkbox was set to true. The file deleted was a single m4b file at the volume's root directory.
Logs:

2023-08-26T04:39:58.684092900Z [2023-08-26 04:39:58] INFO: [LibraryItemController] Deleting library item from file system at "/torrents/The Vorrh.m4b"
2023-08-26T04:40:05.180493000Z [2023-08-26 04:40:05] INFO: [Server] 1 Files Changed
2023-08-26T04:40:05.238155800Z [2023-08-26 04:40:05] ERROR: [Utils] Failed to get ino for path /torrents/The Vorrh.m4b [Error: ENOENT: no such file or directory, stat '/torrents/The Vorrh.m4b'] {
2023-08-26T04:40:05.238207500Z errno: -2,
2023-08-26T04:40:05.238223000Z code: 'ENOENT',
2023-08-26T04:40:05.238227400Z syscall: 'stat',
2023-08-26T04:40:05.238231800Z path: '/torrents/The Vorrh.m4b'
2023-08-26T04:40:05.238236500Z } (fileUtils.js:65)
2023-08-26T04:40:05.518349100Z /server/scanner/Scanner.js:652
2023-08-26T04:40:05.518376700Z } else if (library.settings.audiobooksOnly && !fileUpdateGroup[itemDir].some(checkFilepathIsAudioFile)) {
2023-08-26T04:40:05.518380300Z ^
2023-08-26T04:40:05.518569600Z
2023-08-26T04:40:05.518579300Z TypeError: fileUpdateGroup[itemDir].some is not a function
2023-08-26T04:40:05.518584700Z at Scanner.scanFolderUpdates (/server/scanner/Scanner.js:652:79)
2023-08-26T04:40:05.518588900Z at async Scanner.scanFilesChanged (/server/scanner/Scanner.js:572:33)
2023-08-26T04:40:05.518593200Z at async Server.filesChanged (/server/Server.js:243:5)

Steps to reproduce the issue

  1. Click on library item's menu.
  2. Click "Delete" on menu.
  3. Click "Delete" on dialog.

Audiobookshelf version

v2.3.3

How are you running audiobookshelf?

Docker

Originally created by @mikiher on GitHub (Aug 26, 2023). ### Describe the issue The server crashed when a library item was deleted using the "Delete" from the menu. The "Delete from filesystem" checkbox was set to true. The file deleted was a single m4b file at the volume's root directory. Logs: 2023-08-26T04:39:58.684092900Z [2023-08-26 04:39:58] INFO: [LibraryItemController] Deleting library item from file system at "/torrents/The Vorrh.m4b" 2023-08-26T04:40:05.180493000Z [2023-08-26 04:40:05] INFO: [Server] 1 Files Changed 2023-08-26T04:40:05.238155800Z [2023-08-26 04:40:05] ERROR: [Utils] Failed to get ino for path /torrents/The Vorrh.m4b [Error: ENOENT: no such file or directory, stat '/torrents/The Vorrh.m4b'] { 2023-08-26T04:40:05.238207500Z errno: -2, 2023-08-26T04:40:05.238223000Z code: 'ENOENT', 2023-08-26T04:40:05.238227400Z syscall: 'stat', 2023-08-26T04:40:05.238231800Z path: '/torrents/The Vorrh.m4b' 2023-08-26T04:40:05.238236500Z } (fileUtils.js:65) 2023-08-26T04:40:05.518349100Z /server/scanner/Scanner.js:652 2023-08-26T04:40:05.518376700Z } else if (library.settings.audiobooksOnly && !fileUpdateGroup[itemDir].some(checkFilepathIsAudioFile)) { 2023-08-26T04:40:05.518380300Z ^ 2023-08-26T04:40:05.518569600Z 2023-08-26T04:40:05.518579300Z TypeError: fileUpdateGroup[itemDir].some is not a function 2023-08-26T04:40:05.518584700Z at Scanner.scanFolderUpdates (/server/scanner/Scanner.js:652:79) 2023-08-26T04:40:05.518588900Z at async Scanner.scanFilesChanged (/server/scanner/Scanner.js:572:33) 2023-08-26T04:40:05.518593200Z at async Server.filesChanged (/server/Server.js:243:5) ### Steps to reproduce the issue 1. Click on library item's menu. 2. Click "Delete" on menu. 3. Click "Delete" on dialog. ### Audiobookshelf version v2.3.3 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:39:56 +02:00
adam closed this issue 2026-04-24 23:39:57 +02:00
Author
Owner

@mikiher commented on GitHub (Aug 26, 2023):

Same happened again. Here are the relevant logs:

[2023-08-26 12:16:40] INFO: [LibraryItemController] Deleting library item from file system at "/torrents/Artificial Condition - Martha Wells.mp3"
[2023-08-26 12:16:47] INFO: [Server] 1 Files Changed
[2023-08-26 12:16:47] ERROR: [Utils] Failed to get ino for path /torrents/Artificial Condition - Martha Wells.mp3 [Error: ENOENT: no such file or directory, stat '/torrents/Artificial Condition - Martha Wells.mp3'] {
[2023-08-26 12:16:40] INFO: [LibraryItemController] Deleting library item from file system at "/torrents/Artificial Condition - Martha Wells.mp3"
[2023-08-26 12:16:47] INFO: [Server] 1 Files Changed
} (fileUtils.js:65)

errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/torrents/Artificial Condition - Martha Wells.mp3'
/server/scanner/Scanner.js:652
} else if (library.settings.audiobooksOnly && !fileUpdateGroup[itemDir].some(checkFilepathIsAudioFile)) {
^
TypeError: fileUpdateGroup[itemDir].some is not a function
at Scanner.scanFolderUpdates (/server/scanner/Scanner.js:652:79)
at async Scanner.scanFilesChanged (/server/scanner/Scanner.js:572:33)
at async Server.filesChanged (/server/Server.js:243:5)

@mikiher commented on GitHub (Aug 26, 2023): Same happened again. Here are the relevant logs: [2023-08-26 12:16:40] INFO: [LibraryItemController] Deleting library item from file system at "/torrents/Artificial Condition - Martha Wells.mp3" [2023-08-26 12:16:47] INFO: [Server] 1 Files Changed [2023-08-26 12:16:47] ERROR: [Utils] Failed to get ino for path /torrents/Artificial Condition - Martha Wells.mp3 [Error: ENOENT: no such file or directory, stat '/torrents/Artificial Condition - Martha Wells.mp3'] { [2023-08-26 12:16:40] INFO: [LibraryItemController] Deleting library item from file system at "/torrents/Artificial Condition - Martha Wells.mp3" [2023-08-26 12:16:47] INFO: [Server] 1 Files Changed } (fileUtils.js:65)  errno: -2, code: 'ENOENT', syscall: 'stat', path: '/torrents/Artificial Condition - Martha Wells.mp3' /server/scanner/Scanner.js:652 } else if (library.settings.audiobooksOnly && !fileUpdateGroup[itemDir].some(checkFilepathIsAudioFile)) { ^ TypeError: fileUpdateGroup[itemDir].some is not a function at Scanner.scanFolderUpdates (/server/scanner/Scanner.js:652:79) at async Scanner.scanFilesChanged (/server/scanner/Scanner.js:572:33) at async Server.filesChanged (/server/Server.js:243:5)
Author
Owner

@advplyr commented on GitHub (Sep 10, 2023):

Fixed in v2.4.0

@advplyr commented on GitHub (Sep 10, 2023): Fixed in [v2.4.0](https://github.com/advplyr/audiobookshelf/releases/tag/v2.4.0)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1327