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

Most upvoted comments

how did you update that single module?

There may be a more systematic way to do this with Yarn or Composer but here’s what I did.

# cd to getId3 root folder
$ cd www/vendor/james-heinrich/ 

# remove current library
$ rm -Rf getid3/ 

# Clone the current library into getid3 folder
$ git clone https://github.com/JamesHeinrich/getID3.git getid3

# Checkout 2.0 branch 
$ cd getid3/
$ git checkout 2.0

Then you can artisan koel:sync like 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 root could be the issue. However, it looks like the bigger issue is that you’re cloning getId3 into the main ~/koel folder where it should be cloned into vendor/james-heinrich/. In your case I think it is ~/koel/vendor/james-heinrich/. It may also be helpful to use ls -lan to 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-data user via sudo. For example my commands look like this:

sudo -u www-data php artisan koel:sync

DigitalOcean has a good guide on initial server setup for many popular Linux distributions which goes over disabling root https://www.digitalocean.com/community/tutorial_collections/16

If you’re still having trouble it may be good to know the following:

  • what is working as expected?
  • was setup successful, and you’re just getting stuck with syncing.
  • Your LEMP/LAMP stack including versions. ( lsb_release -a( for debian/ubuntu), nginx -v, mysql -V, php -v)
  • Node and NPM versions (node -v, npm -v)
  • Any additional details regarding your setup.

@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 😑