Skip to content

Add pixel where auth indicates a hardware missing error #5971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

CDRussell
Copy link
Member

@CDRussell CDRussell commented Apr 28, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1209519141368890?focus=true

Description

Pixels the scenario whereby auth library returns that the required hardware isn’t present. We expected this not to happen because we check hardware in advance but we’ve seen a few reports indicating this might be happening still and we want to understand it more.

Since it’s not an error that’s possible to reproduce naturally, there is a patch that will map user-cancellations of the auth dialog to act as ERROR_HW_NOT_PRESENT errors for testing.

Steps to test this PR

  • Apply patch (defined below)
  • Add one or more passwords
  • Visit the Password management screen
  • When prompted to authenticate, cancel instead. Note, this triggers the patch’s changes simulating this error scenario occurring.
  • Verify you see autofill_device_auth_error_hardware_unavailable in the logs
  • Repeat, and verify autofill_device_auth_error_hardware_unavailable isn’t sent again

Patch to apply for testing

Index: autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt b/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt
--- a/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt	(revision Staged)
+++ b/autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/deviceauth/AuthLauncher.kt	(date 1745844684704)
@@ -103,6 +103,9 @@
 
             if (errorCode == BiometricPrompt.ERROR_USER_CANCELED) {
                 onResult(UserCancelled)
+
+                // hardcoded for testing
+                sendErrorPixel(12)
             } else {
                 onResult(Error(String.format("(%d) %s", errorCode, errString)))
                 sendErrorPixel(errorCode)

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@CDRussell CDRussell marked this pull request as ready for review April 28, 2025 12:55
@CDRussell CDRussell force-pushed the feature/craig/pixels_for_biometrics_unavailable_errors branch from 92802b1 to 4232b91 Compare May 1, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants