Skip to content
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

LG-15479: Fix nil zipcode error during identity resolution #11820

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

matthinz
Copy link
Contributor

@matthinz matthinz commented Jan 30, 2025

🎫 Ticket

Link to the relevant ticket:
LG-15479

🛠 Summary of changes

We have a rare but persistent issue where users get stuck on the "Verify your information" screen because the zipcode stored with their PII is nil.

One way the user can end up in this situation is:

  1. Use hybrid handoff to upload identity documents that are valid, but have a barcode-related "attention" warning
  2. Opt then to enroll in in-person proofing (from their mobile device) instead
  3. Select a USPS location on their mobile device
  4. When prompted, return to their desktop and click the "Continue" button

In this case, the user would end up in a state where they have both an IPP enrollment and pii_from_doc set in their session. This would cause the system to get confused, and attempt to use pii_from_user data for identity resolution. That structure would be empty, thus the nil zipcode error.

The cause here was that we had two different paths the user could take off the "Link sent" page:

  1. In the remote doc auth flow, we would have the polling javascript click the "Continue" button when it detected that the hybrid document capture was complete
  2. In the IPP flow, we would instead redirect the user (in Javascript, via window.location) directly into the IPP flow, bypassing form submission on the "Link sent" page.

This PR:

  • Updates LinkSentController::update to redirect the user into in-person proofing if it detects they should be there

For users who complete IPP location selection and return to their desktop before polling times out and the "Continue" button is shown, they will still be redirected into the IPP flow (via window.location) as before. A subsequent PR will stop LinkSentPollController from returning a redirect_url for IPP and instead route all traffic through the "Continue" path, but this PR must be in place in prod first.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  1. Begin IdV. Opt for the hybrid flow
  2. On your mobile device, upload a document with a Barcode attention error
  3. When asked if you want to proceed, choose In person proofing
  4. Wait for the Continue button to appear on the desktop side
  5. Select an in-person proofing location.
  6. When prompted to return to your desktop device, click the "Continue" button
  7. Observe that you are redirected into the In-person proofing flow
  8. Verify you can complete IPP enrollment, SSN entry, and the "Verify your information" step

… IPP path

Handle the case where polling has timed out and the user must click on the "Continue" button rather than being redirected.

changelog: Bug Fixes, Identity verification, Fix rare issue where user may get stuck on "Verify your information"
@matthinz matthinz requested a review from a team January 30, 2025 00:45
@matthinz matthinz changed the title LG-15479: Prepare to fix nil zipcode error during identity resolution LG-15479: Fix nil zipcode error during identity resolution Jan 30, 2025
@matthinz matthinz requested a review from a team January 30, 2025 00:49
@gina-yamada
Copy link
Contributor

gina-yamada commented Jan 30, 2025

@matthinz Sorry if I am missing the boat here. I feel like I am only hitting update in link_sent_controller (and your code) if I resubmit images- not picking IPP after I fail once due to barcode error. (I tested using barcode_attention_no_dob.yml) So I am not convinced that redirect is doing anything. I may very much be wrong, sorry if that is the case.

When you say "Wait for the Continue button to appear on the desktop side" - I am not seeing that. On mobile (http://localhost:3000/verify/hybrid_mobile/document_capture#prepare) I see the continue on the Verify your identity in person view but not on the desktop side. I am testing using /test/telephony and using an incognito window to test mobile, could that be problematic in your experience? Also, when you say "Observe that you are redirected into the In-person proofing flow", I would expect to be on state id page. Can you confirm our expectations are the same?

Also, I started to investigate LG-15131. I believe our problem is likely similar (fail hybrid handoff remote then move to ipp). I have not been able to replicate it locally but CloudWatch/New Relic have me convinced it is this flow.

Update: I looked at this PR with PR#1182 and this makes sense. You are moving the in person redirect here and will remove it in link sent polling next. You commented above, I missed that. This is also where the direct for idv_ssn occurs so I think the redirect to ipp should be here rather than inside link_sent_polling_controller. I was able to create an pending enrollment from the hybrid flow.
zipcode captured on verify info page for both state id and address

@@ -24,6 +24,16 @@ def update
analytics.idv_doc_auth_link_sent_submitted(**analytics_arguments)

return render_document_capture_cancelled if document_capture_session&.cancelled_at

# If the user opted into in-person proofing in the hybrid session,
Copy link
Contributor

@gina-yamada gina-yamada Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - We usually say "opt in" when the user picked In Person on the How to Verify view. When they fail and then move to opt in- we don't refer to that as opt in bc it was not their first pick

Maybe... If the user failed remote and then moved to in-person proofing in the...

Not a deal breaker if you don't change it

@matthinz matthinz merged commit 08a88c0 into main Feb 6, 2025
2 checks passed
@matthinz matthinz deleted the matthinz/15479-nil-zipcode-part-1 branch February 6, 2025 00:10
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