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

Change console error to warning for untracked touch end event #26170

Closed
wants to merge 1 commit into from

Conversation

ascorbic
Copy link

Summary

Currently if more touch end events are received than tracked touches, the app will crash with a console.error. This PR changes the error to a console.warn, which matches other touch event errors. This fixes #15059, where an OS bug in certain Android devices means only two touchstart events, but three touchcancel events are received when performing a three finger screenshot gesture.

Changelog

[General] [Fixed] - Change error to warning for untracked touch end event

Test Plan

On a device listed in #15059, enable three-finger screenshots. Open the RNTester app and perform three-finger screenshot gesture. Observe YellowBox warning for "Ended a touch event which was not counted in 'trackedTouchCount'".

Tested on a OnePlus 6 running Android 9.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 23, 2019
@osdnk
Copy link
Contributor

osdnk commented Aug 28, 2019

@ascorbic Thanks!
Do you have some suggestion about fixing this issue instead of this workaround?

@ascorbic
Copy link
Author

@osdnk I think the only proper fix would be to fix the bug in the vendors' Android builds. This PR fixes an inconsistency in how we handle touch event errors so that OS bugs like these don't crash the app.

@cpojer
Copy link
Contributor

cpojer commented Sep 11, 2019

@ascorbic we sync React into React Native. This code is part of React itself. Do you mind opening a PR to React first?

@ascorbic
Copy link
Author

@cpojer Oh right! I was confused by the ReactNativeRenderer filename.

@ascorbic
Copy link
Author

I've opened facebook/react#16750 to address this

@ascorbic ascorbic closed this Sep 11, 2019
@cpojer
Copy link
Contributor

cpojer commented Sep 11, 2019

I merged the other PR into React and we'll be syncing it into React Native soon on our own. Thank you so much!

@ascorbic
Copy link
Author

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App crashes when touching screen with 3 fingers on some OnePlus, Oppo, Xiaomi, Samsung devices
5 participants