[Bug]: Stacktrace from id3parser while generating preview with nextcloud on mp3 file
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
Hi,
I am trying to generate previews of all my files and it seems that the id3parser extension/plugin throws an error with some mp3 files. Im running newest nextcloud 25.0.2 with PHP 8.1.
Stacktrace:
An unhandled exception has been thrown:
ValueError: strpos(): Argument #3 ($offset) must be contained in argument #1 ($haystack) in /var/www/nextcloud/3rdparty/christophwurst/id3parser/src/getID3/Tags/getid3_id3v2.php:1728
Stack trace:
#0 /var/www/nextcloud/3rdparty/christophwurst/id3parser/src/getID3/Tags/getid3_id3v2.php(1728): strpos()
#1 /var/www/nextcloud/3rdparty/christophwurst/id3parser/src/getID3/Tags/getid3_id3v2.php(338): ID3Parser\getID3\Tags\getid3_id3v2->ParseID3v2Frame()
#2 /var/www/nextcloud/3rdparty/christophwurst/id3parser/src/getID3/getid3.php(164): ID3Parser\getID3\Tags\getid3_id3v2->Analyze()
#3 /var/www/nextcloud/3rdparty/christophwurst/id3parser/src/ID3Parser.php(20): ID3Parser\getID3\getid3->analyze()
#4 /var/www/nextcloud/lib/private/Preview/MP3.php(51): ID3Parser\ID3Parser->analyze()
#5 /var/www/nextcloud/lib/private/Preview/GeneratorHelper.php(65): OC\Preview\MP3->getThumbnail()
#6 /var/www/nextcloud/lib/private/Preview/Generator.php(343): OC\Preview\GeneratorHelper->getThumbnail()
#7 /var/www/nextcloud/lib/private/Preview/Generator.php(162): OC\Preview\Generator->getMaxPreview()
#8 /var/www/nextcloud/lib/private/PreviewManager.php(200): OC\Preview\Generator->generatePreviews()
#9 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(234): OC\PreviewManager->generatePreviews()
#10 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(216): OCA\PreviewGenerator\Command\Generate->parseFile()
#11 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(214): OCA\PreviewGenerator\Command\Generate->parseFolder()
#12 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(214): OCA\PreviewGenerator\Command\Generate->parseFolder()
#13 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(214): OCA\PreviewGenerator\Command\Generate->parseFolder()
#14 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(194): OCA\PreviewGenerator\Command\Generate->parseFolder()
#15 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(140): OCA\PreviewGenerator\Command\Generate->generateUserPreviews()
#16 /var/www/nextcloud/lib/private/User/Manager.php(660): OCA\PreviewGenerator\Command\Generate->OCA\PreviewGenerator\Command\{closure}()
#17 /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php(141): OC\User\Manager->callForSeenUsers()
#18 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\PreviewGenerator\Command\Generate->execute()
#19 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#20 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#22 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#23 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#24 /var/www/nextcloud/occ(11): require_once('...')
The file in question that causes it: 09.-.Burn.Me.Slow.zip
Steps to reproduce
Place the file i added above in the nextcloud instance and run "occ preview:generate-all"
Expected behavior
Not throw a stacktrace and stop the generation of thumbnails :)
Installation method
Community Web installer on a VPS or web space
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- [X] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***",
"***REMOVED SENSITIVE VALUE***"
],
"localstorage.allowsymlinks": "true",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "25.0.2.3",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"overwritehost": "***REMOVED SENSITIVE VALUE***",
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": true,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db"
],
"cron_log": true,
"default_phone_region": "CH",
"filesystem_check_changes": 0,
"filelocking.enabled": "true",
"htaccess.RewriteBase": "\/",
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"log_rotate_size": "104857600",
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"loglevel": 2,
"logtimezone": "Europe\/Zurich",
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"overwriteprotocol": "https",
"enable_previews": "true",
"preview_max_scale_factor": 1,
"preview_concurrency_new": 8,
"preview_concurrency_all": 16,
"enabledPreviewProviders": [
"OC\\Preview\\Movie",
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\MP3",
"OC\\Preview\\MP4",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown",
"OC\\Preview\\PDF",
"OC\\Preview\\SVG",
"OC\\Preview\\Photoshop",
"OC\\Preview\\TIFF",
"OC\\Preview\\Font",
"OC\\Preview\\MSOfficeDoc",
"OC\\Preview\\Illustrator",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\MarkDown"
],
"profile.enabled": false,
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0.5,
"dbindex": 1
},
"quota_include_external_storage": false,
"share_folder": "\/Freigaben",
"skeletondirectory": "",
"trashbin_retention_obligation": "disabled",
"mail_smtpmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"updater.release.channel": "beta",
"ncd_admin_settings": {
"ncd_disable_bt": "1",
"disallow_aria2_settings": "1",
"ncd_aria2_binary": "",
"focusVisibleAdded": "",
"ncd_yt_binary": "",
"ncd_aria2_rpc_host": "",
"ncd_aria2_rpc_port": ""
},
"theme": "",
"app_install_overwrite": [
"video_converter",
"extract"
],
"global_aria2_config": {
"max-connection-per-server": "16",
"max-concurrent-downloads": "50",
"seed-ratio": "0.1",
"seed-time": "60",
"bt-enable-lpd": "true"
},
"cache_path": "\/var\/cache\/nextcloud",
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60"
}
}
List of activated Apps
Enabled:
- activity: 2.17.0
- admin_audit: 1.15.0
- bruteforcesettings: 2.5.0
- camerarawpreviews: 0.8.0
- cloud_federation_api: 1.8.0
- comments: 1.15.0
- dav: 1.24.0
- extract: 1.3.5
- federatedfilesharing: 1.15.0
- files: 1.20.1
- files_fulltextsearch: 25.0.0
- files_fulltextsearch_tesseract: 25.0.0
- files_pdfviewer: 2.6.0
- files_rightclick: 1.4.0
- files_sharing: 1.17.0
- files_trashbin: 1.15.0
- files_versions: 1.18.0
- files_zip: 1.1.2
- fulltextsearch: 25.0.0
- fulltextsearch_elasticsearch: 25.0.0
- groupfolders: 13.1.0
- logreader: 2.10.0
- lookup_server_connector: 1.13.0
- notifications: 2.13.1
- oauth2: 1.13.0
- password_policy: 1.15.0
- photos: 2.0.1
- previewgenerator: 5.1.1
- provisioning_api: 1.15.0
- recommendations: 1.4.0
- related_resources: 1.0.3
- richdocuments: 7.0.2
- richdocumentscode: 22.5.802
- serverinfo: 1.15.0
- settings: 1.7.0
- sharebymail: 1.15.0
- suspicious_login: 4.3.0
- text: 3.6.0
- theming: 2.0.1
- twofactor_backupcodes: 1.14.0
- updatenotification: 1.15.0
- viewer: 1.9.0
- workflowengine: 2.7.0
Disabled:
- circles: 25.0.0
- contactsinteraction: 1.6.0
- dashboard: 7.5.0
- encryption
- federation: 1.15.0
- files_external
- firstrunwizard: 2.14.0
- ncdownloader: 1.0.2
- nextcloud_announcements: 1.14.0
- privacy: 1.9.0
- support: 1.8.0
- survey_client: 1.13.0
- systemtags: 1.15.0
- twofactor_totp
- user_ldap
- user_status: 1.5.0
- weather_status: 1.5.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
No logs get generated when this error happens
Additional info
No response
cc @ChristophWurst
Still the same with 25.0.4 btw :)
Hi, please report it upstream to https://github.com/JamesHeinrich/getID3/issues