Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Unable to scan code-39 barcode. #3173

Open
4 of 5 tasks
dkumar-carfax opened this issue Sep 6, 2024 · 2 comments
Open
4 of 5 tasks

🐛 Unable to scan code-39 barcode. #3173

dkumar-carfax opened this issue Sep 6, 2024 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@dkumar-carfax
Copy link

dkumar-carfax commented Sep 6, 2024

What's happening?

Camera is unable to detect a code-39 barcode.

123

Reproduceable Code

const codeScanner = useCodeScanner({
    codeTypes: ['qr', 'ean-13', 'code-39', 'code-128', 'code-93', 'data-matrix'],
    onCodeScanned: (codes) => {
       console.log(codes)
    },
  })

             <Camera
                codeScanner={codeScanner}
                style={{ flex: 1 }}
                androidPreviewViewType="texture-view"
                device={device}
              ></Camera>

Relevant log output

Loading react-native-worklets-core...
Worklets loaded successfully
VisionCameraProxy: Creating Worklet Context...
VisionCameraProxy: Worklet Context Created!
23:53:31.350: [info] 📸 VisionCamera.constantsToExport(): Found 5 initial Camera Devices.
23:53:35.991: [info] 📸 VisionCamera.didSetProps(_:): Updating 20 props: [onInitialized, cameraId, codeScannerOptions, enableBufferCompression, onOutputOrientationChanged, onCodeScanned, preview, onStarted, isActive, isMirrored, onViewReady, onError, onStopped, onPreviewOrientationChanged, onPreviewStopped, enableFrameProcessor, onPreviewStarted, flex, torch, onShutter]
23:53:35.994: [info] 📸 VisionCamera.configurePreviewOrientation(_:): Updating Preview rotation: portrait...
23:53:35.994: [info] 📸 VisionCamera.configureOutputOrientation(_:): Updating Outputs rotation: portrait...
23:53:35.994: [info] 📸 VisionCamera.configure(_:): configure { ... }: Waiting for lock...
23:53:35.999: [info] 📸 VisionCamera.configure(_:): configure { ... }: Updating CameraSession Configuration... Difference(inputChanged: true, outputsChanged: true, videoStabilizationChanged: true, orientationChanged: true, formatChanged: true, sidePropsChanged: true, torchChanged: true, zoomChanged: true, exposureChanged: true, audioSessionChanged: true, locationChanged: true)
23:53:35.999: [info] 📸 VisionCamera.configureDevice(configuration:): Configuring Input Device...
23:53:35.999: [info] 📸 VisionCamera.configureDevice(configuration:): Configuring Camera com.apple.avfoundation.avcapturedevice.built-in_video:0...
23:53:36.001: [info] 📸 VisionCamera.configureDevice(configuration:): Successfully configured Input Device!
23:53:36.001: [info] 📸 VisionCamera.configureOutputs(configuration:): Configuring Outputs...
23:53:36.001: [info] 📸 VisionCamera.configureOutputs(configuration:): Adding Code Scanner output...
23:53:36.002: [info] 📸 VisionCamera.configurePreviewOrientation(_:): Updating Preview rotation: portrait...
23:53:36.002: [info] 📸 VisionCamera.configureOutputOrientation(_:): Updating Outputs rotation: portrait...
23:53:36.002: [info] 📸 VisionCamera.configureOutputs(configuration:): Successfully configured all outputs!
23:53:36.004: [info] 📸 VisionCamera.setTargetOutputOrientation(_:): Setting target output orientation from device to device...
23:53:36.201: [info] 📸 VisionCamera.init(frame:session:): Preview Layer started previewing.
23:53:36.202: [info] 📸 VisionCamera.configure(_:): Beginning AudioSession configuration...
23:53:36.202: [info] 📸 VisionCamera.configureAudioSession(configuration:): Configuring Audio Session...
23:53:36.203: [info] 📸 VisionCamera.configure(_:): Committed AudioSession configuration!
23:53:36.203: [info] 📸 VisionCamera.configure(_:): Beginning Location Output configuration...
23:53:36.206: [info] 📸 VisionCamera.configure(_:): Finished Location Output configuration!

Camera Device

{
  "isMultiCam": false,
  "sensorOrientation": "portrait",
  "formats": [],
  "id": "com.apple.avfoundation.avcapturedevice.built-in_video:0",
  "supportsRawCapture": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "minZoom": 1,
  "supportsLowLightBoost": false,
  "maxExposure": 8,
  "position": "back",
  "hardwareLevel": "full",
  "hasTorch": true,
  "minFocusDistance": 15,
  "maxZoom": 123.75,
  "minExposure": -8,
  "name": "Back Camera",
  "hasFlash": true
}

Device

iPhone 15 (17.6.1)

VisionCamera Version

4.5.2

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

@dkumar-carfax dkumar-carfax added the 🐛 bug Something isn't working label Sep 6, 2024
Copy link

maintenance-hans bot commented Sep 6, 2024

Guten Tag, Hans here! 🍻
Thanks for providing all ze details, but we're missing some critical information. Can you please share any relevant logs from Xcode or adb logcat? This would really help mrousavy to understand ze issue better. If you haven’t done it yet, here’s how to get ze logs:

  • For iOS, run your app in Xcode and check ze console for any errors while scanning za barcode.
  • For Android, use adb logcat in your terminal while reproducing ze issue.

Looking forward to your reply!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

@xulihang
Copy link
Contributor

xulihang commented Sep 19, 2024

This barcode does not have enough quiet zone. You can try ZXing or Dynamsoft Barcode Reader to read it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants