Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
Dependencies updated in [12276](https://github.com/stripe/stripe-android/pull/12276):
- Bumped Dagger from 2.55 to 2.58.

### Identity
* [CHANGED] Fail out of verification flow on analyzer failure.

## 22.7.0 - 2026-01-26

Dependencies updated in [11877](https://github.com/stripe/stripe-android/pull/11877):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,21 @@ internal abstract class IdentityScanViewModel(
)
}

override fun onAnalyzerFailure(t: Throwable): Boolean {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we overriding here an not in CameraViewModel?
Also, are there any other places where we log an error (using the logger) but don't actually send it to the backend?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why are we overriding here an not in CameraViewModel?

IdentityScanViewModel is where verificationFlowFinishable is, which is where we can react properly to the analyzer error.

Also, are there any other places where we log an error (using the logger) but don't actually send it to the backend?

Yes, likely many many dozens, unfortunately. We can tackle that, but like we chatted about yesterday in our sync that should be it's own effort and not tied to this if at all possible - that way we can make sure this is covered and schedule that work in line with other priorities if needed

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we just log in CameraViewModel and also add a timeout in case the user cannot complete document capture after a set time (20 seconds for example) and show the error screen after a timeout? I believe the timeout matches the web experience.

Copy link
Collaborator Author

@Pearapps Pearapps Jan 26, 2026

Choose a reason for hiding this comment

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

I believe this is resolved after this discussion, but do let me know if there are still open questions https://hubble.corp.stripe.com/saved-queries/t/30457

identityAnalyticsRequestFactory.verificationFailed(
isFromFallbackUrl = false,
scanType = targetScanTypeFlow.value,
throwable = t
)

verificationFlowFinishable.finishWithResult(
IdentityVerificationSheet.VerificationFlowResult.Failed(
t as? Exception ?: Exception(t)
)
)
return true
}

override fun displayState(newState: IdentityScanState, previousState: IdentityScanState?) {
// toggle UX transition in CameraManager
// Done intentionally outside Jetpack Compose as cameraManger uses a traditional AndroidView
Expand Down
Loading