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
Crash due to useNativeDriver true for tab animations with android 12 devices #11890
Comments
Hey @vibhor-d11! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro. The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue. You can provide a repro using any of the following:
A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected. Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information. You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro. |
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
@vibhor-d11 how did you disable useNativeDriver for android 12 devices only? Users are experiencing this issue in random parts of my app. But I think it happens when navigating to a screen. There is an open issue for it here. This is the crash I get:
|
We disabled it using
|
The error is related to the Animated component of React Native. Wouldn't it be better to remove its usage and utilize the Animated from react-native-reanimated? After all, there's still no solution for the error in the Animated component of React Native. |
Current behavior
Dear Maintainers,
I hope this message finds you well. I am writing on behalf of Dream11 to bring to your attention an issue we've encountered while using react-native-tab-view library.
Issue Overview:
Currently their is no provision to enable/disable useNativeDriver for react native tab view. For tab animations
useNativeDriver
is set to true i.e they run on UI thread by default. We encountered some crashes related to Animated node that occurred only on Android 12 devices and after digging into it we get to know it is related to useNativeDriver set to true for tab animations. Also their is an open issue in react-native related to this crash: Link. So we added a patch inreact-native-tab-view
library for disabling useNativeDriver for devices having Android 12 and that reduces the crash rate for that crash with very few instances now. We have been using this for almost a year and haven't faced any issue with our app exposed to more than 20 million users. So we though of adding support for enable/disable useNativeDriver for react-native-tab-view as a prop exposed frommaterial-top-tabs
as it internally usesreact-native-tab-view
Expected behavior
Following PR addresses the fix to add optional prop
useNativeDriver
formaterial-top-tabs
which internally passes it toreact-native-tab-view
to enable/disable useNativeDriver for tab animations.Reproduction
Their is not defined steps to reproduce it but we have many instances of this crash on our firebase portal. Many were related to react native tab view, after adding the patch for setting useNativeDriver to false, its instances reduced to none. This is the stacktrace for the crash.
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: