Skip to content

Initial Sync fails with tag issue #169

Description

@dhmilton

I have just deployed with docker and the initial sync fails:
root@d39bdd6d3cf4:/var/www/html# php artisan koel:sync

INFO Scanning /music.

39465/113064 [=========>------------------] 34%
ValueError

strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack)

at vendor/james-heinrich/getid3/getid3/module.tag.id3v2.php:1535
1531▕ $frame_filename = '';
1532▕ }
1533▕ $frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);
1534▕
➜ 1535▕ $frame_terminatorpos = strpos($parsedFrame['data'], $frame_textencoding_terminator, $frame_offset);
1536▕ if (ord(substr($parsedFrame['data'], $frame_terminatorpos + strlen($frame_textencoding_terminator), 1)) === 0) {
1537▕ $frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00
1538▕ }
1539▕ $parsedFrame['description'] = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);

  +3 vendor frames 

4 app/Services/FileSynchronizer.php:52
getID3::analyze()

5 app/Services/FileSynchronizer.php:79
App\Services\FileSynchronizer::getFileScanInformation()

There is no more detail in the laravel.log.
Due to the size of my library I am running with MEMORY_LIMIT=2048M.
I get that there may be invalid characters in the tags in one of my files, but there is no detail that might let me find the file which is causing the issue and it would be like trying to find a needle in a haystack...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions