Comments (24)
I am also getting this hard crashing issue and agree with the others that this issue started happening with 3.9.0
. This is my versions:
"react-native": "0.73.6",
"react-native-reanimated": "3.9.0", (also tried "3.10.0")
I have a feeling this issue could possibly be related to: #5274 (as that was added in 3.9.0
) since the crash stack references "shared element transitions". That being said, I tried upgrading the dependency requirements outlined in that PR to their latest versions as well:
"react-native-screens": "^3.31.1",
"react-native-gesture-handler": "^2.16.1",
...and that didn't seem to help matters. Still crashing on certain forward/back navigations (happens 100% of the time when clicking back button in nav header early after app launches).
This is a pretty serious issue! It's worse when you consider that apps that usereact-native-reanimated
have to update to at least 3.9.0
by May 1, 2024 to comply with the new Apple privacy requirements: #5819 (this was added in 3.9.0
)
Hoping the maintainers recognize this issue and work on a fix ASAP 🤞 . In the meantime, I have downgraded to 3.8.1
(last working version) and applied the following patch-package so that my team is not blocked from releasing app updates due to the new Apple privacy requirements:
diff --git a/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m b/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m
index 863c788..656a27a 100644
--- a/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m
+++ b/node_modules/react-native-reanimated/apple/sensor/ReanimatedSensor.m
@@ -48,7 +48,7 @@ - (bool)initializeGyroscope
[_motionManager
startGyroUpdatesToQueue:[NSOperationQueue mainQueue]
withHandler:^(CMGyroData *sensorData, NSError *error) {
- double currentTime = [[NSProcessInfo processInfo] systemUptime];
+ double currentTime = CACurrentMediaTime() * 1000;
if (currentTime - self->_lastTimestamp < self->_interval) {
return;
}
@@ -69,7 +69,7 @@ - (bool)initializeAccelerometer
[_motionManager startAccelerometerUpdates];
[_motionManager startAccelerometerUpdatesToQueue:[NSOperationQueue mainQueue]
withHandler:^(CMAccelerometerData *sensorData, NSError *error) {
- double currentTime = [[NSProcessInfo processInfo] systemUptime];
+ double currentTime = CACurrentMediaTime() * 1000;
if (currentTime - self->_lastTimestamp < self->_interval) {
return;
}
@@ -96,7 +96,7 @@ - (bool)initializeGravity
[_motionManager
startDeviceMotionUpdatesToQueue:[NSOperationQueue mainQueue]
withHandler:^(CMDeviceMotion *sensorData, NSError *error) {
- double currentTime = [[NSProcessInfo processInfo] systemUptime];
+ double currentTime = CACurrentMediaTime() * 1000;
if (currentTime - self->_lastTimestamp < self->_interval) {
return;
}
@@ -121,7 +121,7 @@ - (bool)initializeMagnetometer
[_motionManager
startMagnetometerUpdatesToQueue:[NSOperationQueue mainQueue]
withHandler:^(CMMagnetometerData *sensorData, NSError *error) {
- double currentTime = [[NSProcessInfo processInfo] systemUptime];
+ double currentTime = CACurrentMediaTime() * 1000;
if (currentTime - self->_lastTimestamp < self->_interval) {
return;
}
@@ -157,7 +157,7 @@ - (bool)initializeOrientation
[_motionManager startDeviceMotionUpdatesUsingReferenceFrame:(1 << _referenceFrame)
toQueue:[NSOperationQueue mainQueue]
withHandler:^(CMDeviceMotion *sensorData, NSError *error) {
- double currentTime = [[NSProcessInfo processInfo] systemUptime];
+ double currentTime = CACurrentMediaTime() * 1000;
if (currentTime - self->_lastTimestamp < self->_interval) {
return;
}
from react-native-reanimated.
@dan-trewin easy boi, this is open source software so instead of ranting open a PR and try to fix the issue.
i dont think he is ranting.. and as opposed to you, who acts like a cyber-judge he at least spent time on research and posted his findings here, and further more, your statment that its opensource means nothing... when library claims
that its "better than native animation " , people trust that and when SHTF like this, you , the author first of all have to take the responsibility, so from that angle he is also correct ... so why dont you, instead of judging people go ahead and open a PR??
from react-native-reanimated.
Same error here... crashes when navigating to other screens. I am not using this library, but its a dependency of react-native-reanimated-carousel, which I am also only using in one component deep down...
react-native-reanimated@^3.8.1:
version "3.9.0"
tmp fix => downgrading to ~3.8.1
from react-native-reanimated.
React native 0.74.1 solved this problem for me.
(with v3.10.0)
from react-native-reanimated.
same problem !!!
"react-native": "^0.74.0",
so for ios
this will work react-native-reanimated@^3.8.1
and for android
this will work [email protected]
but this is not a solution can someone provide a better solution for this problem please
from react-native-reanimated.
@dan-trewin easy boi, this is open source software so instead of ranting open a PR and try to fix the issue.
from react-native-reanimated.
PR with a temporary fix:
from react-native-reanimated.
i am also getting same , as soon as user logs into the application app crashes ... same happens if i run from xcode or install it via testflight...
i can not provide access to code since its private project, and obviously its impossible to create reproducible snack, due to complexity of the project.. ..
i used to use 3.6.x version of reanimated, upgraded to latest 3.9 today but still getting same error.
here is the stack :
Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
#0 0x0000000104aa7204 in -[REAAnimationsManager clearSharedTransitionConfigForTag:] at /Users/levancho/dev/xxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REAAnimationsManager.m:622
#1 0x0000000104aec014 in -[REASharedTransitionManager clearAllSharedConfigsForViewTag:] at /Users/levancho/dev/xxxxxnode_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:743
#2 0x0000000104aec8dc in __51-[REASharedTransitionManager clearConfigForScreen:]_block_invoke at /Users/levancho/dev/xxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:818
#3 0x0000000104aa282c in REANodeFind at /Users/levancho/dev/xxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REAAnimationsManager.m:18
#4 0x0000000104aec850 in -[REASharedTransitionManager clearConfigForScreen:] at /Users/levancho/dev/xxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:817
#5 0x0000000104aeabf0 in -[REASharedTransitionManager runSharedTransitionForSharedViewsOnScreen:isInteractive:withOffsetX:withOffsetY:] at /Users/levancho/dev/xxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:578
#6 0x0000000104ae9ff0 in -[REASharedTransitionManager screenRemovedFromStack:withOffsetX:withOffsetY:] at /Users/levancho/dev/xxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:471
#7 0x0000000104ae9d4c in -[REASharedTransitionManager reanimated_viewIsAppearing:] at /Users/levancho/dev/xxxxxx/node_modules/react-native-reanimated/apple/LayoutReanimation/REASharedTransitionManager.m:442
#8 0x00000001a17fec38 in -[UIViewController __viewIsAppearing:skipWindowCheck:] ()
from react-native-reanimated.
downgrading to 2.17 solved the poblem for me.
from react-native-reanimated.
Workaround: import something from react-native-reanimated
so that the library gets initialized correctly
import Animated from 'react-native-reanimated';
console.log(Animated); // make sure to use the imported thing, otherwise the import will be optimized away
from react-native-reanimated.
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
from react-native-reanimated.
more investigative info I have is that, screen that seens to be crashing is using following animation code :
const animated = new Animated.Value(Dimensions.get('window').width);
const duration = 5000;
useEffect(() => {
Animated.timing(animated, {
toValue: 0,
duration: 500,
easing: Easing.linear,
useNativeDriver: true,
}).start();
}, [isNotificationSettingsAdded, isLocationPermissionGranted]);
but this code is very old and we have not touched it for a loooong time.
from react-native-reanimated.
same problem
from react-native-reanimated.
Having the same problem
Crashed: com.apple.main-thread
0 App 0x19aa78 -[REAAnimationsManager clearSharedTransitionConfigForTag:] + 622 (REAAnimationsManager.m:622)
1 App 0x1a627c -[REASharedTransitionManager clearAllSharedConfigsForViewTag:] + 743 (REASharedTransitionManager.m:743)
2 App 0x1a67b0 __51-[REASharedTransitionManager clearConfigForScreen:]_block_invoke + 818 (REASharedTransitionManager.m:818)
3 App 0x1980cc REANodeFind + 18 (REAAnimationsManager.m:18)
4 App 0x1a6774 -[REASharedTransitionManager clearConfigForScreen:] + 821 (REASharedTransitionManager.m:821)
5 App 0x1a55b4 -[REASharedTransitionManager runSharedTransitionForSharedViewsOnScreen:isInteractive:withOffsetX:withOffsetY:] + 582 (REASharedTransitionManager.m:582)
6 App 0x1a4ee8 -[REASharedTransitionManager screenRemovedFromStack:withOffsetX:withOffsetY:] + 486 (REASharedTransitionManager.m:486)
7 App 0x1a4d48 -[REASharedTransitionManager reanimated_viewIsAppearing:] + 442 (REASharedTransitionManager.m:442)
8 UIKitCore 0x13cd3c -[UIViewController __viewIsAppearing:skipWindowCheck:] + 148
9 UIKitCore 0x327b8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1076
10 QuartzCore 0x66aa8 CA::Layer::layout_if_needed(CA::Transaction*) + 500
11 QuartzCore 0x66630 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
12 QuartzCore 0x6cb60 CA::Context::commit_transaction(CA::Transaction*, double, double*) + 464
13 QuartzCore 0x65e3c CA::Transaction::commit() + 648
14 QuartzCore 0x65ae4 CA::Transaction::flush_as_runloop_observer(bool) + 88
15 UIKitCore 0xaaccc _UIApplicationFlushCATransaction + 52
16 UIKitCore 0xaa7e4 _UIUpdateSequenceRun + 84
17 UIKitCore 0xa9ed4 schedulerStepScheduledMainSection + 144
18 UIKitCore 0xa9f90 runloopSourceCallback + 92
19 CoreFoundation 0x3712c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
20 CoreFoundation 0x363a8 __CFRunLoopDoSource0 + 176
21 CoreFoundation 0x34b5c __CFRunLoopDoSources0 + 244
22 CoreFoundation 0x33898 __CFRunLoopRun + 828
23 CoreFoundation 0x33478 CFRunLoopRunSpecific + 608
24 GraphicsServices 0x34f8 GSEventRunModal + 164
25 UIKitCore 0x22c62c -[UIApplication _run] + 888
26 UIKitCore 0x22bc68 UIApplicationMain + 340
27 App 0x8184 main + 8 (main.m:8)
28 ??? 0x1bdb92dcc (Missing)
Reanimated version
3.9.0
React Native version
0.74
Platforms
iOS
from react-native-reanimated.
Same error here... crashes when navigating to other screens. I am not using this library, but its a dependency of react-native-reanimated-carousel, which I am also only using in one component deep down...
tmp fix => downgrading to ~3.8.1react-native-reanimated@^3.8.1: version "3.9.0"
Downgrade didn’t work for me, the app is still crashing while navigating.
from react-native-reanimated.
Same error here... crashes when navigating to other screens. I am not using this library, but its a dependency of react-native-reanimated-carousel, which I am also only using in one component deep down...
tmp fix => downgrading to ~3.8.1react-native-reanimated@^3.8.1: version "3.9.0"
Can confirm downgrading from 3.9.0 => ~3.8.1 worked.
from react-native-reanimated.
Downgrade didn’t work for me, the app is still crashing while navigating.
@KazakovVS try to remove and add node_modules folder and run bundle exec pod deintegrate && bundle exec pod install --repo-update
in ios folder
from react-native-reanimated.
Also happens for 3.10.0
Indeed react-native 0.74.0 is compatible with <=3.8.1 (iOS) and with >=3.9.0 (Android), which basically makes react-native 0.74.0 incompatible with the library
from react-native-reanimated.
doesn't ^3.8.1 also include 3.10.0?
from react-native-reanimated.
I also have the same issue. I'm not using expo, but I tried the suggestion of importing reanimated into index.js; this still didn't fix the problem.
from react-native-reanimated.
same problem !!!
"react-native": "^0.74.0",
so for ios this will work react-native-reanimated@^3.8.1
and for android this will work [email protected]
but this is not a solution can someone provide a better solution for this problem please
any update on this ?
also tried "3.10.0" and it is crash on ios
from react-native-reanimated.
I was able to reproduce this issue on 81c4130.
Recording
Screen.Recording.2024-05-05.at.14.28.27.mov
Steps to reproduce
- Install
@react-navigation/bottom-tabs
:
cd Example
yarn add @react-navigation/bottom-tabs
- Paste the following repro in
Example/App.tsx
:
Example/App.tsx
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import React from 'react';
const Stack = createNativeStackNavigator();
const Tab = createBottomTabNavigator();
function Feed() {
return null;
}
function Messages() {
return null;
}
function Profile() {
return null;
}
function Settings() {
return null;
}
function Home() {
return (
<Tab.Navigator>
<Tab.Screen name="Feed" component={Feed} />
<Tab.Screen name="Messages" component={Messages} />
</Tab.Navigator>
);
}
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Home"
component={Home}
options={{headerShown: false}}
/>
<Stack.Screen name="Profile" component={Profile} />
<Stack.Screen name="Settings" component={Settings} />
</Stack.Navigator>
</NavigationContainer>
);
}
- Navigate to second tab
- Navigate back to first tab
- Crash
from react-native-reanimated.
Bumped Example app to [email protected]
, still crashing
from react-native-reanimated.
@dan-trewin easy boi, this is open source software so instead of ranting open a PR and try to fix the issue.
i dont think he is ranting.. and as opposed to you, who acts like a cyber-judge he at least spent time on research and posted his findings here, and further more, your statment that its opensource means nothing... when library claims that its "better than native animation " , people trust that and when SHTF like this, you , the author first of all have to take the responsibility, so from that angle he is also correct ... so why dont you, instead of judging people go ahead and open a PR??
@levancho you definitely need to redefine the term open source in your head, specially the last paragraph of the MIT license.
from react-native-reanimated.
Related Issues (20)
- [Android-IOS] [3.11.0] Animation update incorrect when setState after set shared value HOT 5
- NodesManager causing an app crash because of the "Map already consumed" HOT 2
- error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension] HOT 3
- [Reanimated] Babel plugin exception: TypeError: (0 , types_12.cloneNode) is not a function HOT 1
- Unable to run on Android HOT 3
- ReferenceError: _updateDataSynchronously is not defined HOT 2
- [3.6.0] pod install error after upgrading 3.6.0 HOT 4
- Problems with react-native-reanimated v3.11.0 e react-native v 0.74.1 HOT 5
- Unable to resolve module ./publicGlobals HOT 4
- 【Bug】Modal displays incorrectly if use reanimated HOT 7
- [3.11.0] Plugin does not traverse node_modules, only the root of the project HOT 2
- Flickering in animation after updating react native HOT 11
- 1st item in an inverted list is no longer animated after a while with itemLayoutAnimation HOT 1
- expo 51.0.7 CRASH [TypeError: animatedRef.getTag is not a function (it is undefined)] HOT 3
- useAnimatedKeyboard break navigation color HOT 5
- Found Error TypeScript when run yarn tsc HOT 2
- Task :react-native-reanimated:buildCMakeRelWithDebInfo[armeabi-v7a] FAILED HOT 4
- Entering and/or layout animation flickering when SafeAreaView is a first parent of an animated component HOT 1
- > java.net.SocketException: Connection reset HOT 1
- iOS build faied: ld: Undefined symbols HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-reanimated.