Closed uoroaix closed 1 month ago
+1
This happens for me with regularity but only when running on the device and debugging in Chrome. If I run on the device without debugging this error does not occur. Anyone seeing the same behavior?
@spicyj - assigned you because it seems related to responders :smile:
I don't actually know anything about this stuff… maybe @vjeux does.
I've been getting the same error with a TouchableHighlight wrapping an Image, so it doesn't seem related to Text. I've only seen this while debugging in Chrome thus far but will update if that changes.
It is same when i'm wrapping the <Icon />
from react-native-icons
. I'm really stressed out with the production app we are building and the error keeps coming up :cry:
@brentvatne @vjeux @spicyj The same error comes up when we try to use inspect element mode. It seems the elements there are also TouchableHighlight
and when we press on one of them in random order the same error comes up. So I think this is really an issue needs to be handled immediately.
??
I had the same issue with Image surrounded by TouchableHighlight. Also just coming up on a real device while debugging in Chrome. Thanks uoroaix. Surrounding the Image with View solved the problem.
Do we have an official fix or explanation ? This error is so annoying !
Any update on this, @vjeux? The error message is cryptic and the stack trace is useless to us.
:+1:
No update sorry, if anyone of you can investigate what is happening and figure out if you can make a fix that would be awesome!
For reference, I was seeing a heap of these warnings, and it turned out I had removed the LaunchScreen from the project (also fixed #2018 for me). No idea why the LaunchScreen would be so important, but it fixed if for me.
Also happening on Android, real device.
Seeing this too on Nexus 6 + Chromium debugging. App is just a very simple test of Navigator, and it works without debugging, though route transitions are sluggish. As soon as I debug it, I get a red screen of death with the above message.
@RoryHunter Check https://facebook.github.io/react-native/docs/performance.html#slow-navigator-transitions for the transitions issue
Encountered this same issue:
Only started happening to me this morning, but went through the following steps to resolve it:
Given that the restart and some further fiddling resolved the issue, could this be memory related?
Here's further details:
Error: Touchable cannot transition from `RESPONDER_INACTIVE_PRESS_IN` to `LONG_PRESS_DETECTED` for responder `.r[1]{TOP_LEVEL}[0].2.1.0.1.0`
stack:
TouchableMixin._receiveSignal index.ios.bundle?…:41098
TouchableMixin._handleLongDelay index.ios.bundle?…:41077
JSTimersExecution.callbacks.(anonymous index.ios.bundle?…:6158
JSTimersExecution.callTimer index.ios.bundle?…:5942
Object.JSTimersExecution.callTimers index.ios.bundle?…:5965
MessageQueue.__callFunction index.ios.bundle?…:5574
<unknown> index.ios.bundle?…:5512
guard index.ios.bundle?…:5467
<unknown> index.ios.bundle?…:5512
URL: undefined
line: undefined
message: Touchable cannot transition from `RESPONDER_INACTIVE_PRESS_IN` to `LONG_PRESS_DETECTED` for responder `.r[1]{TOP_LEVEL}[0].2.1.0.1.0`
<TouchableHighlight
style={styles.container}
underlayColor='#eee'
onPress={this.props.handler}>
<View style={styles.container}>
<View style={styles.label}>
<Text style={styles.labelText}>{this.props.label}</Text>
</View>
<View style={styles.icon}>
<Icon name={this.props.icon} size={60} color="green" />
</View>
</View>
</TouchableHighlight>
Hope any of this helps!
+1 I have been getting this a lot lately.
:+1: same here
:+1: have been encountering repeatedly.
when TouchableOpacity wraped by ScrollView,it occured still
Not sure what changed, getting this on almost every press now. Not using ScrollView. Only happens when using chrome debug. Pretty much have to disable chrome debug now which is a big pain.
Hope there is a solution for this soon.
Encountered this error as well, TextInput inside ScrollView on iOS
:+1: repeated encounters
Hey,
I've been doing some digging on this issue. Found out that it's because of a bug with setTimeout. When using chrome debugging they can fire in the incorrect order. (See dedicated issue and example in #4470).
What happens with this one is in the function touchableHandleResponderGrant
in Components/Touchable/Touchable.js
you setup two setTimeouts and when they fire in the incorrect order the touch responder graph drops out to an error state which causes the red screen of death.
I've got very much a 'paint over the cracks' fix, which most probably has unforeseen side-effects but will at least enable you to debug in chrome again. I definitely remove this before deploying to production In Components/Touchable/Touchable.js
change...
RESPONDER_INACTIVE_PRESS_IN: {
DELAY: States.RESPONDER_ACTIVE_PRESS_IN,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: States.ERROR,
},
to be
RESPONDER_INACTIVE_PRESS_IN: {
DELAY: States.RESPONDER_ACTIVE_PRESS_IN,
RESPONDER_GRANT: States.ERROR,
RESPONDER_RELEASE: States.NOT_RESPONDER,
RESPONDER_TERMINATED: States.NOT_RESPONDER,
ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN,//States.ERROR,
},
Again I definitely remove this before deploying to production
Awesome find!! On Wed, 2 Dec 2015 at 1:06 AM, Thomas Beverley notifications@github.com wrote:
Hey,
I've been doing some digging on this issue. Found out that it's because of a bug with setTimeout. When using chrome debugging they can fire in the incorrect order. (See dedicated issue and example in #4470 https://github.com/facebook/react-native/issues/4470).
What happens with this one is in the function touchableHandleResponderGrant in Components/Touchable/Touchable.js you setup two setTimeouts and when they fire in the incorrect order the touch responder graph drops out to an error state which causes the red screen of death.
I've got very much a 'paint over the cracks' fix, which most probably has unforeseen side-effects but will at least enable you to debug in chrome again. I definitely remove this before deploying to production In Components/Touchable/Touchable.js change...
RESPONDER_INACTIVE_PRESS_IN: { DELAY: States.RESPONDER_ACTIVE_PRESS_IN, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR, },
to be
RESPONDER_INACTIVE_PRESS_IN: { DELAY: States.RESPONDER_ACTIVE_PRESS_IN, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN,//States.ERROR, },
Again I definitely remove this before deploying to production
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/1693#issuecomment-160978459 .
@Thomas101 - seriously, great job tracking this down.
Go vote for this issue so that the developers can see that it's important: https://productpains.com/post/react-native/settimeout-fires-incorrectly-when-using-chrome-debug/
Does this still happen frequently? Haven't seen this for about a month now.
Lots of people saying this only happens while debugging with chrome...I don't think that's the case.
I have a production iOS app on the store and get crash reports for this pretty frequently. Latest one happened today @satya164. Unfortunately it's hard to tell exactly where it's occurring from the crash report. The app is a few versions of React Native behind.
Getting this while building to device and debugging in Chrome. I'm on React Native 0.13.0, so this may have been resolved in more recent versions.
@satya164 since you asked if this was still an issue, I've been running into it debugging on the device with Chrome on master. I think there's some timing issue going on more generally, as I've started running into other errors as well.
Encountered same issue. Replaced TouchableHighlight
with react-native-button
and set my <Icon ...>
in <Button ...> <Icon ... /> </Button>
works like a charm.
I am not an expert, perhaps the answer to this can be found in react-native-button
implementation.
I hope it helps to someone!
Can't reproduce this on master currently.
Thank you @Thomas101 !
This bug stopped me from being able to debug into UIExplorer in react-native 0.26. Now I can continue using the debugger to learn how to modify and use NavigationExperimental. Without @Thomas101 work-around this would have taken me so much longer.
my error is slightly different:
Attempted to transition from state
RESPONDER_INACTIVE_PRESS_INto
RESPONDER_ACTIVE_LONG_PRESS_IN, which is not supported. This is most likely due to
Touchable.longPressDelayTimeoutnot being cancelled.
@Thomas101 's solution did not work for me unfortunately. Anyone else experiencing anything similar?
@stantoncbradley, I have the same issue on react-native 0.27.0. @Thomas101 , do you have any ideas on how we can workaround this one too? I'm trying different combos to no avail.
got the same issue
Same issue here RN 0.28 Running on iPhone 6S+
Only occurs about 20% of the time.
+1
Never realized how much tapping I did until it started crashing every 3 or 4 taps.
Attempted to transition from state 'RESPONDER_INACTIVE_PRESS_IN' to 'RESPONDER_ACTIVE_LONG_PRESS_IN', which is not supported. This is most likely due to 'Touchable.longPressDelayTimeout' not being cancelled.
RN 0.26 Running on iPhone 6 with iOS version 9.2.1
We're coming close to production and there doesn't seem to be a workaround for this when deploying to a device.
@Thomas101 @satya164 Any ideas? Solution doesn't seem to work for RESPONDER_INACTIVE_PRESS_IN to RESPONDER_ACTIVE_LONG_PRESS_IN error.
:/
@aprct we found it only happens when remote debugging is enabled. Doesn't seem to happen when run under production mode
@Thomas101 Sweet. Thanks for the quick reply. Fingers crossed!
I'm just confirming that this is still an issue.
@Thomas101 I get this when running on the device, without remote debugging enabled
I'm getting it remote debugging on a physical iphone
Still an issue, I hope this can be solved. I get it on an Android physical device with debugging mode on (not sure if it happens on production mode).
Just started getting this after upgrading to React Native 0.30 (never saw it before that). Happens on a physical Android phone (Nexus 5X) when running in chrome debug mode. As other have said, it doesn't happen on ever tap, even if pressing for a long time.
@matto1990, usage the Network Time both on device and pc fixed this issue for me
Hi I am not really sure if this is an issue or not, but I thought i posted here so if anyone have the same problem, they know what was going on.
Apparently if you render some touchablebutton to be like this
you will run into this error very frequently
To solve the problem just wrap the text inside the touchableopacity/touchablehighlight with a child view like this
and seems to not run into that error anymore.