Concordium / concordium-reference-wallet-ios

Reference wallet for the Concordium blockchain
Apache License 2.0
11 stars 10 forks source link

Black camera view after denying permission #24

Closed Bargsteen closed 3 years ago

Bargsteen commented 3 years ago

Bug Description A completely black camera view is shown when you deny the request to use the camera. The app should check whether the camera is enabled and never show the black camera view. NB: Users can manually enable the camera permissions in Settings > Concordium

Steps to Reproduce

  1. Install the wallet
  2. When creating an identity, the app will ask for permission to use the camera: click 'Don't allow'
  3. Try to take a photo of your id document

Expected Result The app will tell you that it is not possible to create an identity without the use of a camera and prompt you for permissions again.

Actual Result The camera opens up, but everything is black:

Versions

jens-concordium commented 3 years ago

@kristiyandobrev, @concordium-cl

Findings from testing: The fix was to ask the user for permission to use the camera at the beginning of the identity creation flow, and simply block them from continuing if they didn't allow camera access. However, the app will just crash if access to the camera is denied.

kristiyandobrev commented 3 years ago

@jens-concordium

Aren't you getting this message if the camera access is denied ?

IMG_4A08C57FBBE2-1

jens-concordium commented 3 years ago

@kristiyandobrev, when I press deny the app crashes. When I then re-open the app and get to this point in the flow, the dialog is shown as intended.

jens-concordium commented 3 years ago

@kristiyandobrev, @concordium-cl

I still get an unwanted pending account in v1.0(17), if

  1. I deny the camera access
  2. use the deeplink to go Settings
  3. and allow the camera, and then go

It looks like this:

https://user-images.githubusercontent.com/76045015/134358783-b6e7a9e9-dbeb-4937-8f5f-b8f0f1a67ab7.mov

concordium-cl commented 3 years ago

Could not reproduce the above scenarios.

However, the app is still not robust enough in this context. After few minutes of exploratory testing, I've ended in a very similar scenario as Jens showed above, which is reproducible and eventually crashes the app:

Version: 1.0.18 iOS 14.7.1 iPhone 11

kristiyandobrev commented 3 years ago

@concordium-cl I see. Although #61 is potentially fixing this. Should we revise it once the PR is merged and deployed ? 🙂

jens-concordium commented 3 years ago

This seems to be working as intended in 1.0(19). I haven't been able to provoke any unwanted pending accounts, and I can't start the identity flow without allowing camera access first, so I think it's in place.