koel: Sync fails on 4.0.0 due to undefined getID3 method
Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue:
- You have read and followed closely the Wiki, Upgrade Guide, as well as Troubleshooting
- The issue has not been reported before
- This is not a “how to install on Windows” or “why is my npm messed up” question
- You’re a cool person
All checked? Now also make sure your issue
- Is associated with a version. Or better yet, a commit.
- Is as detailed as possible (ahem… OS, browser, steps to reproduce, maybe?)
- Includes the error output if it’s a bug/error report (“Whoops!” is not very helpful, you know)
- Is in English, 因为我不说中文。
Summary
When I run php artisan koel:sync I get the following output:
Syncing media from /mnt/music
286/4417 [▓░░░░░░░░░░░░░░░░░░░░░░░░░░░] 6%
In QuickTime.php line 479:
Call to undefined method JamesHeinrich\GetID3\Utils::LookupGenreName()
The issue was brought up without log details in #1056. i belive this is related to #1040 as the getID3() version found in vendor/james-heinrich/getid3 is 1.9.13 but the method name matches version 2.0 of getID3 found upstream:
https://github.com/JamesHeinrich/getID3/blob/v2.0.0-beta1/docs/Upgrading.md
https://github.com/JamesHeinrich/getID3/blob/v2.0.0-beta1/src/Module/AudioVideo/QuickTime.php#L479
Steps to reproduce:
Follow the upgrade instructions to upgrade to 4.0.0 and then run php artisan koel:sync
composer update
php artisan koel:init
OS
Debian 10 (Buster) PHP: 7.3.9-1 (FPM) nginx: 1.17.3 DB: MariaDB 10.4.8
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (14 by maintainers)
Commits related to this issue
- Use the 2.0 branch of getID3 This PR updates getID3 to use the latest 2.0 branch instead of the `v2.0.0-beta1` release which contains a fatal error when syncing. The branch name came from: https:... — committed to BrookeDot/koel by BrookeDot 5 years ago
- Use the 2.0 branch of getID3 (#1095) * Use the 2.0 branch of getID3 This PR updates getID3 to use the latest 2.0 branch instead of the `v2.0.0-beta1` release which contains a fatal error when sync... — committed to koel/koel by BrookeDot 5 years ago
- Use the 2.0 branch of getID3 (#1095) * Use the 2.0 branch of getID3 This PR updates getID3 to use the latest 2.0 branch instead of the `v2.0.0-beta1` release which contains a fatal error when sync... — committed to javier-lopez/koel by BrookeDot 5 years ago
There may be a more systematic way to do this with Yarn or Composer but here’s what I did.
Then you can
artisan koel:synclike before.Looking into this a bit more, I’m not sure if #1095 fixed the issue as expected. The problem can be resolved by manually upgrading getId3 which has worked for several others. We will just need to make sure that is actually happening or perhaps downgrade to 1.9.18 if that does not cause a regression of the RegEx bug that was resolved by the 2.0.x upgrade.
What may work best here is re-open this issue until we have confirmed that the patch in #1095 resolves this for others or a new Koel release is out which does resolve it.
@gorfreed I’m not sure why the above steps to manually replace getID3 are not working for you as we don’t have enough information about your setup. Unfortunately, #1102 also does not follow the issue template so will likely be closed. I know from my own experience that finding bugs or having troubling installing FOSS can be frustrating. I would suggest remaining diligent and reading through the issues to see if you can pin point what’s wrong in your case. Koel is working for me and many others so there’s likely a conflict somewhere. If you’re still unsatisfied you may want to explore other free media player options that will meet your need. There is a list of a few others here. If you do wish to try Koel again, please respect the developer’s wishes and use the template as well as provide other community members, like me, enough information to be helpful while looking at issues.
@gorfreed I just upgraded to 4.1.0 on my Linux server with the LEMP stack above without issue. Running commands as
rootcould be the issue. However, it looks like the bigger issue is that you’re cloninggetId3into the main~/koelfolder where it should be cloned intovendor/james-heinrich/. In your case I think it is~/koel/vendor/james-heinrich/. It may also be helpful to usels -lanto see what files are in the directory you are in to check if things look correct.In my setup I have disabled root login and run all commands as the
www-datauser viasudo. For example my commands look like this:sudo -u www-data php artisan koel:syncDigitalOcean has a good guide on initial server setup for many popular Linux distributions which goes over disabling
roothttps://www.digitalocean.com/community/tutorial_collections/16If you’re still having trouble it may be good to know the following:
lsb_release -a( for debian/ubuntu),nginx -v,mysql -V,php -v)node -v,npm -v)@BrookeDot et al. As mentioned in another ticket, I can’t reproduce this problem at all, so I was blindly merging your fix 😃 Looks like I’ll just downgrade to 1.9.18 – v2 just isn’t worth the fuss 😑