instascan icon indicating copy to clipboard operation
instascan copied to clipboard

Issue running demo on Chrome locally

Open bcwik9 opened this issue 6 years ago • 14 comments

I downloaded the demo HTML along with the instascan.min.js file, and opened the webpage in Chrome. It asks for permissions for my webcam, but then nothing happens. Im getting this error in the console:

Invalid asm.js: instascan.min.js:18
Type mismatch in assignment: test.html:1 

Im running locally just to test functionality without having to use HTTPS. Is anyone else able to do this?

bcwik9 avatar Nov 15 '17 03:11 bcwik9

I also tried https://github.com/dwa012/html5-qrcode and experienced the same issue.

Oddly enough, the demo page works for instascan when I go to https://schmich.github.io/instascan/.

bcwik9 avatar Nov 15 '17 03:11 bcwik9

Ditto - I have this same problem as well.

iamunknown2 avatar Nov 27 '17 12:11 iamunknown2

I was never able to solve the issue. However I did get it working using a self signed SSL cert. Definitely not the same as testing locally without a cert at all, but it at least is a temporary workaround.

bcwik9 avatar Nov 27 '17 15:11 bcwik9

I had no problem running a simple http server in the local folder:

$ cd path/to/folder/
$ python3 -m http.server 300

Go to http://localhost:3000

leplatrem avatar Dec 01 '17 16:12 leplatrem

Copied the one from the demo site, and it worked.

dhcmega avatar Dec 01 '17 17:12 dhcmega

Same problem here, also causes CPU 100%

stepri avatar Jun 27 '18 19:06 stepri

Same problem :/

youneskasri avatar Jun 29 '18 23:06 youneskasri

Same. I have a self-signed certificate, if that's relevant -- and have a root CA trusted by my mac's security settings. Instascan will detect a QR code perfectly fine, but the video preview does not work.

husani avatar Jul 06 '18 00:07 husani

I think this was a uglifyJS issue, building instascan.min.js new with gulp release seems to fix this.

chris-gunawardena avatar Nov 17 '18 15:11 chris-gunawardena

I have the same issue along with an Uncaught OverconstrainedError in a Promise. I'm running 1.0.0 minified which I downloaded from this repo, and I'm running the demo HTML page. I am using a self-signed certificate and connecting via HTTPS. Any insights? TIA

cxa-croper avatar Jul 29 '20 21:07 cxa-croper

same problem on chrome

exqlnet avatar Mar 09 '21 18:03 exqlnet

same issue here

myusufid avatar Apr 25 '21 01:04 myusufid

Just add these javascript in this order and you'll get it running

Ferdanielhg avatar May 17 '21 17:05 Ferdanielhg

Same issue here. Downloading the js from the example fixed the problem.

mrfrasier avatar Apr 30 '23 15:04 mrfrasier