question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid asm.js: Unexpected token. (In skeletonize.js)

See original GitHub issue

When I am using the latest (1.6.0) version of Quagga2, I am getting a Invalid asm.js: Unexpected token warning when starting Quagga.

The error seems to occur in skeletonize line 14, inImagePtr |= 0;, at least thats what Chrome is telling me.

The parsing part of Quagga works, though, and I can scan barcodes just fine, what doesn’t work is using the onProcessed function to draw bounding boxes around the barcodes, as is done in the example.

I tried using the same version of quagga as the example does, and it works as expected, no asm.js errors, so I kept on downgrading, and when I came to v1.1.0 the functionality started working again.

Furthermore, using the latest version and logging the result variable from onProcessed just gives me an empty array instead of the expcted result object.

Running in Chrome 100.0.4896.127

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
FlyveHestcommented, Apr 29, 2022

Settings are the default settings in the live_w_locator.html page, I didn’t change anything other than the version of the quagga library.

Barcode image attached below.

image

0reactions
ericbladecommented, Sep 8, 2022

so… on this particular barcode, i’m only able to actually decode it after i doctor the image by converting it to grayscale first, and then feeding these settings

image

it looks like it works. i’m not seeing issues with onProcessed … unless i just don’t understand the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning Chrome : Invalid asm.js: Unexpected token #5616
I've compiled multiple sources without rewriting this warning, but in my file, Chrome returns a warning, everything works anyway OK in ...
Read more >
Invalid asm.js: Unexpected token in react build app
After build react app I'm getting warnings in chrome: Invalid asm.js: Unexpected token. and firefox: asm.js type error: Disabled by debugger.
Read more >
6881 - Warning Chrome : Invalid asm.js: Unexpected token - v8
Issue 6881: Warning Chrome : Invalid asm.js: Unexpected token ; Status: Assigned (was: Untriaged) ; Owner: mstarzinger@chromium.org ; Labels: ...
Read more >
QuaggaJS - Building a barcode-scanner for the Web
In order to get a reference to the correct data block, the variables (ending with Ptr ) are pointing to that exact position....
Read more >
aurelia/Discuss - Gitter
Most likely it will be a binary form of asm.js, more or less. Whether or not JS or the DOM will be ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found