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

🐛 Specific QR code is not being read by Android #3264

Open
3 of 5 tasks
Barteque opened this issue Oct 29, 2024 · 3 comments
Open
3 of 5 tasks

🐛 Specific QR code is not being read by Android #3264

Barteque opened this issue Oct 29, 2024 · 3 comments
Labels
🐛 bug Something isn't working

Comments

@Barteque
Copy link

Barteque commented Oct 29, 2024

What's happening?

130
This code is not being read by the library but generic android camera app recognises this as a JSON.
Is there an issue with coding?

I've checked and it's not recognized as any other type of code (types from 4.3.1 library version).

Upgrading an app requires react-native upgrade so it's bigger deal for me.
Is it fixed in newest library?

Reproduceable Code

const device = useCameraDevice('back');

  const codeScanner = useCodeScanner({
    codeTypes: ['qr'],
    onCodeScanned: (codes) => {
      logger.debug(
        'Codes scanned:',
        codes.map((c: Code) => `${c.type}: ${c.value}`)
      );
      const readValue = codes[0].value;
      if (readValue) {
        logger.info('Code scanned:', readValue);
        if (showReadValue) setQrcode(readValue);
        props.onQRread(readValue);
      } else {
        logger.warn('Scanned empty code');
      }
    }
  });

Relevant log output

2024-10-29 11:35:03.937 16410-16827 CameraView      com.es.dev  I  invokeOnAverageFpsChanged(0.0)
2024-10-29 11:35:04.439 16410-17326 Vision          com.es.dev  W  Would have logged:
                                                                    # m.aqc@5e70742b
2024-10-29 11:35:04.936 16410-16827 CameraView      com.es.dev  I  invokeOnAverageFpsChanged(0.0)
 ...
2024-10-29 11:35:14.939 16410-16827 CameraView      com.es.dev  I  invokeOnAverageFpsChanged(0.0)
2024-10-29 11:35:15.732 16410-16410 CameraSession   com.es.dev  I  Preview orientation changed! PORTRAIT
2024-10-29 11:35:15.733 16410-16410 CameraView      com.es.dev  I  invokeOnPreviewOrientationChanged(PORTRAIT)
2024-10-29 11:35:15.737 16410-16410 CameraSession   com.es.dev  I  Output orientation changed! PORTRAIT
2024-10-29 11:35:15.738 16410-16410 CameraView      com.es.dev  I  invokeOnOutputOrientationChanged(PORTRAIT)
2024-10-29 11:35:15.940 16410-16827 CameraView      com.es.dev  I  invokeOnAverageFpsChanged(0.0)
2024-10-29 11:35:18.284 16410-16586 ReactNativeJS   com.es.dev  I  �[37m2024-10-29 11:35:18 | DEBUG : Codes scanned: 
                                                                        [
                                                                            [
                                                                            "qr: null"
                                                                            ]
                                                                        ]
                                                                        �[0m
2024-10-29 11:35:18.286 16410-16586 ReactNativeJS  com.es.dev   I  �[33m2024-10-29 11:35:18 | WARN : Scanned empty code �[0m

...and many sets of DEBUG : Codes scanned: ..null...  and WARN : Scanned empty code

Camera Device

{
"formats": [],
  "sensorOrientation": "landscape-left",  
"hardwareLevel": "limited",
"maxZoom": 4,
"minZoom": 1,
"maxExposure": 20,
"supportsLowLightBoost": false,  
"neutralZoom": 1,
  "physicalDevices": [   "wide-angle-camera"  ],
 "supportsFocus": true,
"supportsRawCapture": false,
"isMultiCam": false,
 "minFocusDistance": 10,
 "minExposure": -20,
 "name": "0 (BACK) androidx.camera.camera2",
 "hasFlash": true,
  "hasTorch": true,
 "position": "back",
  "id": "0"
}

Device

Samsung A12

VisionCamera Version

4.3.1

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

@Barteque Barteque added the 🐛 bug Something isn't working label Oct 29, 2024
Copy link

maintenance-hans bot commented Oct 29, 2024

Guten Tag, Hans here! 🍻

It looks like you have a valid concern with scanning a specific QR code. However, I see you did not try reproducing the issue in the VisionCamera Example app. It’s very important to do so, as it can help us determine if the issue is specific to your implementation or a broader problem with the library.

Also, please ensure that you are using the latest versions of both the library and the React Native environment. If you can provide additional logs from adb logcat when attempting to scan the QR code, it would greatly assist mrousavy in addressing your issue.

And remember, if you want to support ongoing development and get faster responses, consider sponsoring the project here.

Looking forward to your updates!

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

@abdelrahman-muntaser
Copy link

Same issue here

@Barteque
Copy link
Author

Barteque commented Nov 8, 2024

we had to change the QR reading library :(

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