Scanner: works only once?

Hi,
I'm working on a retool app using the Scanner component.

It works fine for the first scan (Scan of a datamatrix).
My test setup is quite simple:

  • button for the scanner component
  • scan a datamatrix
  • either display the result directly from scanner component and/or launch an event which display a notification with
    utils.showNotification({title: "scanner:",
    description: JSON.stringify(buttonScanner.data),
    type: 'info',
    duration: 20});

Result:
The first scan is ok, I can see the values displayed and my buttonScanner.data is populated with one value, ex: ["12345"]

The second scan is never triggered, It remains on the scanner vue forever (displaying the live photo image)

i've tried to (and combinaisons of all the things below):

  • change the datamatrix (to change the value),
  • to set/unset all the options : automaticaly close after scan, ignore duplication, dismiss confirmation, set or remove the event trigger

I've also tested

  • scan, then close the scanner (either automatically or manually), then reclick on the button for the next scan
  • scan, shows to popup, and rescan, without closing the scanner component.

it always works on the first scan, and never on the second.

I must refresh the page to make the scanner work again.

I've tested from my mobile (one plus 7 pro, android 10, latest chrome) and from my desktop (macos latest, m1 chip, logitech stream cam in 1080p, latest vivaldi)

Both shows the same behavior: ok for the first scan, unable to "validate" the further scans.

[and for all this tests, i've only one Scanner component in the application].

am I missing something ? (perhaps I should 'reset' the scanner between two scans, but did not found anything in the documentation.

Thanks,
Regards,
Tom.

Hey thomasltd! Thanks for reaching out about this. We are in the process of updating the scanner component to solve issues like this one. It seems to work sporadically for most people, and we are working on making it more consistent and reliable. Sorry for the inconvenience! I have added this thread to the bug report, and we will update you here when we have any more information!

1 Like