chgatla-microsoft / QRTracking

MRTK sample app for QRtracking
MIT License
74 stars 69 forks source link

Data in QR-Code truncated #20

Closed Xan2063 closed 2 years ago

Xan2063 commented 3 years ago

sampleCode Hi everyone,

we have an issue that for some qr-codes the string in QRCode.Data is truncated, the same data displays perfectly fine if read from a smartphone. On Hololens however approximately 1 out of 10 QR-Codes is only read partially. We use MongoDB-Object IDs as Data, which basically are 24 digit hex numbers, we also tried encoding these as base64, but we have the same issue with that, just on different codes.

We use https://github.com/cordobo/angularx-qrcode#readme for creating the qr codes.

In the sample qr code, the text should be NWQ5YzhiMzc1OWYzOTAwMDEzMGQ5NT but is truncated to NWQ5YzhiMzc1OWYzOTAwMDEz

Thanks Alex

p.s. I saw you released a new version of the nuget package yesterday, but couldn't find any release notes to find out whether there was a fix for this.

p.p.s new version doesn't change anything

p.p.p.s I think the problem is in the base library and not in this sample project, I tried finding someone on hololens slack, but no one answered. Is there a another way for reporting issues for this library

Xan2063 commented 3 years ago

Seems to be a problem while reading a QR-Code containing different types of segments (numeric, alphanumeric and byte). If I force the generation to use only one segment with byte encoding or use a capitalized string, so it is treated as alphanumeric, then everything works fine.

chgatla-microsoft commented 3 years ago

@Xan2063 can you point me to the generator if this is some public lib so I can repro the issue in the the hololens lib and see what I find.

Xan2063 commented 3 years ago

I am using this package for angular: https://www.npmjs.com/package/angularx-qrcode Internally this package is used: https://github.com/soldair/node-qrcode

chgatla-microsoft commented 3 years ago

@Xan2063 thanks for the info, The underlying QR lib has this bug where if multiple segments are used then the string adds spurious null terminator after "Bytes" mode and thus the data terminates after the first "bytes" segment. This bug is fixed now and will be published in the next version of the Nuget API.

TimoFalcke commented 3 years ago

Hi @chgatla-microsoft , I'm also having issues with the truncated QR codes. Do you know when the fixed API will be available? I just installed the Microsoft.MixedReality.QR 0.5.2103 and Microsoft.VCRTForwarders.140 1.0.7 packages and the issue persists

chgatla-microsoft commented 2 years ago

this is already resolved in newwer plugin versions. You can try the latest 0.5.3019