-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Touchable components stop responding randomly #36710
Comments
|
I think it will be difficult to get attention from the maintainers without a) providing a test case, b) steps to reproduce the issue in the test case, and c) verifying the issue is still present after upgrading to the latest version of React Native |
Hi @necolas thanks for the feedback, however you really should not close this issue..... other users have mentioned similar problems, please do not ignore this issue just because it happens intermittently. a) As I said, the problem cannot be reliably reproduced at all I provided as much information as I could possibly gather from this and hoped it could be helpful to others too. |
Hey. I'm not ignoring it, I'm telling you what this issue needs before engineers at Meta can spent time looking into it. |
|
For what its' worth, I'm also experiencing it, and it's very hard to understand how to give a reproducible example - because it doesn't happen reliably. But in an intermittent fashion onPress just won't fire for a bunch of times in a row. I am also using maps. |
I can provide a case:
Try clicking on the right part of the red area. It worked normally when I disabled the new architecture! |
@necolas looks like we have a reproducible example :) |
Hmm I am not using the new architecture though, and this problem seems to have happened for a long time (before new architecture existed). We tried this example on our project and it doesn't reproduce the issue unfortunately... Any thoughts would be appreciated. |
Sorry, this is my problem.This is a bug in |
@NiuGuohui can you please share a link to that issue (if there is one) for future readers? |
In my case, I want to achieve a similar effect to iOS's UITableView (such as horizontally laid out tabs). When I use this pattern nested in a native-stack, I encounter a similar issue. I think this might be a minor issue with the react-native-screens library. see here
|
I am using @necolas would be very nice if someone from contributors acknowledges the existence of this, because it makes the app I'm working on have quite degraded UX. You've had a few reports here already? |
We are experiencing this problem in some of our other apps too, this time with no map component mounted whatsoever (disproving my theory above). User is unable to interact with any touchable component, but the app is clearly not frozen and scroll gestures work fine. Closing and reopening the app mysteriously fixes the problem. test.mp4I'm surprised there aren't many more people complaining about this issue, it certainly happens in many other cases. I can only assume people reopen the app without thinking about it much. Here are the dependencies for the project:
Thoughts? |
Hello, Guys, using React-Native 0.71.8 When using new architecture the touchable works sometimes and sometimes it wont. The moment I build using old architecture it works perfectly. Please help us @necolas |
I tried to help by pointing out that a reproducible example will help the maintainers (not me) more easily look for the root cause of the problem. |
|
@cortinico
|
@vrgimael Has this issue been resolved by any chance? |
@devym-37 please open a new issue + provide:
|
@cortinico |
@amanShukla-amber you can try and apply only this PR to the current version of |
@vrgimael thank you for the detailed post man. We too have been struggling for months. Any chance you guys found out the issue? |
"Hi @spyshower, We've been dealing with a similar issue for quite some time. Luckily, after thorough investigation, we managed to resolve it by upgrading the react-native-screen package to its latest release, version 3.31.1. Hopefully, this solution works for you too!" |
I'm using "react-native-screens": "~4.1.0" but still facing the same issue. onPress works but i need to click twice. This is very annoying. onPress works perfectly on android emulator but not on physical device. |
@sakibb7 the latest version of Screens is 4.4.0. Are you using RN Gesture Handler as well? If not, can you try to use it and report if the problem persists? |
This issue should be re-opened, this is driving us crazy, it is random, we tried using different type of touchable to no luck. Was happening on an old version, so we updated to the latest and it still happens. |
@Atom1er have you checked for any memory leaks? It has been over a year but that ended up being a part of the issue I was having back then. Touchables would stop being responsible after a while due to the memory leak |
I am investigating very, very random stop on onPress for a long time. I had to invent the concept of hope to survive. onPress => Taps => Stop working. Google Pixel 7 phone, no error, nothing sus in the logs. I am using BaseButton ( |
Do anybody anyhow anyway anychance has an estimation of a real-life production impact of this issue? Is it in the ranges of 1%, 10%, *? |
Im only replying because your comments made me laugh. If you ask in how many devices it happens, definitely <1% |
Hi everyone, Our team hasn’t come across these issues since we decided to revamp the UI/UX for the entire app. We’re still looking into the root cause, but we suspect it might be related to memory leaks. What’s weird is that while it happens randomly, it always affects the same button on real devices but doesn’t show up on emulators. We also decide to just downgrade some of dependencies.
|
@Atom1er @Siti-Shaufi I am willing to help you out with this problem if you are interested. While we hadn't fixed the problem in the company I was working for at the moment, I do have some insights and potential solutions that might work. |
I have some progress finding the cause. At least SOME parts of the app were freezing due to
I was able to reliably reproduce this error by switching keys from random to constant values. I have parts of the app where presses stops working where key value does not seem to be the issue. Will keep pushing (ha-ha). |
Similar issue is hapenning to me, but only when phone goes to sleeps for some time, then I wake the phone up and suddenly nothing works, except scrolling and after some the the app crashes. Even AppState change is not called... |
Yep, exact same problem. |
No man, read this thread. If someone wants to setup a chat/call so we can actually find out whats happening with this crazy issue instead of just reporting it, I will help. |
We encountered a similar issue where touchables were not responding as expected. After extensive debugging, we discovered that the native thread was busy handling other tasks, which caused the press event callback to not propagate from the native side to the JS layer. As a result, the actions or code written in JS were not being executed. To resolve this, we optimized our screen to reduce the workload on the native thread, and since then, we haven't observed this issue. This was tested on React Native version 0.71. |
I've been looking into the issue from I've tried both reproductions provided above:
and my own playground. I've used Xiaomi Redmi Note 8 Pro with Android 11 (5 yo device) and failed to reproduce for ~20 min. In case anyone is able to reproduce it / record a video of the bug in your app / provide some other useful info - please do (together with versions of used packages). |
Description
We've been experiencing this issue in a couple of our apps, it's kinda driving us mad.
Basically, sometimes, completely unpredictably the touchable areas just stop responding.
We tried reproducing this consistently in several different ways but just couldn't pin point what causes it to happen and in which devices. It happens on both iOS and Android, and also in debug or release mode. Generally, it looks like it only happens after the user has been using the app for a little while (10+ minutes). It seems to happen in any button in the app randomly, and some times it also seemingly randomly starts working again. Closing and opening the app again always fixes the problem.
We had clients complain about it in quite a few occasion, but some of our public testers rarely ever experience this either which makes it even harder to understand.
I spent a very long time investigating it over literally the past entire year, but it's really really hard to debug, because when the issue happens in debug mode, anything you do in the code that causes hot reloading actually "fixes it", making it almost impossible to investigate.
I have added lots of debugging tools to try and understand what happens though, I got a few bits of information that might be able to help.
As far as I can tell, this has always happened - it's so rare that I was not very bothered by it. But as our apps grow and have a larger userbase now, this issue is coming up more frequently and we need to figure it out some time soon.
I suspect this is not too much of a problem in other apps because normally if a problem like this happens you'd just reopen the app and everything is fine again. However, it has already caused bad reviews in the App Store because our app's functionality is really time sensitive and if users aren't able to interact with the screen it's kinda problematic.
I've read all issues related to several relevant keywords in this repo (like touchable, onpressin, not responding, etc...), and there are a few issues that mention similar behaviour #34999 #36063 but none have barely any responses (possibly due to the rare nature of the problem).
Any help would be really appreciated. Please let me know if I can provide any other useful information.
Thanks
React Native Version
0.70.6
Output of
npx react-native info
System:
OS: macOS 13.2.1
CPU: (10) arm64 Apple M1 Max
Memory: 192.88 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.19.1 - ~/.yarn/bin/yarn
npm: 7.24.2 - ~/CodeLeap-Software/Client-Projects/x-follo-mobile/mobile/node_modules/.bin/npm
Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 26, 28, 29, 30, 31, 33
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0
System Images: android-30 | Google Play ARM 64 v8a, android-31 | ARM 64 v8a, android-31 | Google APIs ARM 64 v8a, android-31 | Google Play ARM 64 v8a, android-Sv2 | Google APIs ARM 64 v8a, android-Sv2 | Google Play ARM 64 v8a
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /Users/victor/Library/Java/JavaVirtualMachines/azul-11.0.13/Contents/Home/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^18.2.0 => 18.2.0
react-native: ^0.70.6 => 0.70.7
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
The hardest thing about this is that it can't be reliably reproduced. See description above.
Snack, code example, screenshot, or link to a repository
Example in our own app (that's in the App Stores too), a client sent us this recording of it happening in practice. Looking back now I should have taken more recordings of it but I'm not sure it would be of any use too.
Screen_Recording_20230219_103121_Becon.mp4
EDIT 30/05/23 -> Here are the dependencies for this project:
The text was updated successfully, but these errors were encountered: