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

Talkback crashes on some devices #682

Closed
FrancoisBlavoet opened this issue Jan 3, 2019 · 17 comments
Closed

Talkback crashes on some devices #682

FrancoisBlavoet opened this issue Jan 3, 2019 · 17 comments
Assignees

Comments

@FrancoisBlavoet
Copy link
Contributor

We have encountered a weird talkback failure when interacting with the stripe widget on some devices :
Just after tapping the stripe widget in talkback mode, the phone completely stops announcing (not just the stripe widget). A couple of minutes later, there is an ANR from the a11y service.

device used to reproduce :
Nexus 5x
Android 8.1.0
TalkBack 7.0.0.198081500

talkback.txt

@FrancoisBlavoet
Copy link
Contributor Author

we have updated talkback just in case, but sadly the issue remains

@mshafrir-stripe
Copy link
Collaborator

@FrancoisBlavoet do you have repro steps that consistently trigger the ANR? Does it only happen on the devices you listed, but not on others?

@mshafrir-stripe
Copy link
Collaborator

@FrancoisBlavoet please reopen if you still need help with this issue

@russhwolf
Copy link

@mshafrir-stripe I've come across this as well. I can reproduce it in a bare-bones project that only includes a single activity with a CardInputWidget. I haven't tested anything with CardMultilineWidget so no idea if there's something similar there.

Steps:

  1. Enable TalkBack.
  2. Ensure that in TalkBack settings, you have a gesture mapped to the action "Read From Top"
  3. Launch a screen with a CardInputWidget (I threw up a repo here with a single screen where I can reproduce this)
  4. At this point, you will be able to click around the different elements of the CardInputWidget as expected
  5. Perform your "Read From Top" Gesture
  6. At this point, TalkBack apparently crashes. You will not hear any readouts, and you will no longer see items in the UI appear selected. It actually becomes extremely difficult to interact with the device at all (inside or outside of the app) unless you have a schortcut enabled to quickly disable TalkBack.
  7. Eventually after several minutes (or, possibly triggerd by turning screen on/off or trying to interact with system UI like the nav bar or something else random), TalkBack seems to restart and everything goes back to normal.

I have not seen the ANR that @FrancoisBlavoet described but the other symptoms sound similar.

I've observed this on a Nexus 5X running 8.1.0. A teammate of mine has seen it on a Galaxy S7 Edge running 8.0.0.

@FrancoisBlavoet
Copy link
Contributor Author

Awesome @russhwolf ! 🙌
I was only able to get the ANR on a specific device. I think for most other devices it just silently crashes.

Can you reopen the issue @mshafrir-stripe please ?

@mshafrir-stripe
Copy link
Collaborator

@russhwolf thanks for the repro steps. Have you been able to repro on an emulator, or only on real device?

@mshafrir-stripe
Copy link
Collaborator

@FrancoisBlavoet @russhwolf I was able to repro on my Pixel 1, but I don't see anything in the logs or otherwise that would help track down the root cause.

Have you filed a ticket with Google or seen if there are any existing tickets for the same issue?

@russhwolf
Copy link

I haven't checked in an emulator yet, nor had a chance to look at google issues. The accessibility tester on my team says he's never seen this sort of behavior before which suggests to me that it's something particular to the stripe widget, but I don't really have any more concrete information than that.

Is there any accessibility-specific code internal to the Stripe widget that you can try disabling to see if it makes a difference?

@mshafrir-stripe
Copy link
Collaborator

@russhwolf thanks to your repro steps I was able to find the issue! Putting up a PR shortly.

mshafrir-stripe added a commit that referenced this issue Feb 28, 2019
**Summary**
`android:accessibilityTraversalAfter` on both
the expiration date and CVC input views were
pointing to the wrong views.

**Testing**
On a Google Pixel, confirmed that TalkBack is
no longer crashing when navigating through
the input views of CardInputWidget.

**Motivation**
Fixes #682
@russhwolf
Copy link

@mshafrir-stripe That's great! Let me know if I can help test the fix.

@mshafrir-stripe
Copy link
Collaborator

@russhwolf sure:

  1. Enable TalkBack on device
  2. Clone the repo and checkout my branch
  3. Open in Android Studio
  4. Run the example app

screen shot 2019-02-28 at 11 15 04 am

  1. Tap "Create Card Tokens"
  2. Attempt to navigate through the input fields or do "Read from Top" gesture screenshot_1551370612

mshafrir-stripe pushed a commit that referenced this issue Feb 28, 2019
**Summary**
`android:accessibilityTraversalAfter` on both
the expiration date and CVC input views were
pointing to the wrong views.

**Testing**
On a Google Pixel, confirmed that TalkBack is
no longer crashing when navigating through
the input views of CardInputWidget.

**Motivation**
Fixes #682
@russhwolf
Copy link

@mshafrir I don't see the crash in master now. However, in testing that sample, it also seems like the screen reader skips the card number and expiration data fields. This is probably still an issue for us but it's a smaller one.

In any event, is there any schedule for when the next version will be released so we know when to update to get the fix?

@mshafrir-stripe
Copy link
Collaborator

@russhwolf is what you're describing a regression or something that was happening before the fix? I can confirm on my end if you don't know off hand.

I can get a release out early next week, likely Monday.

@russhwolf
Copy link

@mshafrir-stripe It's not a regression only because the previous behavior was this bug. It's feasible that it might be caused by the fix here since you were adjusting the field read order but I'd have to look closer at the Stripe code to understand for certain.

To be a little more explicit about the current behavior: When I read from top the card number and expiration fields are skipped. The cvc will be read out if it's visible. I do get readouts of all fields if I select them manually so it's less of a hindrance to a disabled user than it might otherwise be, but it's still not ideal since they might not be aware that those fields are present.

@mshafrir-stripe
Copy link
Collaborator

@russhwolf unfortunately I don't have the bandwidth to further investigate that issue, but I agree that it's something we should fix. I'll add it to the backlog.

@russhwolf
Copy link

Yeah that makes some sense. Thanks for the quick response on this!

@mshafrir-stripe
Copy link
Collaborator

@russhwolf @FrancoisBlavoet I just released stripe-android:8.5.0 with the fix. It should propagate out over the next few hours.

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

No branches or pull requests

3 participants