[GH-ISSUE #1078] Sync fails on 4.0.0 due to undefined getID3 method #632

Closed
opened 2026-02-26 02:33:45 +03:00 by kerem · 23 comments
Owner

Originally created by @BrookeDot on GitHub (Sep 12, 2019).
Original GitHub issue: https://github.com/koel/koel/issues/1078

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

Originally created by @BrookeDot on GitHub (Sep 12, 2019). Original GitHub issue: https://github.com/koel/koel/issues/1078 Hey, thanks for contributing to Koel! To save time for both of us, please make sure these checkboxes are checked before submitting the issue: - [x] You have read and followed closely the [Wiki](https://koel.phanan.net/docs), [Upgrade Guide](https://github.com/phanan/koel/releases), as well as [Troubleshooting](https://koel.phanan.net/docs/#/troubleshooting) - [x] The issue has not been reported before - [x] This is not a "how to install on Windows" or "why is my npm messed up" question - [x] You're a cool person All checked? Now also make sure your issue - [x] Is associated with a version. Or better yet, a commit. - [x] Is as detailed as possible (ahem... OS, browser, steps to reproduce, maybe?) - [x] Includes the error output if it's a bug/error report ("Whoops!" is not very helpful, you know) - [x] 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](https://github.com/phanan/koel/releases/tag/v4.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
kerem 2026-02-26 02:33:45 +03:00
Author
Owner

@BrookeDot commented on GitHub (Sep 12, 2019):

Update, looks like Koel is using getID3 2.0-beta (the changelong.txt just hasn't been updated) which has this bug. I manually updated getID3 to the 2.0 branch found in GitHub and the error was resolved and sync completed.

I think it was where this was fixed. github.com/JamesHeinrich/getID3@26acc6edbe (diff-7255e08e81)

<!-- gh-comment-id:531007030 --> @BrookeDot commented on GitHub (Sep 12, 2019): Update, looks like Koel is using getID3 2.0-beta (the changelong.txt just hasn't been updated) which has this bug. I manually updated getID3 to the [2.0 branch found in GitHub](https://github.com/JamesHeinrich/getID3/tree/2.0) and the error was resolved and sync completed. I think it was where this was fixed. https://github.com/JamesHeinrich/getID3/commit/26acc6edbe0d1c120c643508625bfb2bbd7b7c6b#diff-7255e08e81ae3b1c58248278077c7603
Author
Owner

@filipe-silva commented on GitHub (Sep 15, 2019):

Hi, I'm having the same problem, how did you update that single module?

<!-- gh-comment-id:531562597 --> @filipe-silva commented on GitHub (Sep 15, 2019): Hi, I'm having the same problem, how did you update that single module?
Author
Owner

@BrookeDot commented on GitHub (Sep 16, 2019):

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.

<!-- gh-comment-id:531629670 --> @BrookeDot commented on GitHub (Sep 16, 2019): > 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.
Author
Owner

@tecosaur commented on GitHub (Sep 23, 2019):

Had the same issue, followed the suggestion in the last comment and now everything works :)

<!-- gh-comment-id:533970704 --> @tecosaur commented on GitHub (Sep 23, 2019): Had the same issue, followed the suggestion in the last comment and now everything works :)
Author
Owner

@phanan commented on GitHub (Sep 23, 2019):

Does anyone want to own this? This should already be covered by the tests, so changing the version number and running phpunit would be a sufficient start.

<!-- gh-comment-id:533998023 --> @phanan commented on GitHub (Sep 23, 2019): Does anyone want to own this? This should already be covered by the tests, so changing the version number and running `phpunit` would be a sufficient start.
Author
Owner

@BrookeDot commented on GitHub (Sep 30, 2019):

I tried to update the composer.json to fix this but still looks like v2.0.0-beta1 is being used. The tests passed but I don't think the bug itself is fixed.

Here are the results from Scrutinizer after using ^2.0-dev
- Installing james-heinrich/getid3 (v2.0.0-beta1): Downloading (100%)

and ^2.0.0-dev
- Installing james-heinrich/getid3 (v2.0.0-beta1): Loading from cache

Any ideas here?

<!-- gh-comment-id:536698328 --> @BrookeDot commented on GitHub (Sep 30, 2019): I tried to update the `composer.json` to fix this but still looks like `v2.0.0-beta1` is being used. The tests passed but I don't think the bug itself is fixed. Here are the results from Scrutinizer after using `^2.0-dev` `- Installing james-heinrich/getid3 (v2.0.0-beta1): Downloading (100%)` and `^2.0.0-dev` `- Installing james-heinrich/getid3 (v2.0.0-beta1): Loading from cache` Any ideas here?
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

Why was this closed without any resolution? I am experiencing the very same issue.

<!-- gh-comment-id:540068403 --> @gorfreed commented on GitHub (Oct 9, 2019): Why was this closed without any resolution? I am experiencing the very same issue.
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

These steps did not solve the issue, neither did composer update. This script seems to be incredibly bug-ridden.

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

<!-- gh-comment-id:540069586 --> @gorfreed commented on GitHub (Oct 9, 2019): These steps did not solve the issue, neither did composer update. This script seems to be incredibly bug-ridden. # 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
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

WDYM "without any resolution"?

image

<!-- gh-comment-id:540069945 --> @phanan commented on GitHub (Oct 9, 2019): WDYM "without any resolution"? ![image](https://user-images.githubusercontent.com/8056274/66498998-45126f80-eabf-11e9-95d8-3ed28ef2f076.png)
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

It means the Sync fails due to undefined getID3 method. Unfortunately the author did not respond but I have tried all solutions given and they didn't fix the issue.

<!-- gh-comment-id:540077490 --> @gorfreed commented on GitHub (Oct 9, 2019): It means the Sync fails due to undefined getID3 method. Unfortunately the author did not respond but I have tried all solutions given and they didn't fix the issue.
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

its my 10th try or so to get this thing running at all. tried over the last 2 years... getting into the web-interface now was as far as i ever got, just to be stopped again by yet another bug...

<!-- gh-comment-id:540078125 --> @gorfreed commented on GitHub (Oct 9, 2019): its my 10th try or so to get this thing running at all. tried over the last 2 years... getting into the web-interface now was as far as i ever got, just to be stopped again by yet another bug...
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

You have closed other "issues" detailing the same problem before, without resolution:

https://github.com/phanan/koel/issues/1056

<!-- gh-comment-id:540081236 --> @gorfreed commented on GitHub (Oct 9, 2019): You have closed other "issues" detailing the same problem before, without resolution: https://github.com/phanan/koel/issues/1056
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

I'm sorry? What part here is unclear to you?

image

<!-- gh-comment-id:540082817 --> @phanan commented on GitHub (Oct 9, 2019): I'm sorry? What part here is unclear to you? ![image](https://user-images.githubusercontent.com/8056274/66501367-945a9f00-eac3-11e9-91db-492690faa8dd.png)
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

I created another ticket for this:
https://github.com/phanan/koel/issues/1102

<!-- gh-comment-id:540087496 --> @gorfreed commented on GitHub (Oct 9, 2019): I created another ticket for this: https://github.com/phanan/koel/issues/1102
Author
Owner

@BrookeDot commented on GitHub (Oct 9, 2019):

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.

<!-- gh-comment-id:540094372 --> @BrookeDot commented on GitHub (Oct 9, 2019): 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](https://github.com/JamesHeinrich/getID3/releases/tag/v1.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](https://github.com/phanan/koel/blob/master/.github/ISSUE_TEMPLATE.md) 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](https://github.com/Kickball/awesome-selfhosted#audio-streaming). 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.
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

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

<!-- gh-comment-id:540095541 --> @phanan commented on GitHub (Oct 9, 2019): @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 😑
Author
Owner

@BrookeDot commented on GitHub (Oct 9, 2019):

Downgrading to 1.9.18 sounds like a good option. The Regex issue had to be manually patched for me but was less of a headache then manually upgrading to 2.0 to fix this issue.

As for replication, I thought I mention my setup but looks like I didn't. Sorry! I'm running the following:

Debian 10.1 (buster)
NGINX 1.17.4
PHP 7.3.10
MariaDB 10.4.8

If I had to guess based on the output it's likely the PHP version that is causing the issue but we'd need to compare setups of others to be 100% on that. I see that getID3 1.9.18 says its tested with php 7.4 which is a good sign.

<!-- gh-comment-id:540099518 --> @BrookeDot commented on GitHub (Oct 9, 2019): Downgrading to 1.9.18 sounds like a good option. The Regex issue had to be manually patched for me but was less of a headache then manually upgrading to 2.0 to fix this issue. As for replication, I thought I mention my setup but looks like I didn't. Sorry! I'm running the following: Debian 10.1 (buster) NGINX 1.17.4 PHP 7.3.10 MariaDB 10.4.8 If I had to guess based on the output it's likely the PHP version that is causing the issue but we'd need to compare setups of others to be 100% on that. I see that getID3 1.9.18 says its tested with php 7.4 which is a good sign.
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

OK, PR created. As long as the tests pass, I'll merge and release a new version.

<!-- gh-comment-id:540104904 --> @phanan commented on GitHub (Oct 9, 2019): OK, PR created. As long as the tests pass, I'll merge and release a new version.
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

@BrookeDot Koel's TravisCI covers PHP 7.1, 7.2, and 7.3, so I'm pretty clueless about this issue.

<!-- gh-comment-id:540106746 --> @phanan commented on GitHub (Oct 9, 2019): @BrookeDot Koel's TravisCI covers PHP 7.1, 7.2, and 7.3, so I'm pretty clueless about this issue.
Author
Owner

@gorfreed commented on GitHub (Oct 9, 2019):

Hi guys, thank you for the responses! I am happy to see such an invested community! @BrookeDot I am pretty much on the bottom end of the Linux proficiency scale and I am amazed whenever I accomplish anything on my server. That said, usually I am able to find causes with some persistence and logic, but sometimes some steps of solutions discussed are so super-obvious that people don't spell them out, which is when I will be unable to recreate them. Below is a printout of me replacing the getid3 folder as suggested. As you see the sync command still doesn't run through. Am I wrong suspecting that perhaps there is more of a directory/path problem going on here?

image

<!-- gh-comment-id:540135675 --> @gorfreed commented on GitHub (Oct 9, 2019): Hi guys, thank you for the responses! I am happy to see such an invested community! @BrookeDot I am pretty much on the bottom end of the Linux proficiency scale and I am amazed whenever I accomplish anything on my server. That said, usually I am able to find causes with some persistence and logic, but sometimes some steps of solutions discussed are so super-obvious that people don't spell them out, which is when I will be unable to recreate them. Below is a printout of me replacing the getid3 folder as suggested. As you see the sync command still doesn't run through. Am I wrong suspecting that perhaps there is more of a directory/path problem going on here? ![image](https://user-images.githubusercontent.com/6634117/66510545-81e96100-ead5-11e9-8c09-79644d8b7c75.png)
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

@gorfreed FWIW you're using the root account, which is oftentimes a big no-no when it comes to web applications. But maybe you want to try the latest release (v4.1.0) which was tagged a couple of minutes ago first.

<!-- gh-comment-id:540149224 --> @phanan commented on GitHub (Oct 9, 2019): @gorfreed FWIW you're using the `root` account, which is oftentimes a big no-no when it comes to web applications. But maybe you want to try the latest release (v4.1.0) which was tagged a couple of minutes ago first.
Author
Owner

@BrookeDot commented on GitHub (Oct 9, 2019):

@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.
<!-- gh-comment-id:540186166 --> @BrookeDot commented on GitHub (Oct 9, 2019): @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.
Author
Owner

@phanan commented on GitHub (Oct 9, 2019):

Thanks @BrookeDot – it's amazing to see how far you're going out of your way to help others :).

<!-- gh-comment-id:540198440 --> @phanan commented on GitHub (Oct 9, 2019): Thanks @BrookeDot – it's amazing to see how far you're going out of your way to help others :).
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#632
No description provided.