Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.1 example doesn't work... #41

Open
Kujako opened this issue Sep 17, 2015 · 15 comments
Open

1.6.1 example doesn't work... #41

Kujako opened this issue Sep 17, 2015 · 15 comments

Comments

@Kujako
Copy link

Kujako commented Sep 17, 2015

Trying to review the changes in 1.6.1, however the Reader.html in the src folder fails to load, throwing various javascript errors. Main problem was that jQuery wasn't loaded, but after adding a call to it in the head I am still seeing....

"Uncaught ReferenceError: BarcodeReader is not defined" at line 45 in "barcode-reader.jquery.js"

I've tried a few things, but seem unable to diagnose the problem. Any assistance would be appreciated.

@seipekm
Copy link

seipekm commented Sep 27, 2015

i have the same problem

@modeverv
Copy link

modeverv commented Oct 1, 2015

I have the same problem...
https://4d68a3175137e650a3ee240c929c8bd26e8ef3db.googledrive.com/host/0B18k-I2MKH8PdXppRkRfVWdJT0k/job/
this page's example is work now(via iPhone)

@Kujako
Copy link
Author

Kujako commented Oct 1, 2015

The linked page appears to be the old "job.js" version and not the new 1.6.1 build, which uses "BarcodeReader.js" and "barcode-reaser.jquery.js".

@jkumawat
Copy link

jkumawat commented Dec 8, 2015

Can any one tell me what has to be done to work with current version 1.6.1 build? I have been trying to use this library in my project but there are always some problem which were already mentioned in above post.

  1. Jquery reference missing
  2. require() is undefined.
  3. "Uncaught ReferenceError: BarcodeReader is not defined" at line 45 in "barcode-reader.jquery.js"

@Kujako : Can you please suggest me what can be the proabable solution?

like .

@Kujako
Copy link
Author

Kujako commented Dec 8, 2015

@jkumawat Sorry, wasn't able to find a work around. Waiting for another update before I return to this project.

@EddieLa EddieLa mentioned this issue Dec 12, 2015
@bastienjalbert
Copy link

bastienjalbert commented Apr 21, 2016

I have got these errors too ...

@nmovazquez
Copy link

nmovazquez commented May 10, 2016

i Trying to replay this example
https://4d68a3175137e650a3ee240c929c8bd26e8ef3db.googledrive.com/host/0B18k-I2MKH8PdXppRkRfVWdJT0k/job/
but still have the problem, could you help me please.
the problem its the same that the first
after uploading the image does nothing
@modeverv

@tsalufe
Copy link

tsalufe commented Oct 12, 2016

This what I did to work around jquery/require/uncaughtReference by tweaking plugin js:

  1. remove the two require() in BarcodeReader, instead, add script tag with src pointing to the two js files: exif.js, DecoderWorker.js.
  2. in exif.js, remove var before "root = this" to make root global. Otherwise, root is undefined.

I tried to define require() before loading BarcodeReader.js but because exif.js is loaded async, BarcodeReader still complains root is undefined.
Though it is NOT a good practice to tweak plugin code, it is worth doing that in my case because this js BarcodeReader seems better than QuaggaJS(https://serratus.github.io/quaggaJS/) with low quality image from my testing (except that I have align barcode horizontally which is fine for us so far). Hope this helps.

@CDIDEV
Copy link

CDIDEV commented Aug 25, 2017

@tsalufe like this?

// var EXIF = require('./exif');
// var decoderWorkerBlobString = require('./DecoderWorker');

<script src="exif.js"></script>
<script src="js/DecoderWorker.js"></script>
        

var BarcodeReader = {
.
.
.
}

@tsalufe
Copy link

tsalufe commented Aug 27, 2017

@CDIDEV Correct but BarcodeReader is a class already defined in BarcodeReader.js. You just need to load BarcodeReader.js. See src/Reader.html.

// var EXIF = require('./exif');
// var decoderWorkerBlobString = require('./DecoderWorker');

<script src="exif.js"></script>
<script src="js/DecoderWorker.js"></script>
<script src="js/BarcodeReader.js"></script>

@dhana6795
Copy link

@tsalufe can u tell me how you aligned the image whether you changed any settings or camera position for me sometimes this detecting the barcode and some times its not working can u help me

@tsalufe
Copy link

tsalufe commented May 21, 2018

@dhana6795 I normally align it horizontally. Move your camera closer or only process cropped barcode out of large image might help.

@dhana6795
Copy link

@tsalufe thank you..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants