# QR decode shows error

**URL:** <https://discourse.nodered.org/t/qr-decode-shows-error/41094>\
**Category:** General\
**Created:** [16 February 2021 15:09 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094 "2021-02-16T15:09:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)\
**Post date:** [16 February 2021 15:09 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/1 "2021-02-16T15:09:24Z")

</div>

I have attached the usb camera with my computer and I am using "usbcamera" and "qrdecoder.  
but I got error in payload massage as shown in the below picture.

 ![error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/6/e6ae8baabaf5d54a43f756a0eed784741d341a23.jpeg)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 February 2021 17:20 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/2 "2021-02-16T17:20:05Z")

</div>

Well first off, name your debug nodes so you can tell which message goes with witch node. Next change the `debug nodes to display the complete msg object. That could give you more information to figure this out.

Also, what format is the data coming from the camera node and what type of data I’d the qrdecode looking for?

---

<div class="post-metadata">

**Author:** ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)\
**Post date:** [17 February 2021 10:33 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/3 "2021-02-17T10:33:53Z")

</div>

Now I got the following information

 ![error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/f/4fc529b65083f0883f4cf1a50246b93a71df18ee.jpeg)  
Below picture shows the setting of "usbcamera".  
 ![camera](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/1/310e019cba4f7de392ef0014c9a93a3b14454932.jpeg)

And in QR, I have a web link.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 February 2021 10:42 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/4 "2021-02-17T10:42:05Z")

</div>

I've not used that camera node - but you probably don't want "file mode" - what are the other options ? (You probably need it to just send the complete image to the qr decode node - not just save it to a file and send the file name)

---

<div class="post-metadata">

**Author:** ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)\
**Post date:** [17 February 2021 15:08 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/5 "2021-02-17T15:08:16Z")

</div>

The following option are there

 ![option](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/72442f5d05e53fdc29ca9c8fd899294736e616be.jpeg)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 February 2021 17:07 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/6 "2021-02-17T17:07:46Z")

</div>

And what is the qrdecoder looking for as input?

if you look at the readme, it wants the absolute parh to the image file. Have you defined that?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 February 2021 17:55 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/7 "2021-02-17T17:55:30Z")

</div>

I just looked at this and dug in a bit. I would not be confident in it:

1. The node hasn't been updated since Oct 30, 2019
2. there is no documentation
3. in my test, it returned an error that is meanless

It looks like you do have to pass in a single buffer of the image. So you would have to change the `camerausb` node to pass on a buffer. You can try that and see if it will woork.

---

<div class="post-metadata">

**Author:** ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)\
**Post date:** [18 February 2021 12:54 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/8 "2021-02-18T12:54:01Z")

</div>

I have tried the buffer in "usbcamera" but still I got error.  
I am trying to decode QC code of a weblink.  
Form "usbcamera" I got the image in ".jpg" format. but I am getting error in "qrdecoder" node.  
Is the any other solution to decode the QR code in Node-Red.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 February 2021 13:13 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/9 "2021-02-18T13:13:12Z")

</div>

> [@usmanEmder](#):
>
> Is the any other solution to decode the QR code in Node-Red.

Well you could try contacting the node's author look for something in node.js that would work and then create a node for it or you could add it into your flow in a `function` node or maybe run it with an `exec` node.

Try some google searches and you might find something

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [19 April 2021 13:13 UTC](https://discourse.nodered.org/t/qr-decode-shows-error/41094/10 "2021-04-19T13:13:28Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
