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

Typing certain emoji crashes the app #2787

Closed
borisyankov opened this issue Jul 11, 2018 · 8 comments
Closed

Typing certain emoji crashes the app #2787

borisyankov opened this issue Jul 11, 2018 · 8 comments
Labels
a-Android a-emoji bug severe: crash The app quits, or stops responding. upstream: RN Issues related to an issue in React Native

Comments

@borisyankov
Copy link
Contributor

This happens if using Gboard - the Google Keyboard.
This is reported as being the fix:
facebook/react-native@41975f7

The commit is included in React Native 0.56

@borisyankov borisyankov self-assigned this Jul 11, 2018
@gnprice gnprice added upstream: RN Issues related to an issue in React Native a-Android labels Jul 11, 2018
@gnprice
Copy link
Member

gnprice commented Jul 11, 2018

Sweet -- glad this is already fixed upstream!

Looks like facebook/react-native#18405 (comment) is the RN issue report. (Followed a link from the commit message on the commit mentioned above; and the repro steps look like a perfect match.)

Though... hmm. That issue is still open.

... OK, but the linked commit (which came from facebook/react-native#18443) is supposed to be a workaround that applies if you don't pass an onKeyPress prop to your TextInput. Which we currently don't, so I guess when we upgrade to RN 0.56 that will fix the issue for us.

@gnprice
Copy link
Member

gnprice commented Jul 11, 2018

BTW that upstream issue thread helps clarify what the conditions are that trigger the issue: it looks like it's not specific to Gboard, but it happens on Android when you use any keyboard to type... actually any character outside the Unicode BMP, i.e. a character that doesn't fit into one Java char. In practice that mostly means an emoji that isn't one of the oldest emoji.

@gnprice
Copy link
Member

gnprice commented Jul 11, 2018

Unassigning because I believe there isn't any ongoing work to do on this issue; it should just get fixed when we upgrade RN. (Though part of doing that upgrade is we should confirm that.) Thanks again @borisyankov for writing up the issue and for the research!

I just filed #2788 to track the RN upgrade. If you want to take that, please do :)

@gnprice
Copy link
Member

gnprice commented Jul 12, 2018

Also: thanks @adnrs96 for originally reporting this issue!

@gnprice gnprice added the severe: crash The app quits, or stops responding. label Aug 3, 2018
@gnprice gnprice changed the title Pressing an auto-suggested emoji crashes the app Typing certain emoji crashes the app Sep 18, 2018
@gnprice
Copy link
Member

gnprice commented Nov 1, 2018

And that RN upgrade has now been merged in master! 😅 Our belief when we studied this issue was that it would get fixed "for free" when we did that upgrade.

@adnrs96 , are you up for testing the app from master and checking if the issue still reproduces?

@gnprice
Copy link
Member

gnprice commented Nov 1, 2018

... Hmm, on the one hand I should have reread the thread more closely:

BTW that upstream issue thread helps clarify what the conditions are that trigger the issue: it looks like it's not specific to Gboard, but it happens on Android when you use any keyboard to type... actually any character outside the Unicode BMP, i.e. a character that doesn't fit into one Java char. In practice that mostly means an emoji that isn't one of the oldest emoji.

So this is something any of us can easily reproduce with an Android emulator or device. 🎊 (🎊 U+1F38a CONFETTI BALL) is one handy example of an emoji that should trigger the issue.

On the other hand, I just tried that on 19.2.102 (the prod release from yesterday, for Android) on my phone, and it didn't reproduce! So there's something here we don't understand.

Maybe Android 9 fixed this? My phone is on that now; it was Android 8 (maybe 8.1) when we looked at this last, in July.

This is probably still resolved by that RN upgrade (#2789), but it'd be good to poke around at least a little more to confirm we still know some way to reproduce the issue before that putative fix. We're not aware of anything in 19.2.192, relative to a few months ago when this was reported, that would have fixed it.

@gnprice
Copy link
Member

gnprice commented Nov 1, 2018

Aha, @borisyankov just remembered the repro more precisely 🎊 , and we successfully repro'd on 19.2.102 on my phone (Android 9):

  • In the stock keyboard, start typing a word that names an emoji.
  • Don't use the emoji UI of the keyboard -- just type letters, like confetti.
  • When the autocomplete suggestions offer an emoji (:confetti_ball:), choose that.
  • The app crashes.

@gnprice
Copy link
Member

gnprice commented Nov 1, 2018

And indeed this is fixed in master! 👏 (U+1F44F CLAPPING HANDS SIGN) Presumably by the RN v0.57 upgrade from #2789.

Thanks again @adnrs96 for reporting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Android a-emoji bug severe: crash The app quits, or stops responding. upstream: RN Issues related to an issue in React Native
Projects
None yet
Development

No branches or pull requests

3 participants