React-native-navigation: [V2] push new screen crash the app on android

Created on 5 Aug 2018  路  10Comments  路  Source: wix/react-native-navigation

Issue Description

this morning after updating to RNN to 2.0.2454 and 2.0.2456 can't push new screen
Navigation.push crash the app , but showModal works fine
the app close maybe crashs in android only ,iOS works fine

Steps to Reproduce / Code Snippets / Screenshots

A simple react-native init newProject with RNN v2.0.2456 as dependency

index.js
````
import { AppRegistry } from "react-native";
import App from "./App";
import Test from "./Test";
import { name as appName } from "./app.json";
import { Navigation } from "react-native-navigation";

Navigation.registerComponent(navigation.AppScreen, () => App);
Navigation.registerComponent(navigation.TestScreen, () => Test);

Navigation.events().registerAppLaunchedListener(() => {
Navigation.setRoot({
root: {
stack: {
id: "appStack",
options: {
// topBar: {
// visible: false
// }
},
children: [
{
component: {
id: "App",
name: "navigation.AppScreen",
passProps: {
text: "This is Test"
}
}
}
]
}
}
});
});

````

App.js
````
...
import { Navigation } from "react-native-navigation";

export default class App extends Component {
onPressLearnMore = async () => {
await Navigation.push("appStack", {
component: {
name: "navigation.TestScreen",
passProps: {
text: "Pushed screen"
},
options: {
topBar: {
title: {
text: "Pushed screen title"
}
}
}
}
});
};
render() {
return (

onPress={this.onPressLearnMore}
title="Learn More"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>

);
}
}

````
Test.js

export default class Test extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Page 2</Text>
      </View>
    );
  }
}

Environment

  • React Native Navigation version: 2.0.2456
  • React Native version: 0.56.0
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Device / 6.0 / Debug
Android acceptebug v2

Most helpful comment

Testing on v2.0.2452 works fine on android
Doesn't work starting from 2.0.2453 ==> 2.0.2456

All 10 comments

Logcat from Android studio

08-05 17:05:04.182 22688-22688/com.withredux E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.withredux, PID: 22688
    java.lang.IllegalStateException: Circular dependencies cannot exist in AnimatorSet
        at android.animation.AnimatorSet.sortNodes(AnimatorSet.java:922)
        at android.animation.AnimatorSet.start(AnimatorSet.java:540)
        at com.reactnativenavigation.anim.NavigationAnimator.push(NavigationAnimator.java:51)
        at com.reactnativenavigation.anim.NavigationAnimator.push(NavigationAnimator.java:33)
        at com.reactnativenavigation.viewcontrollers.stack.StackController.push(StackController.java:144)
        at com.reactnativenavigation.viewcontrollers.Navigator.lambda$push$0$Navigator(Navigator.java:134)
        at com.reactnativenavigation.viewcontrollers.Navigator$$Lambda$0.run(Unknown Source)
        at com.reactnativenavigation.viewcontrollers.ViewController.performOnParentStack(ViewController.java:136)
        at com.reactnativenavigation.viewcontrollers.ViewController.performOnParentStack(ViewController.java:147)
        at com.reactnativenavigation.viewcontrollers.Navigator.push(Navigator.java:133)
        at com.reactnativenavigation.react.NavigationModule.lambda$push$4$NavigationModule(NavigationModule.java:86)
        at com.reactnativenavigation.react.NavigationModule$$Lambda$4.run(Unknown Source)
        at android.os.Handler.handleCallback(Handler.java:815)
        at android.os.Handler.dispatchMessage(Handler.java:104)
        at android.os.Looper.loop(Looper.java:238)
        at android.app.ActivityThread.main(ActivityThread.java:6016)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:937)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:798)

Testing on v2.0.2452 works fine on android
Doesn't work starting from 2.0.2453 ==> 2.0.2456

Same issue here. The v 2.0.2459 is crashing with Navigator.push(). The v 2.0.2452 run fine

Related to SharedElement transition maybe, @guyca ?

yup its working on v 2.0.2459 thanks

Still not working on v 2.0.2460. Navigation.push crashing the app

The only recent change that seems relevant is (as @birkir presumably alluded to) https://github.com/wix/react-native-navigation/commit/bd4e42fadd4faa9829cacb7eae4b18861af7c2ad from @guyca

Testing on V2.0.2460, It's working fine on android 8.0 device
But doesn't working with android 6.0

Yes I can confirm that the Problem is with android 6.0

Hi, same problem with Android Emulator API 19 (4.4).
"react": "16.4.1",
"react-native": "0.56.0",
"react-native-navigation": "^2.0.2459",
Trace:
java.lang.IllegalStateException: Circular dependencies cannot exist in AnimatorSet
at android.animation.AnimatorSet.sortNodes(AnimatorSet.java:881)
at android.animation.AnimatorSet.start(AnimatorSet.java:517)
at com.reactnativenavigation.anim.NavigationAnimator.push(NavigationAnimator.java:51)
at com.reactnativenavigation.anim.NavigationAnimator.push(NavigationAnimator.java:33)
at com.reactnativenavigation.viewcontrollers.stack.StackController.push(StackController.java:144)
...

Was this page helpful?
0 / 5 - 0 ratings