Skip to content

Database corruption due to LCSC import #1188

@oddlama

Description

@oddlama

Describe the bug

I imported some LCSC components manually today via "import from provider" and after about 90 components my requests were answered with this site:

Image

None of the commands above fixed the problem. The Part-DB instance was freshly set up today. Here's the first error from the server log:

[2026-01-12T20:32:32.799681+00:00] request.INFO: Matched route "info_providers_create_part". {"route":"info_providers_create_part","route_parameters":{"_route":"info_providers_create_part","_controller":"App\\Controller\\PartController::createFromInfoProvider","_locale":"en","providerKey":"lcsc","providerId":"C967633"},"request_uri":"http://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","method":"POST"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884109+00:00] security.DEBUG: Checking for authenticator support. {"firewall_name":"main","authenticators":5} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884150+00:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"App\\Security\\ApiTokenAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884164+00:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"App\\Security\\ApiTokenAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884172+00:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Scheb\\TwoFactorBundle\\Security\\Http\\Authenticator\\TwoFactorAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884186+00:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Scheb\\TwoFactorBundle\\Security\\Http\\Authenticator\\TwoFactorAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884192+00:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Nbgrp\\OneloginSamlBundle\\Security\\Http\\Authenticator\\SamlAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884200+00:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Nbgrp\\OneloginSamlBundle\\Security\\Http\\Authenticator\\SamlAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884206+00:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\FormLoginAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884215+00:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\FormLoginAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884221+00:00] security.DEBUG: Checking support on authenticator. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\RememberMeAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.884454+00:00] security.DEBUG: Authenticator does not support the request. {"firewall_name":"main","authenticator":"Symfony\\Component\\Security\\Http\\Authenticator\\RememberMeAuthenticator"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.903753+00:00] security.DEBUG: Read existing security token from the session. {"key":"_security_main","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:32.974216+00:00] security.DEBUG: User was reloaded from a user provider. {"provider":"Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider","username":"admin"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":null}
[2026-01-12T20:32:33.309402+00:00] request.DEBUG: CSRF validation accepted using both origin and double-submit info. [] {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"}}
[2026-01-12T20:32:33.376426+00:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  malformed array literal: "{24,25,34,26,27,41,42,53,22,23,45,46,29,30,31,32,33,50,51,56,57,47,48,16,49,17,18,19,39,40,20,21,52,28,43,55,44,,37,38,35,36,54}" DETAIL:  Unexpected "," character. CONTEXT:  unnamed portal parameter $44 = '...'" at ExceptionConverter.php line 85 {"exception":"[object] (Doctrine\\DBAL\\Exception\\DriverException(code: 7): An exception occurred while executing a query: SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  malformed array literal: \"{24,25,34,26,27,41,42,53,22,23,45,46,29,30,31,32,33,50,51,56,57,47,48,16,49,17,18,19,39,40,20,21,52,28,43,55,44,,37,38,35,36,54}\"\nDETAIL:  Unexpected \",\" character.\nCONTEXT:  unnamed portal parameter $44 = '...' at /nix/store/1jpl80w62nz30nqdz4c9mhy1bfxdwib6-part-db-2.4.0/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php:85)\n[previous exception] [object] (Doctrine\\DBAL\\Driver\\PDO\\Exception(code: 7): SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  malformed array literal: \"{24,25,34,26,27,41,42,53,22,23,45,46,29,30,31,32,33,50,51,56,57,47,48,16,49,17,18,19,39,40,20,21,52,28,43,55,44,,37,38,35,36,54}\"\nDETAIL:  Unexpected \",\" character.\nCONTEXT:  unnamed portal parameter $44 = '...' at /nix/store/1jpl80w62nz30nqdz4c9mhy1bfxdwib6-part-db-2.4.0/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:24)\n[previous exception] [object] (PDOException(code: 22P02): SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  malformed array literal: \"{24,25,34,26,27,41,42,53,22,23,45,46,29,30,31,32,33,50,51,56,57,47,48,16,49,17,18,19,39,40,20,21,52,28,43,55,44,,37,38,35,36,54}\"\nDETAIL:  Unexpected \",\" character.\nCONTEXT:  unnamed portal parameter $44 = '...' at /nix/store/1jpl80w62nz30nqdz4c9mhy1bfxdwib6-part-db-2.4.0/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:55)"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"}}
[2026-01-12T20:32:33.409028+00:00] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} {"url":"/en/part/from_info_provider/lcsc/C967633/create","ip":"10.44.0.11","http_method":"POST","server":"0.0.0.0","referrer":"https://part-db.example.com/en/part/from_info_provider/lcsc/C967633/create","token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"}}
[2026-01-12T20:32:32.799672+00:00] request.INFO: Matched route "info_providers_create_part". {"route":"info_providers_create_part","route_parameters":{"_route":"info_providers_create_part","_controller":"App\\Controller\\PartController::createFromInfoProvider","_locale":"en","providerKey":"lcsc","providerId":"C492374"},"request_uri":"http://part-db.example.com/en/part/from_info_provider/lcsc/C492374/create","method":"GET"} {"url":"/en/part/from_info_provider/lcsc/C492374/create","ip":"10.44.0.11","http_method":"GET","server":"0.0.0.0","referrer":null,"token":null}

To Reproduce
I think importing C967633 from LCSC broke this, but since the error doesn't affect all dialogs it could have been another of my 90 components.

Server Side

  • Part-DB Version: Part-DB 2.4.0
  • PHP Version: PHP 8.4.16
  • Database Server: Postrgesql 16.11

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions