schmich/instascan

instascan.min.js:formatted:23167 Invalid asm.js: Type mismatch in assignment

EAWF opened this issue · 4 comments

EAWF commented

Platform: Win7-64, Chrome: Version 84.0.4147.105 (Official Build) (64-bit)
Instascan min source: https://rawgit.com/schmich/instascan-builds/master/instascan.min.js

When using:

<title>Instascan</title> <script type="text/javascript" src="instascan.min.js"></script> <script type="text/javascript"> let scanner = new Instascan.Scanner({ video: document.getElementById('preview') }); scanner.addListener('scan', function (content) { console.log(content); }); Instascan.Camera.getCameras().then(function (cameras) { if (cameras.length > 0) { scanner.start(cameras[0]); } else { console.error('No cameras found.'); } }).catch(function (e) { console.error(e); }); </script>

Console Log:
instascan.min.js:formatted:23167 Invalid asm.js: Type mismatch in assignment
instascan.min.js:formatted:15507 Uncaught (in promise) Error: Cannot access video stream (OverconstrainedError).
at new i (instascan.min.js:formatted:15507)
at Function. (instascan.min.js:formatted:15701)
at n (instascan.min.js:formatted:7209)
at Generator._invoke (instascan.min.js:formatted:7289)
at Generator.e. [as throw] (instascan.min.js:formatted:7224)
at n (instascan.min.js:formatted:7209)
at r (instascan.min.js:formatted:7230)
at instascan.min.js:formatted:7237

I had the same issue . did that get resolved?

Same here ATM - i'm working on a project which is getting an upgrade while the live version for this is working, but not the local one..
The whole thing needs a secure connection - eventually the issue is the local certificate or something in that directory of issue

I had the same issue.

Just change the protocol to https:// rather than HTTP: and it will work