Skip to content
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

AppRegistry.setWrapperComponentProvider not called : nothing rendered #44

Closed
kamiky opened this issue May 28, 2019 · 4 comments
Closed

Comments

@kamiky
Copy link

kamiky commented May 28, 2019

Hello,

i experience for 2 days now some weird behavior (nothing happens), it was working perfectly before.

i've tracked the issue : AppRegistry.setWrapperComponentProvider is not called at all.
const triggers = [] remains empty and nothing render

I dont think the issue is with react-native-root-sibling, as i said it was working before and i already had the last version.

I think it's deep in react or some side module having a side effect.
Would you have any idea what could cause that ?

"react-native": "0.57.8" (i can't upgrade this)
the only module changes i made was to reinstall lottie (it was already installed before though), tried to remove it and see what it does but nothing changes.

@sunnylqm
Copy link
Collaborator

Use break point to see why it's not called

@kamiky
Copy link
Author

kamiky commented May 29, 2019

Ok so, after diving into react-native source code, i understood that AppRegistry.setWrapperComponentProvider is called twice, both with RootSiblingsWrapper but used by different modules :

node_modules/react-native-root-siblings/index.js
node_modules/react-native-popup-dialog/node_modules/react-native-root-siblings/index.js

I think the problem comes from here, everything is being called, AppContainer render RootSiblingsWrapper but not the instance i expect.

// logs
AppRegistry.setWrapperComponentProvider (AppRegister) function () {
      console.log('AppRegistry.setWrapperComponentProvider (siblings)');
      return function RootSiblingsWrapper(props) {
        console.log('RootSiblingsWrapper');
        return _react.defa…

AppRegistry.js:67 AppRegistry.setWrapperComponentProvider (AppRegister) function () {
    return function RootSiblingsWrapper(props) {
      return _react.default.createElement(_reactNative.View, {
        style: styles.container,
        __source: {
          fileName: _jsxFileN…

[EDIT]
confirmed by deleting manually node_modules/react-native-popup-dialog/node_modules/react-native-root-siblings/index.js, when i only have 1 instance of react-native-root-siblings everything shows up

@sunnylqm
Copy link
Collaborator

The latest version of react-native-root-siblings has a flag to check whether it is invoked twice. You and all your third parties should use the latest version. (Just delete node_modules and lock files and then reinstall may work)

@sunnylqm
Copy link
Collaborator

See #43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants