Skip to content

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

@samhunta

Description

@samhunta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions