Digitaler-Impfnachweis / covpass-android

The official CovPass(-Check) Android apps and SDK.
https://digitaler-impfnachweis-app.de
Apache License 2.0
184 stars 59 forks source link

Bad certificate import error when certificate already stored #225

Closed MikeMcC399 closed 2 years ago

MikeMcC399 commented 2 years ago

Avoid duplicates

Technical details

Describe the bug

When attempting to import a certificate from a PDF document, where the document has already been stored, the error message "No valid certificate was found" is misleading.

no valid certificate found

If the scanned certificate is deleted and the import attempt repeated, then the import succeeds.

Steps to reproduce the issue

  1. Delete any stored certificates
  2. Tap "+" in "Add a certificate"
  3. Tap "Add certificate"
  4. Scan a 1/2 vaccination certificate via the mobile device's camera
  5. Scroll down to "Vaccination certificate" and tap
  6. Scroll down to "Create EU printout" and tap, tap "Next"
  7. Select "Drive", tap Save (default filename is Certificate-FirstName-LastName.pdf)
  8. Tap back-arrow twice
  9. Tap "+", tap "Add certificate"
  10. Tap file symbol bottom left
  11. Tap "Select document" and My Drive opens
  12. Select file with filename from step 7.
  13. Note error message "No valid certificate was found"
  14. Tap "OK"
  15. Tap "Display certificates", tap "Manage certificates"
  16. Scroll down to "Vaccination certificate" and tap
  17. Tap recycle bin at top right, confirm "Delete" and acknowledge "OK"
  18. Repeat steps 9. - 12.
  19. Tap "Import 1 certificate(s)"
  20. Note message "Import successful"

Expected behaviour

When attempting to import a certificate from a document, where the certificate is already stored, the error message "COVID certificate already added" or similar should be displayed.

This is the error message displayed when a user attempts to scan, rather than to import, a certificate which is already stored.

pucherd commented 2 years ago

Hello @MikeMcC399, thank you for reporting it. This will be fixed in version 1.30

MikeMcC399 commented 2 years ago

@pucherd

I still see this error occurring in CovPass 1.30.

If I scan from a PDF file I get the success message "Import successful". If I repeat trying to scan from the same PDF file I get the error message "No valid certificate was found". This is the same error as in earlier versions.

Note that scanning the second time via the camera gives the correct error message "COVID certificate already added".

MikeMcC399 commented 2 years ago

I revisited this issue and noticed that the error message changed with 1.30

image

when trying to import a certificate from a PDF file where the corresponding certificate is already stored.

This makes the error message correct, however it seems confusing to have a different error message when importing from PDF compared to scanning via the camera in the case of the corresponding certificate already existing in the CovPass certificate store.

I will close the issue and at the same time encourage more consistency in the error messages if possible in the future.