Ngx-scanner: Does not scan on some android phones

Created on 7 Mar 2018  路  14Comments  路  Source: zxing-js/ngx-scanner

Firstly, thank you for this great piece of work! We had trouble getting instascan to work on iOS and this has solved our problem.

But, I tested this on a Pixel 2 and Mi A1 it does not work all the time. Strangely, instascan works well on Chrome Android.

What's weird is ngx-zxing works on a Nexus 5 and an old Vivo phone with Android 4.2

Under https://github.com/werthdavid/ngx-zxing#performance you mentioned, "Auto-focus can cause lags in detection as the camera adjusts focus." Is there a fixed-focus option available?

Not sure what is causing this issue.

help wanted android ionic

Most helpful comment

@lawrencetaur concerning your question with autofocus: I made an follow-up issue (#40) for that

All 14 comments

What version of the lib are you using?

^0.3.4

Please test with v1.0.0-dev :)

No matching version found for [email protected]

I tried the following in package.json
^1.0.0-dev
^v1.0.0-dev
v1.0.0-dev
v1.0.0-dev.b3ec02

Still could not find the version. Even tried 'npm i https://github.com/werthdavid/ngx-zxing/tree/v1.0.0-dev.b3ec02' and 'npm i https://github.com/werthdavid/ngx-zxing/tree/v1.0.0-dev'

Yes, sorry we're currently doing lots of refactoring... the package would be

@zxing/[email protected]

@lawrencetaur concerning your question with autofocus: I made an follow-up issue (#40) for that

Works well on Ionic with 'ionic serve' but throws the following error when built for production:
`Running app-scripts build: --prod
[19:02:15] build prod started ...
[19:02:15] clean started ...
[19:02:15] clean finished in 7 ms
[19:02:15] copy started ...
[19:02:15] deeplinks started ...
[19:02:15] deeplinks finished in 75 ms
[19:02:15] ngc started ...
[19:02:21] typescript error
Error encountered resolving symbol values statically. Calling function '傻makeDecorator', function calls are
not supported. Consider replacing the function or lambda with a reference to an exported function, resolving
symbol NgModule in
/home/clarity/Desktop/dev/qrcodescan-test/node_modules/@zxing/ngx-scanner/node_modules/@angular/core/core.d.ts,
resolving symbol NgxZxingModule in
/home/clarity/Desktop/dev/qrcodescan-test/node_modules/@zxing/ngx-scanner/zxing-ngx-scanner.d.ts, resolving
symbol NgxZxingModule in
/home/clarity/Desktop/dev/qrcodescan-test/node_modules/@zxing/ngx-scanner/zxing-ngx-scanner.d.ts

Error: The Angular AoT build failed. See the issues above
at /home/clarity/Desktop/dev/qrcodescan-test/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55
at step (/home/clarity/Desktop/dev/qrcodescan-test/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/home/clarity/Desktop/dev/qrcodescan-test/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/home/clarity/Desktop/dev/qrcodescan-test/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
at
[19:02:21] copy finished in 6.44 s`

@zxing/[email protected] <- this is the package I have used

So, are you using Ionic?

Yes. Ionic 3.9

Nice, but unfortunately is not my area. Probably is the deploy type we're using that generates that problem. Do you have any extra info?

Don't have any ionic experience either...
Can you use the sources of this component so it maybe prints more helpful output?

Master branch works well on an Ionic 3.9 PWA! Thank you!

image

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings