yubioath-flutter icon indicating copy to clipboard operation
yubioath-flutter copied to clipboard

Scanning QR code stopped working on Mac

Open ghost opened this issue 5 years ago • 21 comments

  • Yubico Authenticator version: 5.1.2
  • Operating system and version: Mac 10.15.1
  • YubiKey model and version:
  • Bug description summary:

Can't scan QR code like I used to before 10.15 & 5.1.2

Steps to reproduce

  1. Scan QR code

Expected result

QR code scanned

Actual results

QR code not scanned

Other info

I would like to scan QR codes so I can use my device again.

ghost avatar Dec 29 '19 18:12 ghost

Thanks for the report.

Can you please double check what version of Yubico Authenticator you are using? The latest should be 5.0.1.

Could you also please check if Yubico Authenticator has access to Input Monitoring? This is new in MacOS Catalina. You can find it in "System Preferences" > "Security & Privacy" > "Privacy" > "Input Monitoring"

fdennis avatar Dec 30 '19 08:12 fdennis

Oh sorry, that was firmware version. It's 5.0.1.

And yeah, my Yubico Authenticator requested that permission, I went there to checkbox it, and then restarted the app.

ghost avatar Dec 30 '19 13:12 ghost

Did it work after restarting or do you still have the same problem?

fdennis avatar Dec 30 '19 13:12 fdennis

Problem still persists.

ghost avatar Dec 30 '19 13:12 ghost

Could you run the application from a terminal with the --log-level DEBUG commandline option, try the QR scanner, and post the output here?

emlun avatar Jan 07 '20 14:01 emlun

I'm having the same problem. I'm happy to run from the terminal if you provide the command.

AdrianMF avatar Jan 13 '20 22:01 AdrianMF

It would be nice if there was an image import as a backup

AdrianMF avatar Jan 13 '20 22:01 AdrianMF

Please verify that in Catalina you have the Screen Recording permission set for Yubico Authenticator (System Preferences -> Security & Privacy -> Privacy -> Screen Recording). Additional required settings will also be in Input Monitoring.

I'm running 10.15.2, if I disable the checkbox in Screen Recording it prevents me from scanning QR codes, if I check it - it works. I don't even need to restart the app.

image

Image import is something we have talked about and might look into in the future. Thanks!

braathen avatar Jan 15 '20 12:01 braathen

Scanning doesn't work for me either. I'm on MacOS 10.15.4, is there anything I can do to help get this fixed? I have permissions setup like the comment above this. I'm running on version 5.03 and whenever I put a qr code on the screen I get a message saying: Failed to read credential from QR code.

Note that the qr code contains an otpauth url in my case, I'm not sure if that's supported because of #321, however just putting the secret in the QR code doesn't seem to work either. What exactly does the Yubico authenticator expect when it scans a QR code?

ghost avatar Apr 28 '20 14:04 ghost

@wade41 A standard otpauth url should work, following the format described here. The issue you linked is about handling those links directly, not when parsed from QR code.

Could you give us any more info about the QR code so we can look into it? Maybe name the service, or post the string in the QR code with the secret removed.

dagheyman avatar Apr 29 '20 07:04 dagheyman

It's from a project I'm working on. Utilizing ttps://github.com/endroid/qr-code to generate the QR code and https://github.com/Spomky-Labs/otphp to generate the provisioning uri.

Here's the otpauth url:

otpauth://totp/admin.Application%3Asam%40u-lab.nl?issuer=admin.Application&secret=

ghost avatar Apr 29 '20 07:04 ghost

uri looks fine, I'm able to add it with ykman:

$ ykman oath uri "otpauth://totp/admin.Application%3Asam%40u-lab.nl?issuer=admin.Application&secret=abba"
$ ykman oath code
admin.Application:[email protected]  742944

Do you have an example QR code picture as well?

dagheyman avatar Apr 29 '20 08:04 dagheyman

Sure thing, here you go. I shortened the secret bit in this to abba like your comment.

qrcode

ghost avatar Apr 29 '20 08:04 ghost

I am on MacOS Big Sur, and this still doesn't work. I have all permissions set properly. Please let me know anything I can do to help troubleshoot the issue.

apastuszak avatar Feb 20 '21 13:02 apastuszak

just bought a new Yubikey, just ran into this issue when trying to setup with https://www.docusign.com/. here is the output from /Applications/Yubico\ Authenticator.app/Contents/MacOS/yubioath-desktop --log-level DEBUG

2021-03-03T21:11:36+0100 ERROR [yubikey.parse_qr:558] Failed to parse uri
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 556, in parse_qr
    CredentialData.from_uri(qrdecode.decode_qr_data(qr))))
  File "/Applications/Yubico Authenticator.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ykman/oath.py", line 124, in from_uri
    raise ValueError('Invalid URI scheme')
ValueError: Invalid URI scheme
2021-03-03T21:11:40+0100 ERROR [yubikey.parse_qr:558] Failed to parse uri
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 556, in parse_qr
    CredentialData.from_uri(qrdecode.decode_qr_data(qr))))
  File "/Applications/Yubico Authenticator.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/ykman/oath.py", line 124, in from_uri
    raise ValueError('Invalid URI scheme')
ValueError: Invalid URI scheme

MacOS 10.15.7 Authenticator 5.0.4

abendt avatar Mar 03 '21 20:03 abendt

Same issue, MacOS 12.2.1 and authenticator 5.1.0

2022-03-31T09:11:51-0400 ERROR [yubikey.parse_qr:925] Failed to parse uri
Traceback (most recent call last):
  File "qrc:///py/yubikey.py", line 923, in parse_qr
    CredentialData.parse_uri(data)))
  File "/Applications/Yubico Authenticator.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/yubikit/oath.py", line 110, in parse_uri
    raise ValueError("Invalid URI scheme")
ValueError: Invalid URI scheme

The app only requested screen recording, but I granted it input monitoring as well. No change with both.

vosscodes avatar Mar 31 '22 13:03 vosscodes

@vosscodes Can it scan some qr codes or do you run into the same issue with every single qr code?

fdennis avatar Apr 12 '22 14:04 fdennis

Had an issue but once I added:

Screen Recording permission set for Yubico Authenticator (System Preferences -> Security & Privacy -> Privacy -> Screen Recording). Additional required settings will also be in Input Monitoring.

Running Monterey 12.3.1 Yubico Authenticator v5.1.0

bergerj avatar Apr 15 '22 15:04 bergerj

@vosscodes Can it scan some qr codes or do you run into the same issue with every single qr code?

sorry for the delay - not sure how I missed this. I only attempted two sources (several times with regenerated codes), but no luck with either. Unfortunately this was a corporate device that I no longer have, so I can't attempt again or get any more details.

vosscodes avatar May 23 '22 17:05 vosscodes

I also have this issue. Both Screen Recording and Input Monitoring permissions have been gived to Yubico Authenticator v5.1.0. I am running macOS 12.5.1

ruario avatar Oct 03 '22 20:10 ruario

FWIW I have a QR code scanning app "QR Capture v2.5.6 (43) by Marek Hrušovský" (from the App Store), which also uses Screen Recording permissions to read QR codes on screen. It can scan these no problem. Indeed this is how I am now getting the details across and into Yubico Authenticator on sites that do not give me a way to copy the raw secret.

I mention this to point out it is not some new limitation in recent macOS. This is possible, it is just that Yubico Authenticator v5.1.0 fails due to some bug.

ruario avatar Oct 03 '22 21:10 ruario

@ruario We are working on a newer version of the app. If you have the time you can try out the beta here https://www.yubico.com/products/yubico-authenticator/yubico-authenticator-desktop-beta/ . It would be interesting for us to know if this works better or not. Please keep in mind that this is a beta version. Thanks!

fdennis avatar Oct 13 '22 08:10 fdennis

Yubico Authenticator 6.0 has now been released and uses a new codebase. As such, this issue has been marked with the legacy label, and will be automatically closed in 7 days. If this issue is still relevant to Yubico Authenticator 6, please comment on the issue saying so, and it will be kept open (or be re-opened). Sorry for the inconvenience!

dainnilsson avatar Nov 16 '22 10:11 dainnilsson