Closed deanfourie1 closed 10 months ago
Hi,
Does it fail regardless of the qr code size? Is your QR code decoded using this demo page? https://vue-qrcode-reader.netlify.app/demos/CustomTracking.html
Sorry just to be clear,
The camera does not even launch, which means it does not even allow me the opportunity to scan the QR code. A round circle just keeps spinning.
Thanks
Ok thx for the clarification.
Do you see any error in the console tab of your browser dev tools? (F12) Please also ensure you have grant permission to use your camera. In this case 2FAuth should display a message but maybe something fails with the camera state detection.
Yea I get no prompt to use the camera.
I thought of this too, on my phone I granted full access to the camera in my settings.
The following appears in my browser dev tools as an error only upon clicking add new code which the calls the camera.
app-7741c0f3.js:1 TypeError: Cannot read properties of undefined (reading 'enumerateDevices')
at Capture-58b2ebb9.js:5:32087
at app-7741c0f3.js:1:25098
at Zt (app-7741c0f3.js:1:14643)
at lt (app-7741c0f3.js:1:14722)
at Gs.t.__weh.t.__weh (app-7741c0f3.js:1:24978)
at Wc (app-7741c0f3.js:1:16015)
at qc (app-7741c0f3.js:1:16322)
pp @ app-7741c0f3.js:1
Ws @ app-7741c0f3.js:1
(anonymous) @ app-7741c0f3.js:1
Promise.catch (async)
lt @ app-7741c0f3.js:1
Gs.t.__weh.t.__weh @ app-7741c0f3.js:1
Wc @ app-7741c0f3.js:1
qc @ app-7741c0f3.js:1
Promise.then (async)
Kc @ app-7741c0f3.js:1
gp @ app-7741c0f3.js:1
kp @ app-7741c0f3.js:1
b @ app-7741c0f3.js:1
Oo @ app-7741c0f3.js:1
Ua @ app-7741c0f3.js:1
Ii @ app-7741c0f3.js:1
(anonymous) @ app-7741c0f3.js:1
Oo @ app-7741c0f3.js:1
Ua @ app-7741c0f3.js:1
Ii @ app-7741c0f3.js:1
(anonymous) @ app-7741c0f3.js:1
Oo @ app-7741c0f3.js:1
Ua @ app-7741c0f3.js:1
Ii @ app-7741c0f3.js:1
set value @ app-7741c0f3.js:1
N @ app-7741c0f3.js:5
(anonymous) @ app-7741c0f3.js:5
Promise.then (async)
q @ app-7741c0f3.js:5
x @ app-7741c0f3.js:5
i @ Accounts-156f28da.js:1
Zt @ app-7741c0f3.js:1
lt @ app-7741c0f3.js:1
n @ app-7741c0f3.js:1
Any update on this? This is a great tool however its kind of rendered it useless for me :(
Lots of (pro) work these days, sorry for that. But great news, I get it. There are two problems actually.
First, I think you're trying to use the camera while your 2FAuth instance is not on a secure connection. HTTPS is required for the mediaDevices API to work (see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices#security_requirements)
Next, your use case is not correctly handled by 2FAuth, the error is not caught and nothing is pushed to the user. Actually, 2FAuth freezes on the loader even with HTTPS when no camera are available.
I'm going to push a fix ππ»
Lots of (pro) work these days, sorry for that. But great news, I get it. There are two problems actually.
First, I think you're trying to use the camera while your 2FAuth instance is not on a secure connection. HTTPS is required for the mediaDevices API to work (see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices#security_requirements)
Next, your use case is not correctly handled by 2FAuth, the error is not caught and nothing is pushed to the user. Actually, 2FAuth freezes on the loader even with HTTPS when no camera are available.
I'm going to push a fix ππ»
Excellent, thank you so much!
Version
5.0.2
Details & Steps to reproduce
Install via Docker or compose and attempt to add 2FA vis scan.
Expectation
Camera to launch and allow scanning a 2FA code.
Tested in multiple browsers and on mobile devices.
Error & Logs
Execution environment
No response
Containerization
Additional information
No response