Can't update audiobook cover.
-
I'm not sure where the issue is here:
I'm trying to update the books I have with a cover image. There seems to be a few ways:
1. Search for cover image
Search possible images from Internet, screenshot:
- Select image, screenshot:
I get an error when I try to apply image:
Failed to download image from url: EACCES: permission denied, open '/media/entertainment/Music_6TB/Audiobooks & Radio Programmes/Surrounded By Idiots (Thomas Erikson)/cover'
The permissions for this folder right now is
www-data
:Logfile output:
Aug 05 18:28:31 [2024-08-05 17:28:31.974] ERROR: [CoverManager] Download image file failed for "https://m.media-amazon.com/images/I/711-u61tyVL.jpg" EACCES: permission denied, open '/media/entertainment/Music_6TB/Audiobooks & Radio Programmes/Surrounded By Idiots (Thomas Erikson)/cover' (CoverManager.js:129)
2. Upload book cover image
- Choose local image to upload, screenshot:
-
Upload image, screenshot:
-
Fails with error
I'm really not sure what this error means
<title>Cloudron App Error</title>
, screenshot:Log output:
Aug 05 18:31:02 [2024-08-05 17:31:02.029] FATAL: [Server] Unhandled rejection: ReferenceError: path is not defined, promise: Promise { <30>1 2024-08-05T18:31:02+01:00 apps 97366adc-c5d0-4186-99ac-f83c26a98bbf 2880069 97366adc-c5d0-4186-99ac-f83c26a98bbf - <rejected> ReferenceError: path is not defined <30>1 2024-08-05T18:31:02+01:00 apps 97366adc-c5d0-4186-99ac-f83c26a98bbf 2880069 97366adc-c5d0-4186-99ac-f83c26a98bbf - at /app/code/server/managers/CoverManager.js:97:64 Aug 05 18:31:02 at runMicrotasks (<anonymous>) <30>1 2024-08-05T18:31:02+01:00 apps 97366adc-c5d0-4186-99ac-f83c26a98bbf 2880069 97366adc-c5d0-4186-99ac-f83c26a98bbf - at processTicksAndRejections (node:internal/process/task_queues:96:5) <30>1 2024-08-05T18:31:02+01:00 apps 97366adc-c5d0-4186-99ac-f83c26a98bbf 2880069 97366adc-c5d0-4186-99ac-f83c26a98bbf - at async CoverManager.uploadCover (/app/code/server/managers/CoverManager.js:96:21) <30>1 2024-08-05T18:31:02+01:00 apps 97366adc-c5d0-4186-99ac-f83c26a98bbf 2880069 97366adc-c5d0-4186-99ac-f83c26a98bbf - at async ApiRouter.uploadCover (/app/code/server/controllers/LibraryItemController.js:205:16) <30>1 2024-08-05T18:31:02+01:00 apps 97366adc-c5d0-4186-99ac-f83c26a98bbf 2880069 97366adc-c5d0-4186-99ac-f83c26a98bbf - } (Server.js:171) Aug 05 18:31:02 => Ensure permissions
3. Upload image the audiobook file directory
-
Upload image file to directory, screenshot:
-
Apply image, screenshot:
-
Fails with error, screenshot:
Again, I don't see why `Failed to download image fro, IRL: EACCES: permission denied, open..." error would be caused.
All the book directories, and all files have permissions for
www-data
.Anyone seen this before? As shown, logfiles permission is denied, but permissions are I think correct. Thanks.
- Select image, screenshot:
-
-
Did you upload this via the SFTP? If so you may need to change the permissions on the upload (I know you mentioned the permissions in the last few sentences but its a good idea to double check and make sure the files themselves are the permissions the /app/data directory is)
-
This actually seems like an app internal error. Maybe it cannot deal with some characters in your path? The big error notification you are seeing comes from the app crashing on that request, delivering the error page from the reverse proxy.
The crash seems to come from https://github.com/advplyr/audiobookshelf/blob/930bacd45d232b44a967c0744c9cfb82dcc592f4/server/managers/CoverManager.js#L129 so maybe that code cannot deal with that path? Can you ask upstream about this and or try to add a library on a path without spaces and "special" characters?