yudielcurbelo / react-qr-scanner

A library to scan QR Codes in react.
https://yudielcurbelo.github.io/react-qr-scanner/
MIT License
238 stars 37 forks source link

ERROR: Failed to execute 'detect' on BarcodeDetector': Barcode detection service unavailable #48

Closed BrunoTeixeiraNDB closed 5 months ago

BrunoTeixeiraNDB commented 5 months ago

When trying to open the camera on a Galaxy TAB A8 tablet and received this error 'ERROR: Failed to execute 'detect' on BarcodeDetector': Barcode detection service unavailable' , I've already tried to look for solutions for contouring, but without success, I'm only using it to read QRCodes but it says it doesn't have access to barcodes, how do I make it only stay on QRCodes?

Thank you for your attention and I am available if you need me. ERROR

yudielcurbelo commented 5 months ago

You can use the formats props to filter what barcodes to scan.

formats={[
    'qr_code',
    'micro_qr_code',
    'rm_qr_code',
    'maxi_code',
    'pdf417',
    'aztec',
    'data_matrix',
    'matrix_codes',
    'dx_film_edge',
    'databar',
    'databar_expanded',
    'codabar',
    'code_39',
    'code_93',
    'code_128',
    'ean_8',
    'ean_13',
    'itf',
    'linear_codes',
    'upc_a',
    'upc_e'
]}
testerslol123 commented 5 months ago

Thank you for the answer, @yudielcurbelo . If can, would you update the README at frontpage? I believe some people will confused at why it cannot scan code_128 barcode :)

yudielcurbelo commented 5 months ago

Thank you for the answer, @yudielcurbelo . If can, would you update the README at frontpage? I believe some people will confused at why it cannot scan code_128 barcode :)

Was the issue resolved?

BrunoTeixeiraNDB commented 5 months ago

Thank you @yudielcurbelo. the problem still persists, I'm trying to carry out some more tests to determine what causes this error on an Android tablet, although it works on Android cell phones normally.

BrunoTeixeiraNDB commented 5 months ago

Hi, While checking what could be happening, I identified this error below. error

yudielcurbelo commented 5 months ago

Hi, While checking what could be happening, I identified this error below. error

Hi, While checking what could be happening, I identified this error below. error

By any chance are you using tablet as an internal tool without internet access?

BrunoTeixeiraNDB commented 5 months ago

Correct, I have the tablet on a separate network where it has limited access, if this is the case, what links are necessary for me to be able to release it to correct this problem?

yudielcurbelo commented 5 months ago

Correct, I have the tablet on a separate network where it has limited access, if this is the case, what links are necessary for me to be able to release it to correct this problem?

Make sure that is able to make this request https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.10/dist/reader/zxing_reader.wasm

BrunoTeixeiraNDB commented 5 months ago

Thanks!! I managed to do it after releasing the request.

RodargDev commented 4 months ago

Is there any way for me to use the library in an offline environment? I get that the url should be available but what if it isn't? couldn't you include the wasm in the build instead of requesting it? this would also add offline support for websites if it were the case

hossamelshamyy commented 1 month ago

Is there any way for me to use the library in an offline environment? I get that the url should be available but what if it isn't? couldn't you include the wasm in the build instead of requesting it? this would also add offline support for websites if it were the case

@RodargDev This will help you https://github.com/yudielcurbelo/react-qr-scanner/issues/81#issuecomment-2343842018