-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catalog creation in 6.2 fails #3750
Comments
I ran into a similar (if not identical) problem. I tough I had fix it by changing the Filename and Folder Pattern of the catalog to "%t" and "%A" but it looks like the issue still occurs. |
I reverted my changes and tried changing the filename and folder patterns. No dice. I'm back to my hack. |
Same issue. OP's hack works. Just moved my server to new hardware and was going nuts thinking I had a config issue somewhere. Decided to freshen up my instance and add a new catalog and ran into this as well. |
same here |
I did some cleanup in my mp3 files; I had some corrupted files (empty files), invalid year tag on some files ("0000"), duplicates files in different location (or different file name) containing identical tag information. After fixing those issues, I was able to update the catalog without any issue. Not sure if this can solve this particular problem, but it might be worth a try : |
I cherry picked those 2 commits, and deleted and re-created my catalog successfully. Thanks for the fixes! |
Description
I created a new 6.2 installation. When I attempted to add a catalog, there is an internal crash/stack trace in src/Module/Util/VaInfo.php.
Describe the bug
I tried to add a new catalog, and kept seeing server-side events failing, reconnecting.
From looking at the apache logs, I saw a stack trace in :
src/Module/Util/VaInfo.php in clean_tag_info()
This throws an exception when $keys somehow comes in as an Array:
foreach ($keys as $key) {
$tags = $results[$key] ?? array();
...
}
I hacked it to something I had seen in the file, which prevents the crash/stacktrace:
foreach ($keys as $key) {
if (is_array($key)) {
$key = 'general';
}
$tags = $results[$key] ?? array();
...
}
To reproduce
Add new catalog.
Expected behavior
Catalog created.
Environment
Client type
Logs
PHP Fatal error: Uncaught TypeError: Illegal offset type in /var/www/html/ampache6.via.git/src/Module/Util/VaInfo.php:580\nStack trace:\n#0 /var/www/html/ampache6.via.git/src/Module/Util/VaInfo.php(864): Ampache\Module\Util\VaInfo::clean_tag_info()\n#1 /var/www/html/ampache6.via.git/src/Module/Util/VaInfo.php(359): Ampache\Module\Util\VaInfo->_get_tags()\n#2 /var/www/html/ampache6.via.git/src/Module/Catalog/Catalog_local.php(901): Ampache\Module\Util\VaInfo->gather_tags()\n#3 /var/www/html/ampache6.via.git/src/Module/Catalog/Catalog_local.php(445): Ampache\Module\Catalog\Catalog_local->insert_local_song()\n#4 /var/www/html/ampache6.via.git/src/Module/Catalog/Catalog_local.php(308): Ampache\Module\Catalog\Catalog_local->add_file()\n#5 /var/www/html/ampache6.via.git/src/Module/Catalog/Catalog_local.php(365): Ampache\Module\Catalog\Catalog_local->add_files()\n#6 /var/www/html/ampache6.via.git/src/Module/Catalog/Catalog_local.php(308): Ampache\Module\Catalog\Catalog_local->add_file()\n#7 /var/www/html/ampache6.via.git/src/Module/Catalog/Catalog_local.php(529): Ampache\Module\Catalog\Catalog_local->add_files()\n#8 /var/www/html/ampache6.via.git/src/Repository/Model/Catalog.php(4087): Ampache\Module\Catalog\Catalog_local->add_to_catalog()\n#9 /var/www/html/ampache6.via.git/src/Module/Api/SseApiApplication.php(90): Ampache\Repository\Model\Catalog::process_action()\n#10 /var/www/html/ampache6.via.git/public/server/sse.server.php(32): Ampache\Module\Api\SseApiApplication->run()\n#11 {main}\n thrown in /var/www/html/ampache6.via.git/src/Module/Util/VaInfo.php on line 580, referer: http://172.16.0.10/ampache6/
The text was updated successfully, but these errors were encountered: