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

When app is put in background and network is disconnected, white screen is displayed without any error #323

Open
lc3t35 opened this issue Aug 26, 2018 · 7 comments

Comments

@lc3t35
Copy link

lc3t35 commented Aug 26, 2018

Steps to reproduce :

  1. put your app in background
  2. open network prefs and disable all networks (as if you were in a tunnel without wifi or phone data network 3G/4G)
  3. call your app back -> a white screen is displayed

The main problem is how to debug that as when your disconnect your network, you don't have any more console log information (i'm using expo) nor debugger.
I'm trying to :

  • debug within XCode with USB plug, but as there is no error in libraries, unsuccessful for now
  • setup a github with meteor testbed and snack.expo.io project to reproduce the problem without my full app

If someone has an idea, we can discuss in the gitter Lobby.

@lc3t35
Copy link
Author

lc3t35 commented Aug 26, 2018

Here the snack so you can see the expected behaviour : https://snack.expo.io/@lc3t35/react-native-meteor-issue-323
0 - launch app with expo
1 - put your app in background
2 - open network prefs and disable all networks (as if you were in a tunnel without wifi or phone data network 3G/4G)
3 - call your app back, information is updated on screen, no white screen

@lc3t35
Copy link
Author

lc3t35 commented Aug 26, 2018

Rebuilding RNApp example and setup environment to reproduce the issue

  • migrate from createContainer to withTracker
  • upgrade to RN 0.55.2 -> Issue 323 #324
  • merge snack code with RNApp example

@lc3t35 lc3t35 mentioned this issue Aug 26, 2018
@edwin-n-johnson
Copy link

Have there been any insights to this problem?

I have the exact same issue, but not using expo. Definitely seems to be related to connectivity.

  • RN 0.55.4
  • react-native-meteor 1.3.0
  • redux 4.0.0
  • react-native-meteor-redux 2.2.5

Standard template using rn+meteor+redux+offline

const MyComponentContainer = withTracker(params => {
    GroundedMeteor.subscribe('subsId', 'myCollection');
    return {
        myCollection: GroundedMeteor.collection('myCollection', 'subsId').find({}),
    };
})(MyComponent);

function mapStateToProps(state) {
    return {
        user: state.meteorReducer.user,
    };
}

export default connect(mapStateToProps)(MyComponentContainer);

@lc3t35
Copy link
Author

lc3t35 commented Oct 12, 2018

@edwin-n-johnson As my app is detached, I confirm it also happens outside expo, I've just use expo here to quickly reproduce the problem.

@edwin-n-johnson
Copy link

Thanks @lc3t35. Have you made any progress finding the root cause? I'm curious as to why we are seeing it and not many others. And why are there no errors?

@vforvasile
Copy link

I think this may occur because rn-meteor relies on NetInfo API and NetInfo had some issue before becoming a standalone library.

@Akashdeep312
Copy link

Hey there , do we have any update on this , i am also facing the same issue

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

4 participants