React-native-navigation: Application ResPayUsers has not been registred.

Created on 3 Jun 2018  路  6Comments  路  Source: wix/react-native-navigation

React native navigation v2 issue.

My app starts with index.js and it is registered into AppDelegate as well. Here is the details:

import { AppRegistry } from 'react-native';

const { start } = require('./src/app');
start();

Here app.js:

const { Navigation } = require('react-native-navigation');
const { registerScreens } = require('./screens');
const { Platform } = require('react-native');

if (Platform.OS === 'android') {
    alert = (title) => {
        Navigation.showOverlay({
            component: {
                name: 'navigation.playground.alert',
                passProps: {
                    title
                },
                options: {
                    overlay: {
                        interceptTouchOutside: true
                    }
                }
            }
        });
    };
}

function start() {
    registerScreens();
    Navigation.events().registerAppLaunchedListener(() => {
        Navigation.setDefaultOptions({
            _animations: {
                startApp: {
                    y: {
                        from: 1000,
                        to: 0,
                        duration: 500,
                        interpolation: 'accelerate',
                    },
                    alpha: {
                        from: 0,
                        to: 1,
                        duration: 500,
                        interpolation: 'accelerate'
                    }
                },
                push: {
                    topBar: {
                        id: 'TEST',
                        alpha: {
                            from: 0,
                            to: 1,
                            duration: 500,
                            interpolation: 'accelerate'
                        }
                    },
                    bottomTabs: {
                        y: {
                            from: 1000,
                            to: 0,
                            duration: 500,
                            interpolation: 'decelerate',
                        },
                        alpha: {
                            from: 0,
                            to: 1,
                            duration: 500,
                            interpolation: 'decelerate'
                        }
                    },
                    bottomTabs: {
                        y: {
                            from: 1000,
                            to: 0,
                            duration: 500,
                            interpolation: 'decelerate',
                        },
                        alpha: {
                            from: 0,
                            to: 1,
                            duration: 500,
                            interpolation: 'decelerate'
                        }
                    },
                    content: {
                        y: {
                            from: 1000,
                            to: 0,
                            duration: 500,
                            interpolation: 'accelerate',
                        },
                        alpha: {
                            from: 0,
                            to: 1,
                            duration: 500,
                            interpolation: 'accelerate'
                        }
                    }
                },
                pop: {
                    topBar: {
                        id: 'TEST',
                        alpha: {
                            from: 1,
                            to: 0,
                            duration: 500,
                            interpolation: 'accelerate'
                        }
                    },
                    bottomTabs: {
                        y: {
                            from: 0,
                            to: 100,
                            duration: 500,
                            interpolation: 'accelerate',
                        },
                        alpha: {
                            from: 1,
                            to: 0,
                            duration: 500,
                            interpolation: 'accelerate'
                        }
                    },
                    bottomTabs: {
                        y: {
                            from: 0,
                            to: 100,
                            duration: 500,
                            interpolation: 'decelerate',
                        },
                        alpha: {
                            from: 1,
                            to: 0,
                            duration: 500,
                            interpolation: 'decelerate'
                        }
                    },
                    content: {
                        y: {
                            from: 0,
                            to: 1000,
                            duration: 500,
                            interpolation: 'decelerate',
                        },
                        alpha: {
                            from: 1,
                            to: 0,
                            duration: 500,
                            interpolation: 'decelerate'
                        }
                    }
                }
            }
        });

        Navigation.setRoot({
            root: {
                stack: {
                    id: 'TEST',
                    children: [
                        {
                            component: {
                                name: 'rp.welcome'
                            }
                        }
                    ]
                }
            }
        });
    });
}

module.exports = {
    start
};

Here is the screen registration:

const { Navigation } = require('react-native-navigation');
const WelcomeScreen = require('./WelcomeScreen');
const Authentication = require('./Authentication').default;
const Tutorial = require('./Tutorial');

function registerScreens() {
    Navigation.registerComponent(`rp.welcome`, () => WelcomeScreen);
    Navigation.registerComponent(`rp.tutorial`, ()=>Tutorial);
    Navigation.registerComponent(`rp.authentication.super`,()=> Authentication);
}

module.exports = {
    registerScreens
};

Environment

"dependencies": {
    "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-navigation": "^2.0.2314",
    "react-native-video": "^2.1.1",
    "rn-viewpager": "^1.2.9"
  },

I am not sure what is wrong. Can someone please look and input your suggestions. Thanks

questiostack overflow

Most helpful comment

My problem in IOS was caused by the wrong settings in AppDelegate.m, please check the latest answer at https://stackoverflow.com/questions/50683866/application-has-not-been-registered-react-native-navigation-v2/51891382#51891382

All 6 comments

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the react-native-navigation tag.

I'm also running into this as well. Why is this closed?

ANYBODY using the lastest v2 in this last month will find Navigation.events().registerAppLaunchedListener is not compatible with latest react native. I am trying some versions and looking into the issue. Would be nice if a maintainer would step in and at least clue in other members of the community as this is a very critical dependency... and v2 is written with contributors in mind :)

This issue should most definitely not be closed, it is persistent, repeatable, and the issue is a legitimate bug in the software not a user misunderstanding.

I was also having this issue, and solved it by updating to babel-preset-react-native: "5.0.2".

It is now working with these versions of dependencies:

"dependencies": {
    "react": "16.4.1",
    "react-native": "0.56.0-rc.5",
    "react-native-navigation": "^2.0.2452",
},
"devDependencies": {
   "babel-preset-react-native": "5.0.2",
},

My problem in IOS was caused by the wrong settings in AppDelegate.m, please check the latest answer at https://stackoverflow.com/questions/50683866/application-has-not-been-registered-react-native-navigation-v2/51891382#51891382

@stonecold123 thank you so much for the reference. I had the incorrect AppDelegate.m file as well.

The IOS instructions in https://wix.github.io/react-native-navigation/v2/#/docs/Installing should stress that these rootView related lines must be removed.

Totally agree here.

Was this page helpful?
0 / 5 - 0 ratings