You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android Crash] Touch data should have been recorded on start #5246
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!
Also got this on iOS when randomly tapping around on an app. Can't reproduce reliably ... so, sorry for there not being any more context. I don't think it was in the context of a ListView.
Found where this is happening: react/lib/ResponderTouchHistoryStore.js in the method recordMoveTouchData.
On a cold boot of my app, if the first touch on the screen is a scroll on a ListView/ScrollView, there appears to be a race condition and recordMoveTouchData is called before recordStartTouchData, therefore touchHistory.touchBank is not properly initialized.
Upon the first call, var touchTrack = touchBank[touch.identifier]; touchTrack is undefined, causing the crash. Inserting:
(like it exists in recordStartTouchData) resolves the problem. However, I doubt this is the correct solution. Again, I believe it's a race condition with the recordStartTouchData.
I've changed how touches are handled only on iOS side. If this issue is common for both iOS and Android I would expect something is wrong on js side. @marcshilling can you repro this with a simple app containing just scrollview? @Richard-Cao could you link to a page on this device specific touch gestures feature on Android?
@majak I'll try to throw something together. The tricky thing is it's not reproducible 100% of the time (definitely a race condition). But anyway, yeah let me see if I can get something up and running.
Changes that should fix this issue were just pushed on master. Commits from 8f07b01 to 31bb85a. The important one with deeper explanation is 1d3db4c.
Since I didn't repro this issue locally I cannot guarantee it will fix it for real. Therefore it would be great if you could patch it locally and see whether it really helps.
But also turn off chrome debugging please. Looks like this stack breaks it 😅. I'm looking into that too.
Does anyone know whether this is still an issue on Android? It seems like we at least half fixed this type of problem, but since it has been a while it does not seem clear to me whether there is still a problem on Android here..
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
Activity
Richard-Cao commentedon Jan 11, 2016
@satya164
facebook-github-bot commentedon Jan 11, 2016
Hey Richard-Cao, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
react-nativeor for more real time interactions, ask on Discord in the #react-native channel.satya164 commentedon Jan 19, 2016
Sorry. I've no context on this. What do you mean by the touch gestures feature? How to enable it?
Richard-Cao commentedon Jan 20, 2016
@satya164 Some Android devices like XiaoMi, Huawei, Nubia and so on, have
touch gesturesfeature.If you open it, you can restore this crash.
marcshilling commentedon Feb 19, 2016
I just got this on iOS as well. It seems to happen when I try to scroll my ListView quickly after it mounts...
brianreavis commentedon Feb 23, 2016
Also got this on iOS when randomly tapping around on an app. Can't reproduce reliably ... so, sorry for there not being any more context. I don't think it was in the context of a ListView.
marcshilling commentedon Mar 16, 2016
Found where this is happening:
react/lib/ResponderTouchHistoryStore.jsin the methodrecordMoveTouchData.On a cold boot of my app, if the first touch on the screen is a scroll on a ListView/ScrollView, there appears to be a race condition and
recordMoveTouchDatais called beforerecordStartTouchData, thereforetouchHistory.touchBankis not properly initialized.Upon the first call,
var touchTrack = touchBank[touch.identifier];touchTrackis undefined, causing the crash. Inserting:(like it exists in
recordStartTouchData) resolves the problem. However, I doubt this is the correct solution. Again, I believe it's a race condition with therecordStartTouchData.marcshilling commentedon Mar 16, 2016
Opened an issue on react core here react/react#6277
marcshilling commentedon Mar 17, 2016
Ok, they bounced it back over here. Anyone familiar enough with
PanResponderto look further into this?skevy commentedon Mar 17, 2016
@majak I know you recently refactored how touches work (by passing them through the event dispatcher)...would you have any clue on this issue?
TLDR; we're getting touchesMoved before a touchesStart is ever sent.
skevy commentedon Mar 17, 2016
(cc @nicklockwood)
marcshilling commentedon Mar 17, 2016
Yep, you can see here iOS gets
touchesBegan, then a series oftouchesMoved, yet the first event to land in JS is atopTouchMoveThis is on React Native 0.20
majak commentedon Mar 17, 2016
I've changed how touches are handled only on iOS side. If this issue is common for both iOS and Android I would expect something is wrong on js side.
@marcshilling can you repro this with a simple app containing just scrollview?
@Richard-Cao could you link to a page on this device specific
touch gesturesfeature on Android?marcshilling commentedon Mar 17, 2016
@majak I'll try to throw something together. The tricky thing is it's not reproducible 100% of the time (definitely a race condition). But anyway, yeah let me see if I can get something up and running.
5 remaining items
Richard-Cao commentedon Mar 21, 2016
@majak

keeth commentedon Mar 24, 2016
Seeing similar crash reports in the wild on iOS as well. Thanks for looking into it!
better event emitting
majak commentedon Apr 1, 2016
Changes that should fix this issue were just pushed on master. Commits from 8f07b01 to 31bb85a. The important one with deeper explanation is 1d3db4c.
Since I didn't repro this issue locally I cannot guarantee it will fix it for real. Therefore it would be great if you could patch it locally and see whether it really helps.
But also turn off chrome debugging please. Looks like this stack breaks it 😅. I'm looking into that too.
majak commentedon Apr 6, 2016
Version 0.24.0-rc1 should already contain the fix and all necessary fixes for the fix.
ide commentedon Apr 6, 2016
To be clear, we believe the issue on iOS has been fixed. Those commits don't affect Android.
better event emitting
lacker commentedon Oct 20, 2016
Does anyone know whether this is still an issue on Android? It seems like we at least half fixed this type of problem, but since it has been a while it does not seem clear to me whether there is still a problem on Android here..
johnwayner commentedon Nov 17, 2016
FWIW, I just saw this in Production on Android v6.0.1 with React Native v0.25.1 (which was tagged on May 4th).
anuragdadheech commentedon Mar 7, 2017
This is still reproducible on Android, RN v0.30
Fixed before v0.39.
hramos commentedon Jul 20, 2017
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.