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

RN android lost touches with E/unknown: Reactions: Got DOWN touch before receiving or CANCEL UP from last gesture #17073

Closed
sneerin opened this issue Dec 5, 2017 · 20 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@sneerin
Copy link

sneerin commented Dec 5, 2017

Is this a bug report?

yes, bug

Environment

Environment:
Environment:
OS: macOS High Sierra 10.13.1
Node: 8.4.0
Yarn: 0.17.8
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.48.4 => 0.51.0
Target Platform: Android (7)

Steps to Reproduce

Any overlay cause touch not working for all native and rn views with error:
E/unknown: Reactions: Got DOWN touch before receiving or CANCEL UP from last gesture
JSTouchDispatcher.java causing this handler message

Expected Behavior

touches remain working

(Write what you thought would happen.)
something deep in the android rn implementation happened.

Actual Behavior

touches doesn't work on android

Reproducible Demo

https://www.npmjs.com/package/react-native-loading-spinner-overlay use this component, after it loads several times the app become unresponsible, but not only this one.
UPDT: reproduced in both dev and prod modes.
UPDT: the same issue is happening when

import { ProgressDialog } from 'react-native-simple-dialogs';

and then showing it several times really frequently.

@mercedesbenz00
Copy link

mercedesbenz00 commented Dec 11, 2017

same issue to me too.

@binlaniua
Copy link

the same to me.

@sneerin
Copy link
Author

sneerin commented Dec 29, 2017

before I was thinking it's only dev related, but right now in prod mode it's not working, it's also blocked touches for also native ui, actually it makes all application not working.
after touch become not working I've got this error:
Got DOWN touch before receiving UP or CANCEL from last gesture

@RajeshBatth
Copy link

Even i'm getting this issue in v0.51.0, any update on this?

@daimashenjing
Copy link

same issue to me too.

@daimashenjing
Copy link

image

@j4nk3e
Copy link

j4nk3e commented Jan 23, 2018

I had the same issue. I think it was caused by the Spinner getting initialized but not being drawn or attached because it was already hidden again when the view becomes visible.
I solved it by setting the visibility of the spinner through a private observable:

export class BaseViewContainer extends React.Component<Props, State> { 
    private dispose: any;

    //...

    render() {
        return (
            <View /*...*/>
                 <Spinner visible={this.props.showSpinner}>  
                //...
                </Spinner>
                {this.props.children}
            </View>
        );
    }
}

// ...and in the props
    @computed get showSpinner() { 
        return this.message !== undefined; 
    } 

Can you provide some code examples of your problems? Maybe this helps finding the real issue.
/edit: using @computed instead of @observable, which causes mobx.strict to break

@daimashenjing
Copy link

测试了一下果然如@juumixx 所说一样 当一个控件被显示,显示操作还没执行完成,控件没有完全显示出来,这时设置隐藏就会导致这个bug,卡住整个app, 强制结束重启后才能继续使用.
我在关闭对话框时加入InteractionManager就没有出现这个问题
image

@j4nk3e
Copy link

j4nk3e commented Jan 26, 2018

Ok actually it was still broken. Even the InteractionManager.runAfterInteractions() hack didn't work.
Found a workaround by blocking all the actions during a navigation change. So maybe it is also related to react-navigation.

@FlorianBergmann
Copy link

I have the same issue but I am not using the Spinner library. Instead I am using the ActivityIndicator but even after removing it, I still get this error.

So far I can reproduce it by starting the app and quickly pressing the button that opens the navigation drawer (my app is for Android) of react-navigation. This usually triggers the error and I can only get rid of it by killing the app.

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Feb 24, 2018
@daimashenjing
Copy link

我在较差的手机上还是出现了 我怀疑和 modal 有关系

@ptvandi
Copy link

ptvandi commented Mar 17, 2018

I am still receiving these errors in 0.53.3.

@Qiu800820
Copy link

I switched to dev mode, this issues never appeared

@mateoc10
Copy link

@FlorianBergmann could you solve it? I am having the same issue. I'm going crazy!

@vadermemo
Copy link

vadermemo commented Jun 3, 2018

Same issue here, even with

"react": "16.3.1",
"react-native": "0.55.4",

Just on Android! not on iOS.

@mateoc10 Sigues con el mismo problema?

@lin-xin
Copy link

lin-xin commented Jun 14, 2018

+1

@IndujaVJ
Copy link

@Qiu800820 Do you still have the issue?

@Qiu800820
Copy link

@IndujaVJ Model show or hide action I use setState(newState, callback),Never again this issue

@FlorianBergmann
Copy link

We were able to get rid of it as well. Our issue seemed to relate to our implementation of Dialogs with Modal view. We made several changes and I am not quite sure what fixed it in the end. Originally we handled the visible state of the Modal from outside of our dialogs using the state of the parent. In our current implementation we instead have the visible state inside the dialog and change if from the parent by saving a reference and calling a method.

@mateoc10 sorry for the late reply.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 24, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests