Describe the bug
When I run Project be used ZXingScannerModule, I got this error.
I did try with new project Angular6.1.0 and IE11 on windows.
I also got this problem when try with IE on Android 5.1 Lollipop and Apk run on this android.
When I remove ZXingScannerModule out of module, It is running well but I can't use scan barcode feature! 馃崱
It has resolved or new?
ngx-scanner 1.2.0
library0.7.0@dev
Kind regards,
[email protected]
I found it at @GlobalHistogramBinarizer
private static LUMINANCE_BITS = 5;
private static LUMINANCE_SHIFT = 8 - GlobalHistogramBinarizer.LUMINANCE_BITS;
private static LUMINANCE_BUCKETS = 1 << GlobalHistogramBinarizer.LUMINANCE_BITS;
private static EMPTY = Uint8ClampedArray.from([0]);
From @xzing-scanner/library
Sorry, I didn't understand very well what you're saying. But can you try to delete de node_modules folder and package.lock or yarn.lock file and install our modules again? Strange errors use to happen when npm handles upgrades with a lot of changes.
I try to run with new project but look like ZXingmodule still not access any devices (camera).
However it is running well on chome and firefox latest version.
Iam just testing it. If you would not support for this old browsers, dismiss that.
We have to include some polyfill for old ones, are you including them?
Sure, All them are included.
But what they help are access camera-scanner page, the ZXing-scanner still not get the authorized from camera.
*For IE11
I didn't tested IE for a while, so I can't say much here. But the method from probably is not available because IE doesn't supports Uint8ClampedArray, so you gonna need some extra core-js polyfill, be sure you included everything you need.
If we don't get any follow up here, I'll close the issue. Thanks.
I has included "core-js/es7/index' and 'core-js/es6/index'; " into polyfill. but it still not working for me.
Any suggestion?
As in the polyfills.ts file:
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
I have the same issue with IE 11 - Angular 6.
Here is my polyfill.ts:
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
/**
* Required to support Web Animations `@angular/animation`.
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
Thanks for @thanhphuocdang 's information.
After searching for polyfills for Uint8ClampedArray.from, I have found core-js/es6/typed.
Using: import 'core-js/es6/typed' in polyfill.ts has resolved the problem.
Thanks @redplane , as it was just a missing polyfill, I'm closing. :)
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.
Most helpful comment
Thanks for @thanhphuocdang 's information.
After searching for polyfills for
Uint8ClampedArray.from, I have foundcore-js/es6/typed.Using:
import 'core-js/es6/typed'inpolyfill.tshas resolved the problem.