replaysMike / Binner

Open source parts inventory system for makers, electronics hobby, and professional engineers
https://binner.io
GNU General Public License v3.0
268 stars 41 forks source link

Part scans in add bulk inventory but fails in single part scan #132

Closed TWM617 closed 1 year ago

TWM617 commented 1 year ago

When I scan to add a single part it fails 5 times in a row. I then scan the same part in bulk add and it succeeds 5 times in a row. Not sure why there is a difference. IMG_1339

replaysMike commented 1 year ago

indeed it should work in both - are you on the latest v2.3.1? I'll try it myself and see if I can repro it

TWM617 commented 1 year ago

Yep, 2.3.1.

replaysMike commented 1 year ago

I think I found the problem here. It seems sometimes it fails to decode the barcode, and sends the raw barcode string to the api which is incorrect. Should be able to fix this and include in today's release

TWM617 commented 1 year ago

This problem is not fixed.

The result of a scan in Part Invertory scan: Ashampoo_Snap_Wednesday, March 29, 2023_09h11m08s_006_

The result from a bulk scan: Ashampoo_Snap_Wednesday, March 29, 2023_09h12m08s_007_

replaysMike commented 1 year ago

Looking into this again today, I'm suspecting an MS Edge difference from Chrome, which would be weird as they are both based on Chromium. They keyboard handling is complex, but I did a bunch of work to make both use the same code but some of it relies on how the browser handles keyboard input. I'll let you know shortly

TWM617 commented 1 year ago

Given your reference to Chrome, I thought perhaps it was a short term workaround so I could get moving but I tried it and see the same error. Note that the end of the following error message (like the one in the capture I previously posted) are characters from the last thing I typed or copied which are appended to the error message which apparently was sent in the request message:

Ashampoo_Snap_Wednesday, March 29, 2023_11h44m23s_004_

replaysMike commented 1 year ago

I'm still retesting this one. I'm not sure if it's a difference of keyrate, or if there is a timing issue somewhere. It looks like somehow it's getting through the barcode input scanning module completely, and it's trying to search that as a part number. As if the text went right to the search input and didn't get filtered like its supposed to. Will keep plugging away at it

TWM617 commented 1 year ago

Since the scanner is acting as keyboard input, somehow you have to know how much of the input buffer is valid. Perhaps that mechanism is reading too much?

Tim


From: Michael Brown @.> Sent: Wednesday, March 29, 2023 6:07:58 PM To: replaysMike/Binner @.> Cc: TWM617 @.>; Author @.> Subject: Re: [replaysMike/Binner] Part scans in add bulk inventory but fails in single part scan (Issue #132)

I'm still retesting this one. I'm not sure if it's a difference of keyrate, or if there is a timing issue somewhere. It looks like somehow it's getting through the barcode input scanning module completely, and it's trying to search that as a part number. As if the text went right to the search input and didn't get filtered like its supposed to. Will keep plugging away at it

— Reply to this email directly, view it on GitHubhttps://github.com/replaysMike/Binner/issues/132#issuecomment-1489540866, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY2JAWJMKY2DV4UUVEGDQHLW6TMG5ANCNFSM6AAAAAAWFQ7B2U. You are receiving this because you authored the thread.Message ID: @.***>

replaysMike commented 1 year ago

This issue has been handed off to DigiKey support for the moment, there's something funny about this part label as there are extra GS & RS characters at the end that shouldn't be there. I'm going to try and make an update to prevent this from coming out this way, but it's failing to be translated by the DigiKey 2d barcode API.

replaysMike commented 1 year ago

@TWM617 can you reply to this message and scan that barcode on your end into the message? I don't know if it's just the way the message is displayed in that No part information banner, or if your scanner is outputting some of the characters a little different. I noticed the third character is a triangle '▲', when it should be a '>' character. This might be the cause of the funny output that I can't trigger over here - DigiKey api issue aside.

TWM617 commented 1 year ago

The part I don’t understand is that Bulk Inventory adds work flawlessly. Well anyway, here it is:

[)>▲06↔J2DA5B02E.F7714D73.93C6D152.7F652D6B5032↔PAZ1117EH-3.3TRG1DICT-ND↔1PAZ1117EH-3.3TRG1↔9D1719↔14Z170507↔1TH510592.U1↔4LCN↔11ZPREPACK↔15Z1.0.1↔12Z5001336↔Q000000001↔13Z000000↔▲

From: Michael Brown @.> Sent: Thursday, March 30, 2023 7:03 PM To: replaysMike/Binner @.> Cc: TWM617 @.>; Mention @.> Subject: Re: [replaysMike/Binner] Part scans in add bulk inventory but fails in single part scan (Issue #132)

@TWM617 https://github.com/TWM617 can you reply to this message and scan that barcode on your end into the message? I don't know if it's just the way the message is displayed in that No part information banner, or if your scanner is outputting some of the characters a little different. I noticed the third character is a triangle '▲', when it should be a '>' character. This might be the cause of the funny output that I can't trigger over here - DigiKey api issue aside.

— Reply to this email directly, view it on GitHub https://github.com/replaysMike/Binner/issues/132#issuecomment-1491184873 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2JAWPEJ6LSAPHH5H7Z2ZLW6Y3PBANCNFSM6AAAAAAWFQ7B2U . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AY2JAWKBKXTFI5FCOMKMTATW6Y3PBA5CNFSM6AAAAAAWFQ7B2WWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSY4GWOS.gif Message ID: @. @.> >

replaysMike commented 1 year ago

The part I don’t understand is that Bulk Inventory adds work flawlessly. Well anyway, here it is:

I don't understand it either. There are 2 code paths for the behavior, but they are almost entirely the same. Need to find a way to repro it on my end

TWM617 commented 1 year ago

I hate to say it but this problem still exists. Scans perfectly in bulk add scan but fails in single part add scan. The error message for single part scan is different now but the submit to Digikey still fails.

The scan error message returns this:

No part information is available for '[)▲06↔J2DA5B02E.F7714D73.93C6D152.7F652D6B5032↔PAZ1117EH-3.3TRG1DICT-ND↔1PAZ1117EH-3.3TRG1↔9D1719↔14Z170507↔1TH510592.U1↔4LCN↔11ZPREPACK↔15Z1.0.1↔12Z5001336↔Q000000001↔13Z000000↔▲'.

Barcode scanner test returns this:

{ "type": "datamatrix", "value": { "description": "AZ1117EH-3.3TRG1DICT-ND", "mfgPartNumber": "AZ1117EH-3.3TRG1", "countryOfOrigin": "CN", "pick": "PREPACK", "partId": "5001336", "quantity": 1, "loadId": "000000\u001eV\r" }, "correctedValue": "[)>\u001e06\u001dJ2DA5B02E.F7714D73.93C6D152.7F652D6B5032\u001dPAZ1117EH-3.3TRG1DICT-ND\u001d1PAZ1117EH-3.3TRG1\u001d9D1719\u001d14Z170507\u001d1TH510592.U1\u001d4LCN\u001d11ZPREPACK\u001d15Z1.0.1\u001d12Z5001336\u001dQ000000001\u001d13Z000000\u001eV\r", "rawValue": "[)>\u001e06\u001dJ2DA5B02E.F7714D73.93C6D152.7F652D6B5032\u001dPAZ1117EH-3.3TRG1DICT-ND\u001d1PAZ1117EH-3.3TRG1\u001d9D1719\u001d14Z170507\u001d1TH510592.U1\u001d4LCN\u001d11ZPREPACK\u001d15Z1.0.1\u001d12Z5001336\u001dQ000000001\u001d13Z000000\u001eV\r", "rsDetected": true, "gsDetected": true, "eotDetected": false, "invalidBarcodeDetected": false, "rawValueFormatted": "[)>␞06␝J2DA5B02E.F7714D73.93C6D152.7F652D6B5032␝PAZ1117EH-3.3TRG1DICT-ND␝1PAZ1117EH-3.3TRG1␝9D1719␝14Z170507␝1TH510592.U1␝4LCN␝11ZPREPACK␝15Z1.0.1␝12Z5001336␝Q000000001␝13Z000000␞V\r"

replaysMike commented 1 year ago

I'm not giving up on this issue. Interesting. This barcode wasn't detected as invalid even though it does on my barcode scanner. I see an extra RS character that's on the end, but it's missing the extra GS character shown on my barcode scanner. Will plug away at this again as the priority issue.

TWM617 commented 1 year ago

Maybe my scanner is the problem? It is a good one (not cheap, highly rated on Amazon). I could ask the support folks to fix something if I knew exactly what to ask for. They have been very responsive.

Tim


From: Michael Brown @.> Sent: Sunday, April 2, 2023 1:01:55 PM To: replaysMike/Binner @.> Cc: TWM617 @.>; Mention @.> Subject: Re: [replaysMike/Binner] Part scans in add bulk inventory but fails in single part scan (Issue #132)

I'm not giving up on this issue. Interesting. This barcode wasn't detected as invalid even though it does on my barcode scanner. I see an extra RS character that's on the end, but it's missing the extra GS character shown on my barcode scanner. Will plug away at this again as the priority issue.

— Reply to this email directly, view it on GitHubhttps://github.com/replaysMike/Binner/issues/132#issuecomment-1493427445, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY2JAWOLI2JKRIWBVSFKF4LW7HLLHANCNFSM6AAAAAAWFQ7B2U. You are receiving this because you were mentioned.Message ID: @.***>

replaysMike commented 1 year ago

I think even if that was the case, I should create support for making it work. There are so many barcode scanners out there that all have different default settings. I don’t know if other part labels from DigiKey have other bugs, but it should be possible for me to make it work. I’m going to plug away at some more fixes and try for a quick release maybe tomorrow.

On Sun, Apr 2, 2023 at 1:05 PM TWM617 @.***> wrote:

Maybe my scanner is the problem? It is a good one (not cheap, highly rated on Amazon). I could ask the support folks to fix something if I knew exactly what to ask for. They have been very responsive.

Tim


From: Michael Brown @.> Sent: Sunday, April 2, 2023 1:01:55 PM To: replaysMike/Binner @.> Cc: TWM617 @.>; Mention @.> Subject: Re: [replaysMike/Binner] Part scans in add bulk inventory but fails in single part scan (Issue #132)

I'm not giving up on this issue. Interesting. This barcode wasn't detected as invalid even though it does on my barcode scanner. I see an extra RS character that's on the end, but it's missing the extra GS character shown on my barcode scanner. Will plug away at this again as the priority issue.

— Reply to this email directly, view it on GitHub< https://github.com/replaysMike/Binner/issues/132#issuecomment-1493427445>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AY2JAWOLI2JKRIWBVSFKF4LW7HLLHANCNFSM6AAAAAAWFQ7B2U

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/replaysMike/Binner/issues/132#issuecomment-1493428388, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATJ54SWKW7X2YPQTQEZ673W7HLZVANCNFSM6AAAAAAWFQ7B2U . You are receiving this because you modified the open/close state.Message ID: @.***>

replaysMike commented 1 year ago

Hoping that v2.3.4 fixes this issue for good :)

TWM617 commented 1 year ago

Yep, that did it! Yay! And thanks for wrestling this to the ground.

Tim.

From: Michael Brown @.> Sent: Monday, April 3, 2023 5:53 PM To: replaysMike/Binner @.> Cc: TWM617 @.>; Mention @.> Subject: Re: [replaysMike/Binner] Part scans in add bulk inventory but fails in single part scan (Issue #132)

Hoping that v2.3.4 https://github.com/replaysMike/Binner/releases/tag/v2.3.4 fixes this issue for good :)

— Reply to this email directly, view it on GitHub https://github.com/replaysMike/Binner/issues/132#issuecomment-1495189173 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2JAWMNMQT2SXLXJ2BTTGLW7NWF5ANCNFSM6AAAAAAWFQ7B2U . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AY2JAWOXXK6X3QFI7TYUY5LW7NWF5A5CNFSM6AAAAAAWFQ7B2WWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSZD3DLK.gif Message ID: @. @.> >

replaysMike commented 1 year ago

No prob, glad we finally got it. If you run into any more problematic labels let me know. Going to scan in some mouser and arrow stuff this week, hopefully those are easy