element-hq / element-ios

A glossy Matrix collaboration client for iOS
https://element.io
Apache License 2.0
1.72k stars 479 forks source link

QR Code validation fails when trying to validate a device #7680

Closed fnwtv closed 9 months ago

fnwtv commented 9 months ago

Steps to reproduce

When trying to validate a device with QR Code using the iPhone camera, I can see the alert "QR code has been successfully validated" but in the logs I see "Failed scanning QR code" without further explanation. The other device with the already validated device is an android phone.

I've tried to debug and it seems like coming from MXQRCodeTransactionV2.swift in the SDK:

https://github.com/matrix-org/matrix-ios-sdk/blob/8bf871104ef1120135e142cc7cd43701668ac023/MatrixSDK/Crypto/Verification/Transactions/QRCode/MXQRCodeTransactionV2.swift#L108

Looking further I found that in MatrixSDKCrypto.swift, it seems like rustCall in scanQrCode is returning nil , even if the data passed is not nil. From there I can't really understand why it's happening.

Outcome

What did you expect?

QR Code to be really validated

What happened instead?

QR Code is said validated to the user, but in the logs it's not. And the validation process fails

Your phone model

iPhone 14 Pro Max

Operating system version

iOS 16.6

Application version

1.10.14

Homeserver

Synapse

Will you send logs?

No

fnwtv commented 9 months ago

Issue is solved in the newest version of the app. Thanks