-
Notifications
You must be signed in to change notification settings - Fork 128
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
crashes on Linux #57
Comments
More details would certainly be helpful. The problem does seem to be with the QRCoder library instead, though. But maybe it's just a matter of targeting? Which version of .NET are you targeting? |
Might be related to codebude/QRCoder#227 |
I'm targeting .net core 3.1, and stack trace shows that error is at QRCoder namespace (as you noted in your previous post) |
I did a quick test on Ubuntu 18.04 and when |
@flytzen I have the 2.1 release drafted. Are we good to publish that and push to nuget? |
@ahwm yes, I believe so. I think we need @BrandonPotter to approve it? |
Yeah, that happen in Azure. I'll go ahead and publish, then, and then once it's approved in Azure it will go to nuget. |
The "publish" happens automatically when we merge to master - it's sat there waiting for @BrandonPotter already :) |
ps if you want to comm more directly, find me on @flytzen on twitter |
I'm using very bare Arch Linux installation. I've also did following test to see if image can be generated on linux, and it works on my machine too: var bmp = new Bitmap(100, 100);
var graphics = Graphics.FromImage(bmp);
graphics.DrawEllipse(Pens.Blue, new Rectangle(10, 10, 80, 80));
bmp.Save("test.bmp"); So it seems that I've also checked other dependencies they've mentioned ( `apt-utils libc6-dev' ), but I could not find them in my distro. But anyway, since my example is working (I can open saved bitmap) the problem might be somewhere else. |
Just one thought - what value are you passing for the |
@flytzen - not sure if question was to me, but I've tried to use var qrGenerator = new QRCodeGenerator();
var payloadGenerator = new PayloadGenerator.Url("https://github.com/codebude/QRCoder/");
var qrCodeData = qrGenerator.CreateQrCode(payloadGenerator, QRCodeGenerator.ECCLevel.Q);
var pngQrCode = new PngByteQRCode(qrCodeData);
var qrBytes = pngQrCode.GetGraphic(10);
File.WriteAllBytes("qr.png", qrBytes);
var base64QrCode= new Base64QRCode(qrCodeData);
var qrString = base64QrCode.GetGraphic(10);
File.WriteAllText("qr.html",
$"<html><body><img src=\"data:image/png;base64,{qrString}\" alt=\"qr\"/></body></html>"); as you see, I've tried to generate qr code as PNG and as base64 (which, I assume, you're using in your library. But this code works and I can open both png and generated html, and scanning from phone also works. So my earlier assumption that problem was in |
@martynas-m Sorry, yes, the question was indeed to you :) |
Hi, So when I've chose to use some reasonable value like 10, it stopped crashing and works fine. Maybe you could make error handling a bit better or just update documentation :) Thanks for your help, and sorry for false alarm. |
Thank you @martynas-m. This is the second time we have seen this so we definitely need to improve this with both docs and error handling. Thank you for raising it. |
Need to:
|
That documentation @martynas-m linked to is a mirror of an old blog post for how to use the 1.x version that used the Google Charts API. Unfortunately, we don't have direct access. But the link was provided in #21 so it may be possible to reach out and get that updated. I think it would be better to indicate in the readme that it's for 1.x and doesn't apply to 2.x. |
In another branch I just specified that it was for 1.x: 2880416 And working on the intellisense update. |
@BrandonPotter any chance of approving at least the latest nuget package? |
while trying to generate qr code following crash occurs:
not very helpful exception, maybe you need some more details?
The text was updated successfully, but these errors were encountered: