Open brentvatne opened 7 years ago
how can we fix this problem, i meet this problem too
i got the same problem on android with a wiko pure. any solution ?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
Happening to me too, captured by Sentry's RN logging
I got the same problem.
any solution for this problem??? i got the same problem with CRNA application, my application crash when try to take a screen shot wit 3 fingersgesture...
I have this issue on a OnePlus 3
This is happening more and more frequently. Here's a couple of stack traces:
https://sentry.io/share/issue/be6ff067877948cb9f68d1ef66c7082b/ https://sentry.io/share/issue/6ff3cd627faf4ccf80589c8cfed780b7/
The error appears to be happening in Libraries/Renderer/src/renderers/shared/shared/event/eventPlugins/ResponderTouchHistoryStore.js around line 203.
Here are devices we are seeing:
The issue also persists on One Plus 5 phone (A5000, Android 7.1.1).
See issue -> https://github.com/expo/expo/issues/1223
The issue also persists on One Plus 3T phone
This file is no longer (as of 3 days ago?) in React Native master. There seems to have been a major reorg due to React 0.16/Fiber(?) and the code for ResponderTouchHistoryStore is now in https://github.com/facebook/react-native/blob/13829751b11330f8e1400c5c70c59c49ac2f091f/Libraries/Renderer/ReactNativeRenderer-prod.js
We haven't tested yet to see if the behavior is different, but any patches would definitely have a new target.
Ok, I have the same problem so I checked it out to try to find a solution. I figured out that:
TFS
) enabled on OnePlus phones. If you disable it, the problem disappears (you can still take screenshots with PWR + VOLUME_DOWN
combination).TFS
is to start the touch with two fingers and finish it with three (weird).TFS
functionality (https://goo.gl/YohYzJ), not a react-native one. If you download "Multitouch Tester" app you will see that with TFS
enabled it also doesn't recognise more than two moving touch events and gets stuck in the third touch. When you disable TFS
the app works as intended. So I think the problem is that the third finger touch start event is captured by the OnePlus TFS
functionality and is not propagating to the apps.console.error
to console.warn
or console.log
in the following files/lines:
https://github.com/facebook/react-native/blob/master/Libraries/Renderer/ReactNativeRenderer-dev.js#L2202
https://github.com/facebook/react-native/blob/master/Libraries/Renderer/ReactNativeRenderer-dev.js#L1629
https://github.com/facebook/react-native/blob/master/Libraries/Renderer/ReactNativeRenderer-dev.js#L1650What do you think? Can that changes be proposed as a solution?
@gregoriohc in your testing, is this actually causing a crash or a failure in RN apps or is it simply that the logging is set to console.error? I was under the impression this was causing a crash in Android RN apps?
@ghidinelli It's only that logging is set to console.error, that's the reason that I'm suggesting the change only in the dev file, because when you use Expo it shows console errors on that full red screen, so you can't capture an screenshot using the three fingers gesture. But I realize that being such a specific error (OnePlus + Expo + Three fingers gesture), it is not worth changing anything in react-native or expo to solve it. I guess that OnePlus' owners will have to disable the three fingers screenshot gesture, or wait for OnePlus to solve the problem in OxygenOS.
@gregoriohc it isn't OnePlus only - see my list of devices we have seen this with at https://github.com/facebook/react-native/issues/15059#issuecomment-354553812. FWIW, we don't use Expo in our builds. I'm in favor of changing it from error to warn.
@brentvatne - if a PR changing the log from error to warn was submitted, would you accept?
@ghidinelli I agree with you. But changing from error
to warn
seems to be only a "temporary patch" because it doesn't solve the root of the problem.
Does anyone knows how Android native handles this? Does it ignores silently any touch event that doesn't follow the regular flow (start-move-end)?
At a glance, it seems like warning might be a good approach here, but as you said this seems to be a temporary patch that does not address the actual problem. You may also want to consider that warning instead of crashing might leave the response in an invalid state.
This should not crash the app, it also happens when the app lags and the user touches in the meantime. Surely there is a way to clear the state and continue working with a warning @hramos ?
Same with OnePlus 3t oxygenOS 5.0.1, Android 8.0.0
Happens when touching a View with flexDirection: 'column'
"react-native": "~0.54.1"
import React, {Component} from 'react';
import { StyleSheet, Text, View, Image } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Image source={{uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg'}} style={{width: 193, height: 110}}/>
<View style={{flex: 1, backgroundColor: 'red'}} >
<Text>Another text1</Text>
</View>
<View style={{flex: 3, backgroundColor: 'powderblue'}} >
<Text>Another text3</Text>
</View>
<View style={{flex: 2, backgroundColor: 'blue'}} >
<Text>Another text2</Text>
</View>
<Text>This is text</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column'
}
});
The same problem on Mi.Any Solutions???!!
Happens on Oneplus 6 also.
Did anyone solved this problem
The same problem on version 0.55.2
Same issue on Oneplus 5. I think its a problem on all one plus phones.
Same issue on Xiaomi Redmi Note 5 (Global Version) MIUI 9.6.4.0
I suppose it happens to all Xiaomi's devices
FYI: I enabled screen capture which is supported by MIUI by touching screen with 3 fingers
Thanks for letting us know which devices are affected by this. At this point, we should start talking about potential solutions. Please link back to this issue on any PR that attempts to fix this.
If you run into this issue on a device that is already covered by the comments above, don't feel pressured into commenting here.
so are we getting any solution in this issue. I am also facing same issue when developing app and testing in oneplus 5t
The same problem on version 0.57.1
Can confirm that this also happens on a OnePlus6 running Android 9
Happens on xiaomi redmi not 5 plus Android 8 Also
Also on Oppo A73
There is no issue on simple/plain static screen. I am facing this error only on those screens where we are using thread. ` Like do something continuously or change UI with setinterval () Use of setTimeout()
on these screens where i start or use thread when i take screenshot my application giving me this error.
Ended a touch event which was not which was not counted in 'trackedTouchcount'
Even I am facing the same issue while taking screenshots. Mi note 4 Samsung note 5
This is issue is happening on the newly released OnePlus 6T as well.
Did anyone find a fix for this? I tried the above suggestions but no dice.
Samsung SM-G950U same problem, android 8.0.0.
This issue has been under discussion for more than a year... Did anyone find a fix? please share thanks.
I found on another thread that this only happens in development mode 🤔Can anyone confirm? I will test it out myself when I have time.
@rasmuswoelk Yes for me the error does not occur when using a production build
Can someone summarize the solution about this?
Some on one plus 5
Hey folks, thanks for chiming in with information about the devices you are seeing this on. I've edited the original post with a list of known affected devices. I think it's safe to say this affects several devices from manufacturers such as OnePlus, Xiaomi, Oppo, and Samsung. At this point, adding a comment mentioning this can be reproduced on a device covered above is of diminishing returns.
Following up on my earlier comment, please limit comments to any efforts to fix the underlying issue. Otherwise, we may find the need to limit comments to collaborators. Thanks for your understanding.
I can verify that the production build of my Expo app (which of course relies on React Native) does not encounter this sort of issue On my OnePlus 5, or if it does it's silent and the screenshot is captured successfully.
In development mode however, I get an error identical to the issue reported in this thread.
My device is running Android v8.1 (Oxygen OS v5.1.7)
Hey guys, having same problem on One Plus 6, any fix ?
Put this in app.js or root file of your app.
console.reportErrorsAsExceptions = false;
Put this in app.js or root file of your app.
console.reportErrorsAsExceptions = false;
It does works. Thank you.
Maybe will be useful for someone - this issue can be fixed/hidden for release builds by adding transform-remove-console
babel plugin
https://facebook.github.io/react-native/docs/performance#using-consolelog-statements
@brentvatne console.reportErrorsAsExceptions = false;
this worked for me!
Seeing this as well on Samsung SM-G950U Android 9.0 using pinch to zoom. I've turned off the console logs as mentioned in earlier posts.
I get this in an image gallery component I've made using react-native-image-view. It doesn't appear to crash the app now that I've turned the console logs off but pinch to zoom stops working until I open a new image.
Are there any implications to adding console.reportErrorsAsExceptions = false;
? Would this result in some other exceptions not getting reported that should be?
Error: "Cannot record touch end without a touch start"
Environment
[skip envinfo]
Issue has been reproduced as far back as react-native@0.45.1, and up through react-native@0.57.1.
Steps to Reproduce
Expected Behavior
App does not crash
Actual Behavior
Red screen error
Reproducible Demo
Any project on this phone with this gesture
Known Affected Devices
OnePlus:
Oppo:
Samsung:
Wiko:
Xiaomi: