React-native-screens: 2.0.0-alpha.5 breaks my tabbed stackview

Created on 21 Oct 2019  路  14Comments  路  Source: software-mansion/react-native-screens

Hiya,
I just updated from 2.0.0-alpha.4 to 2.0.0-alpha.5
and it breaks my current set up.

<BottomTabNavigator />
- <StackNavigator />
- <StackNavigator />
- <StackNavigator />
- ...

Switching the BottomTabBar main children works fine but after adding/opening a new StackView to open a deeper view it shows this blank screen. I can still do a swipe back gesture to go back to the previous screen.

Enclosed a quit dummy example video
RPReplay_Final1571660466.MP4.zip

FYI: Video is captured from a real iPhone7 device with iOS13.1

Versions:

...
    "react": "16.9.0",
    "react-native": "0.61.1",
    "react-native-reanimated": "^1.3.0",
    "react-navigation": "^4.0.10",
    "react-navigation-redux-helpers": "^3.0.2",
    "react-navigation-stack": "^1.7.3",
    "react-navigation-tabs": "^2.5.0",
...
Android bug

All 14 comments

I'm encountering same problem.

Can confirm this happens to me as well.

I haven't updated from alpha.4 to alpha.5 yet, but could this be due to the useScreens method that was changed to enableScreens?

I haven't updated from alpha.4 to alpha.5 yet, but could this be due to the useScreens method that was changed to enableScreens?

Have you tried the "enableScreens" call? no clue why but it says this functions isn't available even i can see it in the .ts an .js file?! But useScreens is still there as a proxy function

Not sure if this is helpful but if you downgrade from alpha-5 to alpha-4 without doing a pod install ist works fine fine even you do a new rebuild. I guess this could mean its a JS bug?

Can confirm a similar issue on Android, except on Android there is a white area on the nested stack child screen with the size of the bottom tab bar. Hopefully it helps to debug this issue. I can provide a snack to help with this.

Probably it should be fixed with this PR

Probably it should be fixed with this PR

well I'm still using useScreens() because enableScreens() did not work so unfortunately I think this will not fix this :/ ...but maybe I'm wrong

I can confirm that enableScreens() has been fixed in release 2.0.0-alpha.6 but the other issue about the nested stack screens still exists in Android.

@Psiiirus @AfrazHussain @andrerfneves @sebinq Yesterday I encountered the same issue with a nested StackNavigator's screens not being rendered. Except in some cases if it was the initial route of the initial tab.

I have left a comment here in another issue about how the problem was solved for me today: https://github.com/kmagiera/react-native-screens/issues/270#issuecomment-577368730

I am experiencing a similar issue, but only on Android (simulator and real device).
Here's what I've found:

2.3.0: This issue is only happening when I am "quickly" switching tabs.
2.4.0: Issue is now happening all the time.

Issue is gone if I remove enableScreens()

Deps are updated, I do not use Expo and Hermes is turned ON:

@react-navigation/[email protected]
@react-navigation/[email protected]
@react-navigation/[email protected]
@react-navigation/[email protected]

Here's some GIF to visualise the bug:

2.3.0

screens-2 3

2.4.0

screens-2 4

@kamui545 yes I have almost same setup as you (using v8 instead of hermes) and also the problem looks similiar: blank page and bottom-tabs still visible. It works for me with none of 2.X versions I tried. And since some of my transitions look flickering on Android with 1.0.0.alpha23 I will now remove enableScreens for Android, on iOS I have no problem. What I also notice when using an 2.0.0.alpha my app crashes on the back navigation where usually the blank page appears with following crash:

AndroidRuntime java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. AndroidRuntime at android.view.ViewGroup.addViewInner(ViewGroup.java:5106) AndroidRuntime at android.view.ViewGroup.addView(ViewGroup.java:4935)...

Could someone check if it is fixed with #496? And if not, can you provide a repo with minimal configuration needed to reproduce the bug?

I am closing it due to no response in more than 30 days. Feel free to comment to reopen it.

Was this page helpful?
0 / 5 - 0 ratings