[GH-ISSUE #1715] Initial library scan fails #940

Closed
opened 2026-02-26 02:34:42 +03:00 by kerem · 1 comment
Owner

Originally created by @byrongamatos on GitHub (Oct 16, 2023).
Original GitHub issue: https://github.com/koel/koel/issues/1715

Describe the bug
After setting up koel, i issue the command to start searching for music. The system goes through scanning, but at 34% it fails with the following message:

`
root@33b602e314a6:/var/www/html# php artisan koel:sync

INFO Scanning /music.

12074/35089 [=========>------------------] 34%
ValueError

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

at vendor/james-heinrich/getid3/getid3/module.tag.id3v2.php:1821
4 app/Services/FileSynchronizer.php:52
getID3::analyze()

1817▕                       $parsedFrame['description'] = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);                  
1818▕                       $parsedFrame['description'] = $this->MakeUTF16emptyStringEmpty($parsedFrame['description']);                                      
1819▕                       $frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator);                                                    
1820▕                                                                        
1821▕                      $frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset);                                                       
1822▕                       $frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset);                              
1823▕                       $frame_offset = $frame_terminatorpos + strlen("\x00");        
1824▕                                                                        
1825▕                       $frame_sellerlogo = substr($parsedFrame['data'], $frame_offset);
                                                                         
  +3 vendor frames
    5   app/Services/FileSynchronizer.php:79                                       
  App\Services\FileSynchronizer::getFileScanInformation()`

To reproduce
Steps to reproduce the behavior:

  1. Log on to docker container
  2. php artisan koel:sync

Expected behavior
The library scan completes

Environment

  • Koel v6.11.2
  • OS: Latest docker
Originally created by @byrongamatos on GitHub (Oct 16, 2023). Original GitHub issue: https://github.com/koel/koel/issues/1715 **Describe the bug** After setting up koel, i issue the command to start searching for music. The system goes through scanning, but at 34% it fails with the following message: ` root@33b602e314a6:/var/www/html# php artisan koel:sync INFO Scanning /music. 12074/35089 [=========>------------------] 34% ValueError strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) at vendor/james-heinrich/getid3/getid3/module.tag.id3v2.php:1821 4 app/Services/FileSynchronizer.php:52 getID3::analyze() 1817▕ $parsedFrame['description'] = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset); 1818▕ $parsedFrame['description'] = $this->MakeUTF16emptyStringEmpty($parsedFrame['description']); 1819▕ $frame_offset = $frame_terminatorpos + strlen($frame_textencoding_terminator); 1820▕ 1821▕ $frame_terminatorpos = strpos($parsedFrame['data'], "\x00", $frame_offset); 1822▕ $frame_mimetype = substr($parsedFrame['data'], $frame_offset, $frame_terminatorpos - $frame_offset); 1823▕ $frame_offset = $frame_terminatorpos + strlen("\x00"); 1824▕ 1825▕ $frame_sellerlogo = substr($parsedFrame['data'], $frame_offset); +3 vendor frames 5 app/Services/FileSynchronizer.php:79 App\Services\FileSynchronizer::getFileScanInformation()` **To reproduce** Steps to reproduce the behavior: 1. Log on to docker container 2. php artisan koel:sync **Expected behavior** The library scan completes **Environment** - Koel v6.11.2 - OS: Latest docker
kerem closed this issue 2026-02-26 02:34:42 +03:00
Author
Owner

@byrongamatos commented on GitHub (Oct 26, 2023):

I was able to solve this by going into my library and retagging/auditing everything.

The error message was thrown because of a corrupted mp3, that had 0 bytes in size.
It would have been great if Koel logs out the filename that caused it to crash, it would have saved me a couple of days of work

<!-- gh-comment-id:1780525480 --> @byrongamatos commented on GitHub (Oct 26, 2023): I was able to solve this by going into my library and retagging/auditing everything. The error message was thrown because of a corrupted mp3, that had 0 bytes in size. It would have been great if Koel logs out the filename that caused it to crash, it would have saved me a couple of days of work
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#940
No description provided.