[GH-ISSUE #1788] Inconsistent Issue with Media scanning #989

Closed
opened 2026-02-26 02:34:51 +03:00 by kerem · 10 comments
Owner

Originally created by @DarkXero-dev on GitHub (Jul 14, 2024).
Original GitHub issue: https://github.com/koel/koel/issues/1788

Describe the bug
I use Koel as a Docker container, self-hosted with mysql/Mariadb. This one is new to me. I was using Koel just fine until today. I just added a few discographies, went to scan everytime I do it's a different number of Invalid Files...

To reproduce

  1. Add music to watched folder
  2. Go to CLI and run php artisan koel:scan
  3. See inconsistent error

Expected behavior
No error

Screenshots
Error

Environment

  • Koel version : 7.0.4
  • OS: ArchLinux
  • Browser : Vivaldi
  • PHP version : Whatever is shipped with Docker image
  • Node version : Whatever is shipped with Docker image

Additional context
It's really inconsistent. Just by adding music causes it to go crazy...

Originally created by @DarkXero-dev on GitHub (Jul 14, 2024). Original GitHub issue: https://github.com/koel/koel/issues/1788 **Describe the bug** I use Koel as a Docker container, self-hosted with mysql/Mariadb. This one is new to me. I was using Koel just fine until today. I just added a few discographies, went to scan everytime I do it's a different number of **Invalid Files**... **To reproduce** 1. Add music to watched folder 2. Go to CLI and run `php artisan koel:scan` 3. See inconsistent error **Expected behavior** No error **Screenshots** ![Error](https://i.imgur.com/CsRwshC.png) **Environment** - Koel version : 7.0.4 - OS: ArchLinux - Browser : Vivaldi - PHP version : Whatever is shipped with Docker image - Node version : Whatever is shipped with Docker image **Additional context** It's really inconsistent. Just by adding music causes it to go crazy...
kerem closed this issue 2026-02-26 02:34:51 +03:00
Author
Owner

@phanan commented on GitHub (Jul 14, 2024):

Thanks for reporting the issue. What shows if you run php artisan koel:scan -v?

<!-- gh-comment-id:2227440534 --> @phanan commented on GitHub (Jul 14, 2024): Thanks for reporting the issue. What shows if you run `php artisan koel:scan -v`?
Author
Owner

@DarkXero-dev commented on GitHub (Jul 14, 2024):

Well Invalid file...
Invalid

Laravel.log file is 38mb for whatever reason so I had to upload to wormhole (Expires in 24h)
https://wormhole.app/AJWE0#x7OkYcr6k0Kwz0SuTuw5NQ

<!-- gh-comment-id:2227443276 --> @DarkXero-dev commented on GitHub (Jul 14, 2024): Well Invalid file... ![Invalid](https://i.imgur.com/U8m9KeO.png) Laravel.log file is 38mb for whatever reason so I had to upload to wormhole (Expires in 24h) https://wormhole.app/AJWE0#x7OkYcr6k0Kwz0SuTuw5NQ
Author
Owner

@phanan commented on GitHub (Jul 14, 2024):

All relevant errors in the log go something like this:

[2024-07-14 18:16:27] production.ERROR: Failed attempt {"error":"[object (Intervention\\Image\\Exception\\NotWritableException(code: 0): Can't write image data to path (/var/www/html/public/img/covers/dc7d4485dde2c65301315ee3b9e79d683e3b1f2c.webp) at /var/www/html/vendor/intervention/image/src/Intervention/Image/Image.php:150)

Please make sure the path is writable. In the past, there was no error because the image writing operation was wrapped in a try/catch. While I can restore it, this is an indication of something wrong in your system.

<!-- gh-comment-id:2227444844 --> @phanan commented on GitHub (Jul 14, 2024): All relevant errors in the log go something like this: ``` [2024-07-14 18:16:27] production.ERROR: Failed attempt {"error":"[object (Intervention\\Image\\Exception\\NotWritableException(code: 0): Can't write image data to path (/var/www/html/public/img/covers/dc7d4485dde2c65301315ee3b9e79d683e3b1f2c.webp) at /var/www/html/vendor/intervention/image/src/Intervention/Image/Image.php:150) ``` Please make sure the path is writable. In the past, there was no error because the image writing operation was wrapped in a try/catch. While I can restore it, this is an indication of something wrong in your system.
Author
Owner

@DarkXero-dev commented on GitHub (Jul 14, 2024):

Well all I did was move folder that contains the compose.yml file to a new SSD which is EXT4 and all folders within it are writable owned by my user I do not see how that could have messed things up. How can I fix this issue, don't really want to start from scratch too much work lol.

Also music is on a totally different drive..

<!-- gh-comment-id:2227445983 --> @DarkXero-dev commented on GitHub (Jul 14, 2024): Well all I did was move folder that contains the compose.yml file to a new SSD which is EXT4 and all folders within it are writable owned by my user I do not see how that could have messed things up. How can I fix this issue, don't really want to start from scratch too much work lol. Also music is on a totally different drive..
Author
Owner

@phanan commented on GitHub (Jul 14, 2024):

I'm not familiar with such a setup, but generally, you want the directory to be owned by www-data.

<!-- gh-comment-id:2227447892 --> @phanan commented on GitHub (Jul 14, 2024): I'm not familiar with such a setup, but generally, you want the directory to be owned by `www-data`.
Author
Owner

@DarkXero-dev commented on GitHub (Jul 14, 2024):

I mean this entire directory is owned by me
dir

No weird setup here. The folders are the volumes I point to within compose file. I think what you mean is within the container right ? Is there a way to fix that with them php artisan command thingies ?

<!-- gh-comment-id:2227448851 --> @DarkXero-dev commented on GitHub (Jul 14, 2024): I mean this entire directory is owned by me ![dir](https://i.imgur.com/5bmEOga.png) No weird setup here. The folders are the volumes I point to within compose file. I think what you mean is within the container right ? Is there a way to fix that with them php artisan command thingies ?
Author
Owner

@phanan commented on GitHub (Jul 14, 2024):

Yes, the directory should be owned by www-data. You can fix this for example by using Docker Desktop and Exec a command like chown -R www-data:www-data /var/www/html. Again, I'm not familiar with your custom setup and won't be able to provide support in details.

<!-- gh-comment-id:2227454399 --> @phanan commented on GitHub (Jul 14, 2024): Yes, the directory should be owned by `www-data`. You can fix this for example by using Docker Desktop and `Exec` a command like `chown -R www-data:www-data /var/www/html`. Again, I'm not familiar with your custom setup and won't be able to provide support in details.
Author
Owner

@DarkXero-dev commented on GitHub (Jul 14, 2024):

I fixed it with

docker exec -it 330a981285f5 chown -R www-data:www-data /var/www/html/

Scanning seems to be working now 👯

<!-- gh-comment-id:2227454986 --> @DarkXero-dev commented on GitHub (Jul 14, 2024): I fixed it with ``` docker exec -it 330a981285f5 chown -R www-data:www-data /var/www/html/ ``` Scanning seems to be working now 👯
Author
Owner

@phanan commented on GitHub (Jul 14, 2024):

Great! I'm glad you got it sorted!

<!-- gh-comment-id:2227462305 --> @phanan commented on GitHub (Jul 14, 2024): Great! I'm glad you got it sorted!
Author
Owner

@DarkXero-dev commented on GitHub (Jul 14, 2024):

You were awesome.. Thanks.. Time to do cleanup.. I still have 1000 Discographies to fix with Musicbrainz + Picard.. Will take a few decades lol....

<!-- gh-comment-id:2227462673 --> @DarkXero-dev commented on GitHub (Jul 14, 2024): You were awesome.. Thanks.. Time to do cleanup.. I still have 1000 Discographies to fix with Musicbrainz + Picard.. Will take a few decades lol....
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/koel-koel#989
No description provided.