To use the Scanner component in our internal mobile app (Tracescan) to scan barcodes and assemblies sequentially—without encountering a “black screen” or similar interruptions.
As a quick background: the app is used to verify that a final mounting assembly contains the correct subassemblies. For this reason, it’s critical that users can scan individual barcodes one after another. Each scan triggers background validation logic that checks the scanned data against our database.
2) Issue:
After scanning the first barcode, tapping the button to initiate the next scan causes the camera feed to appear as a black screen. The Scanner component does not reactivate properly, blocking further scans. This issue occurs intermittently, but frequently enough to significantly affect our workflow.
3) Steps I’ve taken to troubleshoot:
Confirmed the Scanner component is set to use the Back camera by default in the Web Editor.
Verified both Retool and our internal app are running the latest versions (Retool Mobile v3.183.0, Build 2132).
Ruled out user error or custom app logic—this behavior is consistent across different users and usage patterns.
Compared with similar reports that mention Scanner issues, but none mention the camera feed itself being black:
While our issue is not related to focus, the workaround discussed in both posts—switching camera modes (front ↔ back)—resolves the issue temporarily.
While waiting for the fix, we’ve advised our users to toggle the camera modes as a workaround as well.
4) Additional info:
Deployment: Retool Cloud
App type: Mobile App
Affected component: Scanner
Devices: Four iOS devices tested, issue reproducible across them
Workaround used: Toggle camera (front ↔ back) to reinitialize scanner
Update: We are still experiencing this issue and the users now need to log out of their session and login again to access the camera or scanner component.
Hey @joerg.express - thanks for reaching out. I've definitely noticed the scanner get into this state in my own testing, but it's been difficult to consistently reproduce. It certainly doesn't happen after a single scan, at the very least. I'm usually able to scan 10-12 times in quick succession before the camera goes black and the app crashes.
It's clear that there is something wrong, though. I'll huddle up with the Mobile team before the end of the week to hopefully figure out what's going on. As soon as we have clear next steps, I'll provide an update here.
In the meantime, there's an option in the component settings to enable multiple scans in one camera session, which seems to work more reliably for me.
Thank you for your response and for looping in the Mobile team.
Unfortunately, disabling the Single scan setting is not viable for our use-case. Each scanned barcode in our internal app must be validated against our internal database via an endpoint before the user can proceed to scan the next one, and since this validation is a core requirement of the workflow, we cannot allow users to scan multiple barcodes at the same time.
Regarding reproduction, we hope the following details help narrow things down:
On our iOS devices, the issue can be consistently triggered (for testing purposes) by opening the Scanner component, closing it (even without completing a scan), and then opening it again. The camera view then displays a black screen, preventing further scanning (unless users switch camera modes or, even recently, log out and back in).
We also enabled the debug tool to capture any possible logs, but unfortunately, no errors or messages are generated when the black screen occurs.
Device details:
This issue occurs frequently across all tested iOS devices, which are running the latest version of the Retool mobile app:
3Ă— iPhone 13 (iOS 18.5)
1Ă— iPhone 12 Pro (iOS 18.5)
Interestingly, we have not observed the same issue on Android devices. For example:
Samsung SM-S908E/DS (Android 14) works without issue (even after trying to open and close it at least 10-12 times in quick succession).
Thank you in advance, and we are looking forward to new updates or next steps
You may have seen that this was a busy week for us, so I wasn't able to clearly define next steps with the owning team. I'll make a point of doing this early next week, though, and get back to you both as soon as possible!
While we look into this, you might be interested in trying out the scannerV2 component! It's technically still in its beta phase and may have some minor issues, but should be largely functional. In my brief testing, it doesn't seem to have the same freezing issues, at the very least.
I've raised the necessary feature flag for your orgs, meaning you should see it as an option in the mobile IDE. If you do give it a shot, let me know what you find!
Thank you for enabling the scannerV2 component for us.
We tested it with our internal tool, and the good news is that it does not freeze like the original Scanner component and there are no black screens encountered even after repeated scans and re-opening the scanner.
During testing, we noticed that it does not auto-close after the first scan (in both manual and automatic modes). This behavior seems to be expected based on the Changelog in Scanner component improvements in Retool Mobile | Retool Docs, which mentions that "Scanner V2 does not have the autoClose property."
Since this behavior affects our current workflow, we have reverted the test changes for now. We will then need to update some logic on our end to accommodate the new behavior before we can proceed with a more thorough usage.
Question: If scannerV2 does not natively support autoClose, would it be possible to manually trigger a "close" via JavaScript once our validation logic finishes running? If so, it could help us replicate the original flow more closely and reduce confusion for the users.
Other observations:
So far, scanning the same QR code via the Web UI (e.g., using a laptop camera) does not seem to work with scannerV2.
However, the scanner works as expected when published and accessed on a mobile device.
We appreciate your continued support and look forward to any updates you can share regarding both scannerV1 and scannerV2
As an update, we have implemented the new scannerV2 component in our tool and adjusted our internal logic accordingly. So far, it seems to be working as expected and not showing a black screen even after multiple scans.
With this, We have rolled the "test version" out to the users and will be observing if they will encounter similar issues (e.g. black screen, freezing, etc.) during their normal workflow.
In case it is helpful for joerg.express, we added the following to "emulate" the old scanner component behavior:
scannerV2.close(); // To close the component right after capture.
scannerV2.clearValue(); // To clear the component's data array and so that the newly scanned QR code is used by the validation logic. Otherwise, it just appends the new values to it.