social-app icon indicating copy to clipboard operation
social-app copied to clipboard

Keyboard input on Android misses a ton of touches causing frequently garbled text

Open jetpacktuxedo opened this issue 1 year ago • 11 comments

Describe the bug At some point seemingly within the last month or so the Android app started dropping a lot of keyboard input. I cannot reproduce on mobile web.

To Reproduce

Steps to reproduce the behavior:

  1. Use the Android app
  2. Type a post or reply

Expected behavior

Accept all input like every other app seems to do

Screenshots

Here's a video of it in action. You can see that it really likes missing the space bar, and I have "show touches" on so you can tell I'm actually hitting it. https://youtube.com/shorts/LaBMKucMj5o?feature=share

Details

  • Platform: Android
  • Platform version: Android 13 with August security update
  • App version: 1.43.0

Additional context

jetpacktuxedo avatar Aug 10 '23 14:08 jetpacktuxedo

Did this happen to start recently (within the last few weeks)?

pfrazee avatar Aug 10 '23 17:08 pfrazee

I would say yes as long as "last few weeks" is pretty rough. I don't remember exactly when it started (because it took a while to realize it didn't happen everywhere), but it has definitely been more than one week and less than six weeks.

I also just verified that it seems to only happens with the on-screen keyboard and doesn't happen if I plug an external keyboard into my phone.

jetpacktuxedo avatar Aug 10 '23 18:08 jetpacktuxedo

Yeah I'm wondering if it was caused by https://github.com/bluesky-social/social-app/pull/1033, which is a hack we introduced to handle issues with the textinput failing to render styles correctly.

pfrazee avatar Aug 10 '23 18:08 pfrazee

That would have probably updated in-app on the 19th or 20th I guess? That seems like a plausible point-in-time to me I think.

jetpacktuxedo avatar Aug 10 '23 18:08 jetpacktuxedo

Did this happen to start recently (within the last few weeks)?

Past week definitely for me (iOS)

For reference, this is how I implemented it in Graysky, which I think is a bit more idiomatic React: https://github.com/mozzius/graysky/blob/main/apps/expo/src/app/composer/index.tsx

You could combine this approach with React’s useDeferredValue hook to let it render once before doing the facets and stuff

mozzius avatar Aug 10 '23 19:08 mozzius

This seemed better for a few days, but came back again this morning as bad as ever. Not sure why it improved or returned though, or if anything even changed.

jetpacktuxedo avatar Aug 20 '23 16:08 jetpacktuxedo

Oh actually I think I figured it out. Rebooting my phone seems to have (almost certainly temporarily) fixed it. I had an android update earlier in the week which is probably the reboot that resolved it last time. So I guess repro instructions should also include "don't reboot your phone for a while" (unsure if "heavily use bluesky between reboots" is also a requirement, I can't really control for that).

jetpacktuxedo avatar Aug 20 '23 16:08 jetpacktuxedo

A phone reboot could just indicate that there's a memory leak or similar that's causing a performance regression which manifests this way.

I'm testing a replacement for our text editor to see if we can't fix the issue that way

pfrazee avatar Aug 20 '23 17:08 pfrazee

Memory leak or similar should be cleared by an app restart though (unless it's somehow causing the OS itself to leak memory) I think? Force closing the app doesn't resolve it for me, so I think something weirder is going on.

jetpacktuxedo avatar Aug 20 '23 17:08 jetpacktuxedo

There's a weird timing interaction with the PasteInput component which was causing the mentions to misrender a while back. We added a hack to fix it (https://github.com/bluesky-social/social-app/pull/1033) and I'd bet good money that's the issue. Thus me looking at a full replacement for our editor

pfrazee avatar Aug 21 '23 15:08 pfrazee

I'm not convinced of it, but it's possible that #2351 will fix this

pfrazee avatar Dec 28 '23 19:12 pfrazee

How are things looking since the latest update?

pfrazee avatar Jan 02 '24 19:01 pfrazee

Seems good so far, but it had also become much much less frequent. I'll drop an update if I notice it again in the next couple of weeks 🤞

jetpacktuxedo avatar Jan 02 '24 19:01 jetpacktuxedo

That's wonderful to hear. I'm going to optimistically close but please do let us know if it happens again

pfrazee avatar Jan 02 '24 19:01 pfrazee

I think I am still hitting this 😞 Not with the frequency or severity I was when I first opened it, but it definitely still seems present post- #2351

jetpacktuxedo avatar Jan 30 '24 22:01 jetpacktuxedo