-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
App crashes when touching screen with 3 fingers on some OnePlus, Oppo, Xiaomi, Samsung devices #15059
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
any solution for this problem??? i got the same problem with CRNA application, my application crash when try to take a screen shot wit 3 fingersgesture... |
This comment has been minimized.
This comment has been minimized.
This is happening more and more frequently. Here's a couple of stack traces: https://sentry.io/share/issue/be6ff067877948cb9f68d1ef66c7082b/ The error appears to be happening in Libraries/Renderer/src/renderers/shared/shared/event/eventPlugins/ResponderTouchHistoryStore.js around line 203. Here are devices we are seeing:
|
The issue also persists on One Plus 5 phone (A5000, Android 7.1.1). See issue -> expo/expo#1223 |
This comment has been minimized.
This comment has been minimized.
This file is no longer (as of 3 days ago?) in React Native master. There seems to have been a major reorg due to React 0.16/Fiber(?) and the code for ResponderTouchHistoryStore is now in https://github.com/facebook/react-native/blob/13829751b11330f8e1400c5c70c59c49ac2f091f/Libraries/Renderer/ReactNativeRenderer-prod.js We haven't tested yet to see if the behavior is different, but any patches would definitely have a new target. |
Ok, I have the same problem so I checked it out to try to find a solution. I figured out that:
What do you think? Can that changes be proposed as a solution? |
@gregoriohc in your testing, is this actually causing a crash or a failure in RN apps or is it simply that the logging is set to console.error? I was under the impression this was causing a crash in Android RN apps? |
@ghidinelli It's only that logging is set to console.error, that's the reason that I'm suggesting the change only in the dev file, because when you use Expo it shows console errors on that full red screen, so you can't capture an screenshot using the three fingers gesture. |
@gregoriohc it isn't OnePlus only - see my list of devices we have seen this with at #15059 (comment). FWIW, we don't use Expo in our builds. I'm in favor of changing it from error to warn. @brentvatne - if a PR changing the log from error to warn was submitted, would you accept? |
@ghidinelli I agree with you. But changing from |
working for oneplus 7 pro thanks mate |
I've been looking at this on my Oneplus 6. If three finger screenshots are enabled, Android is firing two touchstart events, then a touchcancel with three touches. I can see in logcat that it gives the error I would suggest that the best approach here is to be more forgiving on these kind of touchcancel events. Is there a reason we have to throw an error? It isn't something that the developer can do anything with. I'd argue that particularly with touchcancel events, we should silently ignore if it tries to cancel an unknown touch. Even if we restrict it to cases where there are more than two touches it would solve this. If it's agreed that we should do this, I'm happy to do a PR to fix it. |
I think the simplest solution here would be to change this to a I'm going to be bold and open a PR to do this. The main drawback here is that it's still going to give warnings for what is an OS bug, so we could consider ignoring it silently if it's a touchCancel event. I could add this if there's an agreement that this is the best approach. I don't think there's a problem using a "temporary fix" like this when the underlying problem is an OS bug that we can't fix. |
I completely agree with you but I'm afraid not everyone does so. I sincerely hope your pr makes it through! perhaps some kind of state needs to be cleared when this happens to prevent further instability.
|
@ThaJay I hope so too. The problem here is that this is an OS bug. We can't do anything except work around it. Even if there were a fix available for the underlying bug, we'd still need to be able to handle cases where the fix wasn't applied. In any case, this is currently the only touch error that gets a I think we're ok without clearing state. By its nature, this error only happens when all of the touches have been ended. The whole problem is that we don't have any more touches to cancel. |
this worked for me console.reportErrorsAsExceptions = false. I have written in root file that is in index.js file |
@vikassahutech |
Its work well |
Would this result in some other exceptions not getting reported that should be? |
The fix for this has now been merged into React, so hopefully we can close this soon. |
hei,guys, you also can report errors to sentry
|
@ascorbic can you add a link to PR with this fix? |
@AleksandrZhukov It's the one referenced just above: facebook/react#16750 |
This issue can be closed now. I am getting no crash when I am touching screen with 3 fingers in OnePlus device. I am using RN version 0.61.4 |
The problem still persists for me in RN version 0.61.4. |
hello everyone , can any have any update on this issues, i tried everything still getting crashed in released mode |
console.reportErrorsAsExceptions = false; is the only solution right now, but if exists another problem/error it's not show up. |
The same problem in MI 8 Lite, android 9 PKQ. Any solution? |
Happening in Redmi Note 8. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
is there any update on this issue ? Its marked as a good first issue , is it available to pick ? |
@arjun1194 @cortinico This issue should be closed. It was fixed with facebook/react#16750 (see more info at #26170 (comment)). Thanks a lot. Relevant flutter#20517 (comment) |
We're closing it because it's fixed, as we can see from this comment. |
Error: "Cannot record touch end without a touch start"
Environment
[skip envinfo]
Issue has been reproduced as far back as react-native@0.45.1, and up through react-native@0.57.1.
Steps to Reproduce
Expected Behavior
App does not crash
Actual Behavior
Red screen error
Reproducible Demo
Any project on this phone with this gesture
Known Affected Devices
OnePlus:
Oppo:
Samsung:
Wiko:
Xiaomi:
The text was updated successfully, but these errors were encountered: