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

Comments

@samhunta
Copy link

@samhunta 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

@facebook-github-bot facebook-github-bot commented Feb 8, 2016

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 casperin commented Feb 9, 2016

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

@grabbou
Copy link
Collaborator

@grabbou 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 askday commented Apr 28, 2016

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

@grabbou
Copy link
Collaborator

@grabbou 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 Apr 28, 2016
@radek1991
Copy link

@radek1991 radek1991 commented Aug 22, 2016

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

@stief510 stief510 commented Aug 31, 2016

+1

5 similar comments
@charlesLin
Copy link

@charlesLin charlesLin commented Sep 7, 2016

+1

@pawellewandowski
Copy link

@pawellewandowski pawellewandowski commented Sep 20, 2016

+1

@minhchu
Copy link

@minhchu minhchu commented Sep 22, 2016

+1

@gillestasse
Copy link

@gillestasse gillestasse commented Sep 22, 2016

👍

@Jarred-Sumner
Copy link

@Jarred-Sumner Jarred-Sumner commented Sep 24, 2016

👍

@StevenKing9
Copy link

@StevenKing9 StevenKing9 commented Oct 3, 2016

+1

8 similar comments
@bucketclan
Copy link

@bucketclan bucketclan commented Oct 25, 2016

+1

@myseven
Copy link

@myseven myseven commented Oct 26, 2016

+1

@SerzN1
Copy link

@SerzN1 SerzN1 commented Nov 9, 2016

+1

@johnjichaowei
Copy link

@johnjichaowei johnjichaowei commented Nov 13, 2016

+1

@berkaybeyaz1
Copy link

@berkaybeyaz1 berkaybeyaz1 commented Nov 16, 2016

+1

@dadbob
Copy link

@dadbob dadbob commented Nov 16, 2016

+1

@nadeermalangadan
Copy link

@nadeermalangadan nadeermalangadan commented Nov 19, 2016

+1

@ouabing
Copy link

@ouabing ouabing commented Nov 28, 2016

+1

@nikolal
Copy link

@nikolal nikolal commented Nov 29, 2016

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

@chandlervdw
Copy link

@chandlervdw chandlervdw commented Nov 30, 2016

+1

5 similar comments
@helloncanella
Copy link

@helloncanella helloncanella commented Dec 1, 2016

+1

@Yangzhedi
Copy link

@Yangzhedi Yangzhedi commented Dec 6, 2016

+1

@wasa4587
Copy link

@wasa4587 wasa4587 commented Dec 7, 2016

+1

@pyshchyk-o
Copy link

@pyshchyk-o pyshchyk-o commented Dec 7, 2016

+1

@haloJim
Copy link

@haloJim haloJim commented Dec 8, 2016

+1

@nikolaystrikhar

This comment was marked as spam.

@windhost
Copy link

@windhost windhost commented Dec 25, 2017

+1 for 0.48.3

@JaEdmuva
Copy link

@JaEdmuva JaEdmuva commented Dec 27, 2017

+1 on 0.51.0

@Fortidude
Copy link

@Fortidude Fortidude commented Dec 29, 2017

+1 is nice, love it. Happens of 0.50

@TimorYang
Copy link

@TimorYang TimorYang commented Jan 3, 2018

+1

1 similar comment
@giovanniRodighiero
Copy link

@giovanniRodighiero giovanniRodighiero commented Jan 9, 2018

+1

@iotdog
Copy link

@iotdog iotdog commented Jan 14, 2018

+1

with react-native 0.51.0

@basbase
Copy link

@basbase 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 was marked as spam.

5 similar comments
@roshanpal
Copy link

@roshanpal roshanpal commented Feb 4, 2018

+1

@MedinaGitHub
Copy link

@MedinaGitHub MedinaGitHub commented Feb 7, 2018

+1

@sizovilya
Copy link

@sizovilya sizovilya commented Feb 7, 2018

+1

@anwarhamr
Copy link

@anwarhamr anwarhamr commented Feb 8, 2018

+1

@vvavepacket
Copy link

@vvavepacket vvavepacket commented Feb 11, 2018

+1

@xemasiv
Copy link

@xemasiv 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 was marked as spam.

@sandrojurado
Copy link

@sandrojurado sandrojurado commented Feb 22, 2018

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 was marked as spam.

1 similar comment
@brzonsea
Copy link

@brzonsea brzonsea commented Mar 1, 2018

+1

@b45ch1
Copy link

@b45ch1 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

@Benzer1406 Benzer1406 commented Mar 8, 2018

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 was marked as spam.

1 similar comment
@abaddonGIT
Copy link

@abaddonGIT abaddonGIT commented Mar 12, 2018

+1

@guitar9
Copy link

@guitar9 guitar9 commented Mar 18, 2018

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

@remigarcia
Copy link

@remigarcia remigarcia commented Mar 21, 2018

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

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

This comment was marked as spam.

1 similar comment
@KoreSamuel

This comment was marked as spam.

@hramos
Copy link
Contributor

@hramos 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.