-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: The server stops running after a few minutes of startup. #3267
Comments
Is there anything in |
{"timestamp":"2024-08-10 21:38:53.752","source":"Server.js:170","message":"[Server] Unhandled rejection: TypeError: Cannot use 'in' operator to search for 'readable' in null, promise: Promise {\n TypeError: Cannot use 'in' operator to search for 'readable' in null\n at new FfmpegCommand (/server/libs/fluentFfmpeg/index.js:44:49)\n at FfmpegCommand (/server/libs/fluentFfmpeg/index.js:39:12)\n at /server/utils/ffmpegHelpers.js:81:18\n at new Promise ()\n at resizeImage (/server/utils/ffmpegHelpers.js:79:10)\n at CacheManager.handleAuthorCache (/server/managers/CacheManager.js:154:29)\n}","levelName":"FATAL","level":5} |
After my testing, I found that when I call the Get an Author's Image API, if there is no image, it will cause the server to crash. |
If there is no image, it will not return a 404 |
I'm experiencing the same behavior, somewhat intermittently |
I seem to be getting something similar. After updating from v2.11.0 to v2.12.3 and trying to run a library scan, the page will appear to freeze, and I can observe the following logs over and over. Downgrading to v2.11.0 again does not resolve this issue.
The restart loop occurs when I connect a new client or switch between library and home a few times. |
If I get to the libraries configuration page and try to scan this shows for any new items
Instead of Scan I have now selected Match files. which appears to be cycling through all existing books in the library and downloading images. I'll leave that to run while I sleep and see if it clears anything up, but not holding my breath. |
I'm getting the same issue, I've recently moved a server off my NAS onto Windows and restored a backup, for whatever reason most of the Author pictures appear as broken images (even though the image files are there). I was going through trashing the broken image, refreshing, and reloading the images fine, but I got to a random one halfway down and on the refresh I got the exact same error as indicated above. I reproduced it three times in a row scanning the same author (Harlan Ellison if it matters). same error, same full crash. Interestingly it's (so far) only on that one specific author not the other 100+. |
There's maybe a dipper issue here, but the crash is easy to reproduce.
Our web interface actually checks if the author has an image when creating the imgSrc() {
if (!this.imagePath) return null
if (process.env.NODE_ENV !== 'production') {
// Testing
return `http://localhost:3333${this.$config.routerBasePath}/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}`
}
return `/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}`
} This is why it's not easy to reproduce using the web interface. However the problem does seem to occur in some circumstances, and indicates that sometimes (for reasons I still need to understand better) there's some data mismatch between client and the server. We need to fix this since the API can (in theory) be called in isolation. The root cause for the crash is that we don't check that author.imagePath is not null (or that it exists) before we send it to FFMpeg for resizing. I'll send on a fix for that, and I'll also try to understand the data mismatch issues reported above. |
Fixed in v2.13.0. |
What happened?
The server stops running after a few minutes of startup. It doesn't always happen, but once it does, it will happen continuously
What did you expect to happen?
Server runs stably.
Steps to reproduce the issue
Audiobookshelf version
v2.12.3
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?
Edge
Logs
Additional Notes
No response
The text was updated successfully, but these errors were encountered: