-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Error: Style property 'shadowOffset' is not supported by native animated module #4224
Comments
Same error with Chip with mode='outlined' |
index 229f4e5..1c5bbdf 100644
--- a/node_modules/react-native-paper/src/components/Chip/Chip.tsx
+++ b/node_modules/react-native-paper/src/components/Chip/Chip.tsx
@@ -215,20 +215,22 @@ const Chip = ({
const handlePressIn = useLatestCallback((e: GestureResponderEvent) => {
const { scale } = theme.animation;
onPressIn?.(e);
+
Animated.timing(elevation, {
toValue: isV3 ? (elevated ? 2 : 0) : 4,
duration: 200 * scale,
- useNativeDriver: true,
+ useNativeDriver: false,
}).start();
});
const handlePressOut = useLatestCallback((e: GestureResponderEvent) => {
const { scale } = theme.animation;
onPressOut?.(e);
+
Animated.timing(elevation, {
toValue: isV3 && elevated ? 1 : 0,
duration: 150 * scale,
- useNativeDriver: true,
+ useNativeDriver: false,
}).start();
}); This patch package fixed the problem for me. The "elevation" animated value here is not used for ios, it's only used for android, so you can use |
Same issue here. Upgrading from RN 0.71.x to 0.73.0. React Native Paper 4.12.5 |
I can confirm this is happening after upgrading to react-native 0.73. |
I could reproduce the issue on react-native 0.73 with react-native-paper 5.11.1 as well. The issue is related to the Chip components. |
Maybe shadowOffset is not valid anymore on react-native 0.73, maybe fix it on 4.12.6 and 5.11.1 |
Turns out disabling useNativeDriver for the Button component still crashes in production but works in dev. Works fine for both modes on Chip. Any idea why? |
I'm running the latest version of this library 5.11.4 with RN 0.73 and getting the same issue on iOS as well. |
This is critical |
Any updates on this please? |
It should be fixed in |
Thank you @lukewalczak ! |
I'm running the latest version of this library 5.11.5 with RN 0.73.1 including "expo": "49.0.8" and getting the same issue on iOS. I tried to print "Platform.constants.reactNativeVersion.minor" and getting below response in console. output: {"major": 0, "minor": 72, "patch": 4} |
i am running react react version "^0.72.0", and react native paper ^4.12.5 still having same app crash issue |
Double check you are on 4.12.6 because it is fixed. |
I had the same issue even after updating to 5.12.3 and clearing the bundler cache resolved the issue for me |
I am running on latest version and the issue still appears. After explicitly changing the Chip to useNativeDriver: false, it worked again. Might want to check in again. I am using expo and tried the approach to clear cache first. const handlePressIn = useLatestCallback((e: GestureResponderEvent) => {
const { scale } = theme.animation;
onPressIn?.(e);
Animated.timing(elevation, {
toValue: isV3 ? (elevated ? 2 : 0) : 4,
duration: 200 * scale,
useNativeDriver: false,
}).start();
});
const handlePressOut = useLatestCallback((e: GestureResponderEvent) => {
const { scale } = theme.animation;
onPressOut?.(e);
Animated.timing(elevation, {
toValue: isV3 && elevated ? 1 : 0,
duration: 150 * scale,
useNativeDriver: false,
}).start();
}); |
using 5.12.3 - Having the same issue when buttons are set to mode = ELEVATED. Still kinda new with RN, what is 'Chip' and where can I find it. Thanks. |
we're on RNP 5.11.3 node_modules/react-native-paper/src/components/Chip/Chip.tsx We're using patch-package to fix it for now, not entirely sure the latest version fixes it but will try later. |
5.12.3 is working for us |
Note that if you are running an Expo development build, you will need to rebuild with the latest react native version in order for |
I had the same issue with Expo 51, I removed the |
Works with Expo 51, RN 0.74 Thank you @farmhutsoftwareteam |
Current behaviour
On rn 0.73.0 when using a rn-paper button with mode='contained', pressing on the button causes a crash with the listed error. Any other mode works fine. Only tested on Android.
Worked fine before I upgraded to rn 0.73.0.
Expected behaviour
No error
How to reproduce?
Tap a button with mode='contained'.
What have you tried so far?
rn-paper v4 and v5
disabling useNativeDriver in node_modules/react-native-paper/src/components/Button/Button.tsx makes it work but obviously not ideal.
Your Environment
The text was updated successfully, but these errors were encountered: