[GH-ISSUE #534] [] operator not supported for strings #377

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

Originally created by @3lpsy on GitHub (Feb 6, 2017).
Original GitHub issue: https://github.com/koel/koel/issues/534

I attempted to sync a few songs and received an "Unknown Error".

The song in question can be found here: http://freemusicarchive.org/search/?quicksearch=Ballad+for+typhon.

At first I thought it may be a filename error as the filename contained many "-" and "_" chracters, however, after changing the filename to "tester.mp3", I was still able to reproduce the error.

Koel Version: master branch.
OS: Mac (Sierra)

If such an error is to be expected on master branch, I'd recommend adding a failed sync feature where the sync function catches any exception, removes the songs entry (if added), and adds it to a failed_syncs table. I'd be more than happy to contribute to this functionality if it seems like something people would be interested in.

[2017-02-06 22:54:11] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: [] operator not supported for strings in /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php:439
Stack trace:
#0 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(1056): getid3_mp3->decodeMPEGaudioHeader(2640910, Array, false)
#1 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(852): getid3_mp3->RecursiveFrameScanning(2640774, 2640910, true)
#2 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(1382): getid3_mp3->decodeMPEGaudioHeader(2640774, Array, true)
#3 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(35): getid3_mp3->getOnlyMPEGaudioInfo(2640664)
#4 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/getid3.php(463): getid3_mp3->Analyze()
#5 /Users/user/Projects/forks/koel-streamer/koel/app/Models/File.php(100): getID3->analyze('/Users/user/...')
#6 /Users/user/Projects/forks/koel-streamer/koel/app/Models/File.php(200): App\Models\File->getInfo()
#7 /Users/user/Projects/forks/koel-streamer/koel/app/Services/Media.php(85): App\Models\File->sync(Array, false)
#8 /Users/user/Projects/forks/koel-streamer/koel/bootstrap/cache/compiled.php(6468): App\Services\Media->sync()
#9 /Users/user/Projects/forks/koel-streamer/koel/app/Http/Controllers/API/SettingController.php(25): Illuminate\Support\Facades\Facade::__callStatic('sync', Array)
#10 [internal function]: App\Http\Controllers\API\SettingController->store(Object(App\Http\Requests\API\SettingRequest))
...
Originally created by @3lpsy on GitHub (Feb 6, 2017). Original GitHub issue: https://github.com/koel/koel/issues/534 I attempted to sync a few songs and received an "Unknown Error". The song in question can be found here: http://freemusicarchive.org/search/?quicksearch=Ballad+for+typhon. At first I thought it may be a filename error as the filename contained many "-" and "_" chracters, however, after changing the filename to "tester.mp3", I was still able to reproduce the error. Koel Version: master branch. OS: Mac (Sierra) If such an error is to be expected on master branch, I'd recommend adding a failed sync feature where the sync function catches any exception, removes the songs entry (if added), and adds it to a failed_syncs table. I'd be more than happy to contribute to this functionality if it seems like something people would be interested in. ``` [2017-02-06 22:54:11] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: [] operator not supported for strings in /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php:439 Stack trace: #0 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(1056): getid3_mp3->decodeMPEGaudioHeader(2640910, Array, false) #1 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(852): getid3_mp3->RecursiveFrameScanning(2640774, 2640910, true) #2 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(1382): getid3_mp3->decodeMPEGaudioHeader(2640774, Array, true) #3 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php(35): getid3_mp3->getOnlyMPEGaudioInfo(2640664) #4 /Users/user/Projects/forks/koel-streamer/koel/vendor/james-heinrich/getid3/getid3/getid3.php(463): getid3_mp3->Analyze() #5 /Users/user/Projects/forks/koel-streamer/koel/app/Models/File.php(100): getID3->analyze('/Users/user/...') #6 /Users/user/Projects/forks/koel-streamer/koel/app/Models/File.php(200): App\Models\File->getInfo() #7 /Users/user/Projects/forks/koel-streamer/koel/app/Services/Media.php(85): App\Models\File->sync(Array, false) #8 /Users/user/Projects/forks/koel-streamer/koel/bootstrap/cache/compiled.php(6468): App\Services\Media->sync() #9 /Users/user/Projects/forks/koel-streamer/koel/app/Http/Controllers/API/SettingController.php(25): Illuminate\Support\Facades\Facade::__callStatic('sync', Array) #10 [internal function]: App\Http\Controllers\API\SettingController->store(Object(App\Http\Requests\API\SettingRequest)) ... ```
kerem closed this issue 2026-02-26 02:33:00 +03:00
Author
Owner

@phanan commented on GitHub (Feb 9, 2017):

This looks like a bug with getid3 and I don't think there's much Koel can do here.

Re: failed_syncs table, how do we access it later? Personally I don't really think it's worth it.

<!-- gh-comment-id:278538601 --> @phanan commented on GitHub (Feb 9, 2017): This looks like a bug with [getid3](https://github.com/JamesHeinrich/getID3) and I don't think there's much Koel can do here. Re: `failed_syncs` table, how do we access it later? Personally I don't really think it's worth it.
Author
Owner

@nickster5001 commented on GitHub (Feb 12, 2017):

getid3 patched this issue on their end. You can get the new version from their github for now, until it gets including in a future koel release.

<!-- gh-comment-id:279235714 --> @nickster5001 commented on GitHub (Feb 12, 2017): getid3 patched this issue on their end. You can get the new version from their github for now, until it gets including in a future koel release.
Author
Owner

@3lpsy commented on GitHub (Feb 15, 2017):

Thanks for the input/solution. Went ahead and closed the issue.

@phanan When a sync fails with a given file, I think it would be beneficial to remove it from the sync directory, move the file to a failed directory, and store the original_path and the current_path to a failed_syncs table. Then if they wished to try again, they could trigger a "retry failed files" action which would run a sync on the failed directory.

However, depending on the current roadmap (is there public roadmap?), I don't know if this would be a high priority. Overall, I think adding file management to the front end would greatly improve the user experience.

<!-- gh-comment-id:280129138 --> @3lpsy commented on GitHub (Feb 15, 2017): Thanks for the input/solution. Went ahead and closed the issue. @phanan When a sync fails with a given file, I think it would be beneficial to remove it from the sync directory, move the file to a failed directory, and store the original_path and the current_path to a failed_syncs table. Then if they wished to try again, they could trigger a "retry failed files" action which would run a sync on the failed directory. However, depending on the current roadmap (is there public roadmap?), I don't know if this would be a high priority. Overall, I think adding file management to the front end would greatly improve the user experience.
Author
Owner

@eplanet commented on GitHub (Feb 25, 2017):

I ran into the exact same issue and I think it should be reopened.

The Unknown error is too obscure: it is not acceptable that any underlying library could cause the whole import to fail, especially without even indicating which audio file is wrong.

Hint for the impatient: Commenting lines that are supposed to set error messages do the trick. Even deleting koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php seems to work fine for me…

<!-- gh-comment-id:282489758 --> @eplanet commented on GitHub (Feb 25, 2017): I ran into the exact same issue and I think it should be reopened. The `Unknown error` is too obscure: it is not acceptable that any underlying library could cause the whole import to fail, especially without even indicating which audio file is wrong. Hint for the impatient: Commenting lines that are supposed to set error messages do the trick. Even deleting `koel/vendor/james-heinrich/getid3/getid3/module.audio.mp3.php` seems to work fine for me…
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#377
No description provided.