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

Attempted to transition from state RESPONDER_INACTIVE_PRESS_IN to RESPONDER_ACTIVE_LONG_PRESS_IN, which is not supported. #5823

Closed
samhunta opened this issue Feb 8, 2016 · 162 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@samhunta
Copy link

samhunta commented Feb 8, 2016

Similar to #1693. It seems to be an issue with the Touchable component with Chrome Debugging on React Native 0.19.0.

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.

stack:
reactConsoleError                                 @ ExceptionsManager.js:76
console.error                                     @ YellowBox.js:49
TouchableMixin._handleLongDelay                   @ Touchable.js:575
JSTimersExecution.callbacks.(anonymous function)  @ JSTimers.js:47
JSTimersExecution.callTimer                       @ JSTimersExecution.js:69
JSTimersExecution.callTimers                      @ JSTimersExecution.js:92
__callFunction                                    @ MessageQueue.js:183
(anonymous function)                              @ MessageQueue.js:87
guard                                             @ MessageQueue.js:41
callFunctionReturnFlushedQueue                    @ MessageQueue.js:86
onmessage                                         @ debuggerWorker.js:39

The code that produces this error is from a freshly started application using a TouchHighlight component:

class App extends Component {
  constructor() {
    super()
    this.state = {
      testText: ''+Math.random()
    }
  }

  _updateTouch(e) {
    this.setState({testText: ''+Math.random()})
  }

  render() {
    return (
      <View style={styles.container}>
        <Text>
          {this.state.testText}
        </Text>
        <TouchableHighlight onPress={this._updateTouch.bind(this)}>
          <Image
            style={width: 100, height: 100}
            source={{uri: 'http://facebook.github.io/react/img/logo_og.png'}}
          />
        </TouchableHighlight>
      </View>
    );
  }
}

P.S. Is there a better way to copy a stacktrace? I'm just copying from the Chrome dev tools console

@facebook-github-bot
Copy link
Contributor

Hey Dyscrete, 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.

  • 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!

@casperin
Copy link

casperin commented Feb 9, 2016

I get the same error when testing on an iPhone6 (9.1)

@grabbou
Copy link
Contributor

grabbou commented Apr 24, 2016

How's this issue different from #1693 ? In general, the issue seems to be the same. Can we close it and continue further investigation up there as it has more details?

@askday
Copy link

askday commented Apr 28, 2016

+1
I also get this problem,and It's happened frequently switch navigator

@grabbou
Copy link
Contributor

grabbou commented Apr 28, 2016

Going to close it as @askday also put better repro in the #1693. Please reopen if OP mentioned something different.

@grabbou grabbou closed this as completed Apr 28, 2016
@radek1991
Copy link

Same error for me.
React 0.31
Chrome debug.
In normal use there is no problem.

console.error: "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."

Object.console.error
YellowBox.js:60
Constructor._handleLongDelay
Touchable.js:595
JSTimersExecution.callbacks.(anonymous
index.ios.bundle?platform=ios&dev=true&minify=false:8476:13
Object.callTimer
JSTimersExecution.js:84

JSTimersExecution.js:119
Object.callTimers
JSTimersExecution.js:119
MessageQueue.__callFunction
MessageQueue.js:204

MessageQueue.js:95

@stief510
Copy link

+1

5 similar comments
@charlesLin
Copy link

+1

@pawellewandowski
Copy link

+1

@minhchu
Copy link

minhchu commented Sep 22, 2016

+1

@gillestasse
Copy link

👍

@Jarred-Sumner
Copy link

👍

@StevenKing9
Copy link

+1

8 similar comments
@bucketclan
Copy link

+1

@myseven
Copy link

myseven commented Oct 26, 2016

+1

@SerzN1
Copy link

SerzN1 commented Nov 9, 2016

+1

@johnwei2019
Copy link

+1

@berkaybeyaz1
Copy link

+1

@dadbob
Copy link

dadbob commented Nov 16, 2016

+1

@nadeermalangadan
Copy link

+1

@ouabing
Copy link

ouabing commented Nov 28, 2016

+1

@nikolal
Copy link

nikolal commented Nov 29, 2016

I am also having this error, but only on Android. IOS is working as expected.

@chandlervdw
Copy link

+1

5 similar comments
@helloncanella
Copy link

+1

@Yangzhedi
Copy link

+1

@wasa4587
Copy link

wasa4587 commented Dec 7, 2016

+1

@pyshchyk-o
Copy link

+1

@haloJim
Copy link

haloJim commented Dec 8, 2016

+1

@nikolaystrikhar

This comment has been minimized.

@toearth
Copy link

toearth commented Dec 25, 2017

+1 for 0.48.3

@JaEdmuva
Copy link

JaEdmuva commented Dec 27, 2017

+1 on 0.51.0

@Fortidude
Copy link

+1 is nice, love it. Happens of 0.50

@TimorYang
Copy link

+1

1 similar comment
@giovanniRodighiero
Copy link

+1

@iotdog
Copy link

iotdog commented Jan 14, 2018

+1

with react-native 0.51.0

@basbase
Copy link

basbase commented Jan 17, 2018

I 'fixed' this by manually setting the device time in Android. Make sure the new time will equal that of your computer (aim for the next minute change), confirm the time change on the very same second your computer time will change to the next minute.

@psivanov

This comment has been minimized.

5 similar comments
@roshanpal
Copy link

+1

@MedinaGitHub
Copy link

+1

@sizovilya
Copy link

+1

@anwarhamr
Copy link

+1

@vvavepacket
Copy link

+1

@xemasiv
Copy link

xemasiv commented Feb 14, 2018

Solution to me was to

  1. Ensure phone and pc got same timezone
  2. Manually update time on pc: Date and Time -> Internet Time tab -> Change Settings -> Update Time
  3. Toggle-on auto time update in android settings, then toggle it off
  4. Restart the app

@PerspectivesLab

This comment has been minimized.

@sandrojurado
Copy link

In Libraries\Components\Touchable\TouchableHighlight.js replace

touchableGetLongPressDelayMS: function() {
return this.props.delayLongPress;
},

with

touchableGetLongPressDelayMS: function() {
return this.props.delayLongPress === 0 ? 0 :
this.props.delayLongPress || 500;
},

It resolved the problem for me.

@filipemerker

This comment has been minimized.

1 similar comment
@brzonsea
Copy link

brzonsea commented Mar 1, 2018

+1

@b45ch1
Copy link

b45ch1 commented Mar 4, 2018

I had the same issue on Android when
a) my mobile phone was connected to my PC via USB
b) I used remote debugging via network

Disconnecting USB resolved the issue. No idea if there is a causal relationship, though.

Edit: After getting additional issues with async timeouts I checked the current time on PC and Android device via

adb shell date && date.

There was a 5 seconds discrepancy. One might be tempted to guess that there is an inconsistency in how RN handles the current time when debugging remotely.
Via

curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g'

I pinned down the culprit in my case: the system time of my Android device was off by 5 seconds. Rebooting the Android device fixed the discrepancy.

@Benzer1406
Copy link

I just verified the time from the Android device and my Mac with : adb shell date && date. It was differing by more than 2 minutes. Then I activated the automatic time setting on my Android device and ran the same command again and voilá the time was syncronized, but the time zone was not the same even though on both (Android device and Mac) the time zone setting was automatic. So I deactivated the automatic time zone setting on my Android device and set it manually to the corresponding and the error disappeared.

@pacozaa

This comment has been minimized.

1 similar comment
@abaddonGIT
Copy link

+1

@guitar9
Copy link

guitar9 commented Mar 18, 2018

automatic time setting on android device and automatic time setting on computer solved the problem

@remigarcia
Copy link

on Ubuntu I synchronized system time with the current ADB time by doing :

sudo date +%T -s `adb shell date +%T`

@drpark

This comment has been minimized.

1 similar comment
@KoreSamuel

This comment has been minimized.

@hramos
Copy link
Contributor

hramos commented Apr 4, 2018

Locking due to repetitive +1 comments. A solution was posted a long time ago by @Larry-Liu2016 here. In summary, check the clock on your devices.

@facebook facebook locked as resolved and limited conversation to collaborators Apr 4, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests