mirror of
https://github.com/koel/koel.git
synced 2026-04-25 00:36:03 +03:00
[GH-ISSUE #1221] Koel doesn't load covers, albums and artist #696
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#696
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NooodyFR on GitHub (Apr 24, 2020).
Original GitHub issue: https://github.com/koel/koel/issues/1221
Describe the bug
Koel does not load album covers, despite the fact that the covers are in the file and in a cover.jpg or cover.png file in the album folder.
It also does not load the albums in the Albums category, nor does it load the artists.
To reproduce
Steps to reproduce the behavior:
Expected behavior
Preview the album cover
Screenshots
Album
Artists
No covers
Errors
Environment
d55a823(clonned repo https://github.com/phanan/koel.git)Additional context
It just don't load, I also checked the files in /public/img/covers, there is only a file name unknown-album.png
@BrookeDot commented on GitHub (Apr 25, 2020):
Hi @NooodyFR I don't believe Koel currently supports Node 13.11.0 can you please downgrade to Node 12 which is the current LTS?
In addition, the PR you linked to is an older version of Node, can you please upgrade to 4.3.1 which was released this week? We don't want to try to support older versions.
It would also be helpful to know if there are any errors in your PHP, Node, or MySQL logs since nothing is loading the problem is likely not with Koel itself but with something on your server.
@NooodyFR commented on GitHub (Apr 25, 2020):
I have switched to Koel 4.3.1 and downgraded to Node 12.16.2, and now some covers are loading but not all, and artists too but without images, there is no errors in the console now and there are no errors in the Mysql, PHP and Node logs.
@songliqiangcn commented on GitHub (May 5, 2020):
I have same issue.
Environment
Koel: v4.3.1
OS: Ubuntu18.04
Browser Chrome Version 81.0.4044.129 (Official Build) (64-bit)
PHP 7.2.24-0ubuntu0.18.04.4 (cli) (built: Apr 8 2020 15:45:57) ( NTS )
Node version v12.16.3
@phanan commented on GitHub (May 6, 2020):
Correction: Koel should support all officially-supported Node versions.
This has been fixed in the latest version.
This means Koel was able to extract the covers from some of your media but not others. I can't really help here without looking at the files.
Judging from the screenshot, there must be 404-error requests in the Network tab. Please have a look and see what they are.
I can't reproduce this problem with my own Koel installation.
@BrookeDot commented on GitHub (May 6, 2020):
This is great to hear, I know when I first started using Koel it didn't support Node 12 which was fixed at some point. Can you clarify this a bit? By current you mean anything that is current here:
https://nodejs.org/en/about/releases/
I tend to stick to LTS, but it sounds like you are saying that Koel should work with Node 10,12,13,14,and 15?
@phanan commented on GitHub (May 6, 2020):
Yeah, for example, this is one of the builds: https://travis-ci.org/github/koel/core/builds/682680047. The branch is
ts(TypeScript, as I'm porting Koel's core to TS), but the same should apply for JS.@mshernandez5 commented on GitHub (Jun 13, 2020):
I have this same issue with a new installation of Koel v4.4.0, all album covers are missing in the interface:
The cover files were generated in the public/img/covers directory and Koel has permissions to search the cover directory and read all of its contents:
The entries even exist in the database:
There doesn't appear to be any 404 errors, the client only appears to attempt to fetch the default album cover:
Originally, the database and covers folder were not populated but I saw the the logs were complaining about missing php-gd; I installed this and dropped/reinitialized the database which created all the album cover images but still does not display them in the client. There are no longer any issues in the log files.
Any suggestions?
Server:
Ubuntu Server 20.04
Node v12.18.0
PHP v7.4.3
Browsers Tested:
Firefox 77.0.1
Chromium Version 83.0.4103.61
@phanan commented on GitHub (Jun 13, 2020):
Looks like Koel can't find the covers for some reason. If you put some debug statements e.g.
dd(public_path("/public/img/covers/$cover"))atAlbum.php:93what does it say?@mshernandez5 commented on GitHub (Jun 13, 2020):
The issue has resolved itself after another forced sync, but I did not make any modifications other than importing Illuminate\Support\Facades\Log and adding a log statement or two in the Album.php file.
I was poking around the functions and when logging the
$valueparameter ofgetCoverAttribute(?string $value)found that is was null for all albums when the covers didn't work and contained the correct file names after it suddenly began working.The
getCoverPathAttribute()function did not appear to run and I did not get any output when logging a string at the beginning of the function.I apologize that I can't give you better insight into what went wrong when it was acting up, I am not familiar with PHP/Laravel/Koel so I'm not exactly sure where these methods are being called from and how their results are used.
Thanks for your work by the way this is an awesome project!
@phanan commented on GitHub (Aug 4, 2020):
Glad it works for you :)
@phanan commented on GitHub (Aug 4, 2020):
Great music taste btw!
@manjotsc commented on GitHub (Aug 12, 2021):
@mshernandez5 How do I reinitialize the database?
@mshernandez5 commented on GitHub (Aug 12, 2021):
Hello, it's been awhile since I had this problem and had to mess with the setup but I believe you can start fresh by dropping and recreating the database (ex. through
mysqlconsole command if you are using MariaDB or MySQL but varies based on which database you are using) and then runningphp artisan koel:initagain to recreate all the (now empty) tables and everything.Make sure to keep the database name the same after recreating it unless you change the Koel configuration to match and you will also have to re-grant permissions to the database user.
ex. SQL Statements:
Replacing
koeldbandkoeluserwith whatever the database and usernames are.I don't remember finding out exactly what fixed this issue but I think all I did was install php-gd package, double check that the permissions were right for the Koel directory, and reset the database.