Skip to content

Issue with Farnell using barcode scanner #1470

Description

@zeitkunst

Describe the bug
I am having an issue with scanning Farnell barcodes (specifically using nl.farnell.com). For example, with this particular part (EKMG350ELL470ME11D ). The info provider is setup correctly, as I can successfully find that part using Farnell as the info provider. However, when I try and scan a barcode for that part (i.e., in a recent order), my partdb instance (running in a Docker container), gives me a 500 error. (The issue is not with the barcode, as partdb is able to parse the barcode correctly using info mode.)

This is the barcode:

[)>␞06␝K20260729151701␝P␝1PEKMG350ELL470ME11D␝3P2841990␝Q10␝9D␝1T␝4LJP␝4K10␞␄

This is the URL that partdb generates from that barcode:

https://xxxxxxx.net/en/part/from_info_provider/element14/EKMG350ELL470ME11D/create?lotAmount=10&lotName=20260729151701&lotUserBarcode=%5B%29%3E%1E06%1DK20260729151701%1DP%1D1PEKMG350ELL470ME11D%1D3P2841990%1DQ10%1D9D%1D1T%1D4LJP%1D4K10%1E%04

This is the API call that partdb generates:

https://api.element14.com/catalog/products?term=id:EKMG350ELL470ME11D&storeInfo.id=nl.farnell.com&resultsSettings.offset=0&resultsSettings.numberOfResults=20&resultsSettings.responseGroup=large&callInfo.apiKey=API_KEY&callInfo.responseDataFormat=json&versionNumber=1.4"

And this is the error log from partdb:

partdb  | [2026-07-30T21:10:43.901854+00:00] http_client.INFO: Request: "GET https://api.element14.com/catalog/products?term=id:EKMG350ELL470ME11D&storeInfo.id=nl.farnell.com&resultsSettings.offset=0&resultsSettings.numberOfResults=20&resultsSettings.responseGroup=large&callInfo.apiKey=API_KEY&callInfo.responseDataFormat=json&versionNumber=1.4" [] {"url":"/en/part/from_info_provider/element14/EKMG350ELL470ME11D/create?lotAmount=10&lotName=20260729151701&lotUserBarcode=%5B%29%3E%1E06%1DK20260729151701%1DP%1D1PEKMG350ELL470ME11D%1D3P2841990%1DQ10%1D9D%1D1T%1D4LJP%1D4K10%1E%04","ip":"172.23.0.1","http_method":"GET","server":"partdb.tranxxenolab.net","referrer":null,"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"}}
partdb  | [2026-07-30T21:10:44.247915+00:00] http_client.INFO: Response: "200 https://api.element14.com/catalog/products?term=id:EKMG350ELL470ME11D&storeInfo.id=nl.farnell.com&resultsSettings.offset=0&resultsSettings.numberOfResults=20&resultsSettings.responseGroup=large&callInfo.apiKey=API_KEY&callInfo.responseDataFormat=json&versionNumber=1.4" 0.345721 seconds {"http_code":200,"url":"https://api.element14.com/catalog/products?term=id:EKMG350ELL470ME11D&storeInfo.id=nl.farnell.com&resultsSettings.offset=0&resultsSettings.numberOfResults=20&resultsSettings.responseGroup=large&callInfo.apiKey=API_KEY&callInfo.responseDataFormat=json&versionNumber=1.4","total_time":0.345721} {"url":"/en/part/from_info_provider/element14/EKMG350ELL470ME11D/create?lotAmount=10&lotName=20260729151701&lotUserBarcode=%5B%29%3E%1E06%1DK20260729151701%1DP%1D1PEKMG350ELL470ME11D%1D3P2841990%1DQ10%1D9D%1D1T%1D4LJP%1D4K10%1E%04","ip":"172.23.0.1","http_method":"GET","server":"partdb.tranxxenolab.net","referrer":n
partdb  | ull,"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"}}
partdb  | [2026-07-30T21:10:44.248702+00:00] request.CRITICAL: Uncaught PHP Exception RuntimeException: "No part found with ID EKMG350ELL470ME11D" at Element14Provider.php line 294 {"exception":"[object] (RuntimeException(code: 0): No part found with ID EKMG350ELL470ME11D at /var/www/html/src/Services/InfoProviderSystem/Providers/Element14Provider.php:294)
partdb  | [stacktrace]
partdb  | #0 /var/www/html/src/Services/InfoProviderSystem/PartInfoRetriever.php(158): App\\Services\\InfoProviderSystem\\Providers\\Element14Provider->getDetails()
partdb  | #1 /var/www/html/vendor/symfony/cache/LockRegistry.php(113): App\\Services\\InfoProviderSystem\\PartInfoRetriever->{closure:App\\Services\\InfoProviderSystem\\PartInfoRetriever::getDetails():154}()
partdb  | #2 /var/www/html/vendor/symfony/cache/Traits/ContractsTrait.php(102): Symfony\\Component\\Cache\\LockRegistry::compute()
partdb  | #3 /var/www/html/vendor/symfony/cache-contracts/CacheTrait.php(67): Symfony\\Component\\Cache\\Adapter\\AbstractAdapter->{closure:Symfony\\Component\\Cache\\Traits\\ContractsTrait::doGet():85}()
partdb  | #4 /var/www/html/vendor/symfony/cache/Traits/ContractsTrait.php(85): Symfony\\Component\\Cache\\Adapter\\AbstractAdapter->contractsGet()
partdb  | #5 /var/www/html/vendor/symfony/cache-contracts/CacheTrait.php(30): Symfony\\Component\\Cache\\Adapter\\AbstractAdapter->doGet()
partdb  | #6 /var/www/html/src/Services/InfoProviderSystem/PartInfoRetriever.php(154): Symfony\\Component\\Cache\\Adapter\\AbstractAdapter->get()
partdb  | #7 /var/www/html/src/Controller/PartController.php(333): App\\Services\\InfoProviderSystem\\PartInfoRetriever->getDetails()
partdb  | #8 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(183): App\\Controller\\PartController->createFromInfoProvider()
partdb  | #9 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw()
partdb  | #10 /var/www/html/vendor/symfony/http-kernel/Kernel.php(193): Symfony\\Component\\HttpKernel\\HttpKernel->handle()
partdb  | #11 /var/www/html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(34): Symfony\\Component\\HttpKernel\\Kernel->handle()
partdb  | #12 /var/www/html/vendor/autoload_runtime.php(32): Symfony\\Component\\Runtime\\Runner\\Symfony\\HttpKernelRunner->run()
partdb  | #13 /var/www/html/public/index.php(5): require_once('...')
partdb  | #14 {main}
partdb  | "} {"url":"/en/part/from_info_provider/element14/EKMG350ELL470ME11D/create?lotAmount=10&lotName=20260729151701&lotUserBarcode=%5B%29%3E%1E06%1DK20260729151701%1DP%1D1PEKMG350ELL470ME11D%1D3P2841990%1DQ10%1D9D%1D1T%1D4LJP%1D4K10%1E%04","ip":"172.23.0.1","http_method":"GET","server":"partdb.tranxxenolab.net","referrer":null,"token":{"authenticated":true,"roles":["ROLE_USER"],"user_identifier":"admin"}}

To Reproduce
Steps to reproduce the behavior:

  1. Search for part using the provided barcode.
  2. partdb throws a 500 error.

Expected behavior
partdb should successfully execute the search, as the search successfully works using the info provider elsewhere.

Server Side

  • Part-DB Version: 2.13.1
  • PHP Version: 8.4.22 (SAPI: fpm-fcgi)
  • Database Server : sqlite 3.40.1
  • Running in a docker container

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox

Additional context
I'm not sure what I might be doing wrong here, given that the info provider is successfully able to find that part.

Thanks for writing this software. I am happy to provide more info and test any potential fixes.

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