"No match found for barcode data" scanning stock items

This issue has been tracked since 2023-01-10.

Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

Describe the bug*

I upgraded my development build (in docker) recently and now can't scan stock items into the main/global barcode scan dialog. It reports "no match found for barcode data" for all barcodes. I logged out, cleared all cache and cookies, logged back in, same thing.

Steps to Reproduce

  1. Click the main barcode-scan icon at the top.
  2. Scan a stock item.

Expected behavior

Inventree takes me to the page for the stock item.

Deployment Method

  • Docker
  • Bare metal

Version Information

Version Information:

InvenTree-Version: 0.10.0 dev
Django Version: 3.2.16
Commit Hash: 49630e2
Commit Date: 2023-01-10
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Active plugins: False

Relevant log output

No response

SchrodingersGat wrote this answer on 2023-01-11

Can you please provide example data you are sending to the server? Your browser will have a "developer tab" where you can view the data and server response

alexisvl wrote this answer on 2023-01-13

Looks like it's triggering early. I get two requests to /api/barcode:

  • {"barcode":"{\"st"}
  • {"barcode":"ockitem\": 536}"}

It works properly if I scan the barcode into a text editor and then paste it in. I think it might be a timing issue? This scanner (Symbol DS6878) keys the data a little slow in bluetooth mode.

alexisvl wrote this answer on 2023-01-13

Now I check and apparently the processing delay is configurable, so this should be an easy fix for me. Still, might want to trim the default, this is a pretty common scanner.

100ms seems to work.

I'm not sure what changed when I upgraded, did it work differently? I assumed it submitted on the line feed after the scan, not using a timer...

matmair wrote this answer on 2023-01-13

@alexisvl changing the default timer will make the wait for the scan to register longer, I think we will wait for more reports before changing it.

alexisvl wrote this answer on 2023-01-13

I'm not sure who's going to get impatient at 100ms. Especially if we also respond to the line feed that most scanners send by default... It just feels like a timer is the wrong way to solve this problem. The setting also isn't super discoverable, at least from the perspective of just suddenly getting "no match" errors with no pointer to why.

Maybe the "no match" message should include the text of what it thought the barcode was? I bet this would have been a lot more intuitive to fix had I seen a partial barcode there.

matmair wrote this answer on 2023-01-13

The latency is dependent on a lot of factors, I would rather not start adjusting it to user setups. The shorter the delay is the snappier the interface feels.
I am open to PRs that change the language of the (English) text, it should be easy to find with GH search. I am not that good with this foreign language so not sure what to change to.

SchrodingersGat wrote this answer on 2023-01-30

@alexisvl would you be willing to submit a PR which improves the setting description, and error messages?

More Details About Repo
Owner Name inventree
Repo Name InvenTree
Full Name inventree/InvenTree
Language Python
Created Date 2017-03-23
Updated Date 2023-03-31
Star Count 2586
Watcher Count 61
Fork Count 411
Issue Count 141


Issue Title Created Date Updated Date