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

navigation.replace creating blank white screen #11311

Closed
1 of 11 tasks
sgarchavada opened this issue Mar 30, 2023 · 12 comments
Closed
1 of 11 tasks

navigation.replace creating blank white screen #11311

sgarchavada opened this issue Mar 30, 2023 · 12 comments

Comments

@sgarchavada
Copy link

sgarchavada commented Mar 30, 2023

Current behavior

when I try to navigate to new screen using navigation.replace, I got blank white screen, if I navigate using navigation.push, then its works like charm. something is wrong with navigation.replace

Its say route does not exist when we use replace and same route will work with push.

Expected behavior

navigation.replace should remove current page and redirect to new page.

Reproduction

No repo

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-tab-view

Environment

  • [] I've removed the packages that I don't use

Note: I have write the package version which I am using in my project. rest I am not using it

package version
@react-navigation/native ^6.1.6
@react-navigation/bottom-tabs ^6.5.7
@react-navigation/drawer
@react-navigation/material-top-tabs
@react-navigation/stack
@react-navigation/native-stack ^6.9.12
react-native-safe-area-context ^4.5.0
react-native-screens ^3.20.0
react-native-gesture-handler
react-native-reanimated
react-native-tab-view
react-native-pager-view
react-native 0.71.4
expo
node 18.12.0
npm or yarn 1.22.19
@github-actions
Copy link

Hey @sgarchavada! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

A snack link is preferred since it's the easiest way to both create and share a repro. If it's not possible to create a repro using a snack, link to a GitHub repo under your username is a good alternative. Don't link to a branch or specific file etc. as it won't be detected.

Try to keep the repro as small as possible by narrowing down the minimal amount of code needed to reproduce the issue. Don't link to your entire project or a project containing code unrelated to the issue. See "How to create a Minimal, Reproducible Example" for more information.

You can edit your original issue to include a link to the repro, or leave it as a comment. The issue will be closed automatically after a while if you don't provide a repro.

@github-actions
Copy link

Couldn't find version numbers for the following packages in the issue:

  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • react-native-tab-view

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

@sgarchavada
Copy link
Author

Couldn't find version numbers for the following packages in the issue:

  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • react-native-tab-view

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

As I mention, I only write version name, which I am using in my project, I am not using this packages.

@sgarchavada
Copy link
Author

sgarchavada commented Mar 30, 2023

UPDATE:
I tried this too, but still same issue

navigation.dispatch(StackActions.replace('login'));

@sgarchavada
Copy link
Author

UPDATE: ISSUE RESOLVED
I found the culprit. In my case this library was causing the issue with navigation replace, so I removed and problem solved
react-native-document-picker
I dont know how its connected, but its working now, I think it somehow messing with pod of react-navigation

@sgarchavada
Copy link
Author

I am having this issue again, turns out it's not working in IOS because of new architecture.
RCT_NEW_ARCH_ENABLED=1 pod install.

If I simply use old architecture, its working fine. if I enable again it will not work.

@vinova-vito
Copy link

I am having this issue again, turns out it's not working in IOS because of new architecture. RCT_NEW_ARCH_ENABLED=1 pod install.

If I simply use old architecture, its working fine. if I enable again it will not work.

The same issue occurred here and using @react-navigation/stack did not result in this problem

@shreyas1328
Copy link

A work around is made from this thread: software-mansion/react-native-screens#1628 (comment)

@github-actions
Copy link

github-actions bot commented Jun 9, 2023

Hello 👋, this issue has been open for more than a month without a repro or any activity. If the issue is still present in the latest version, please provide a repro or leave a comment within 7 days to keep it open, otherwise it will be closed automatically. If you found a solution or workaround for the issue, please comment here for others to find. If this issue is critical for you, please consider sending a pull request to fix it.

@karimb11
Copy link

karimb11 commented Mar 3, 2024

This issue is still occurring as of the latest versions of both react-native and react-navigation.

Copy link

github-actions bot commented Mar 3, 2024

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

@zvici
Copy link

zvici commented Apr 19, 2024

I am having this issue again, turns out it's not working in IOS because of new architecture. RCT_NEW_ARCH_ENABLED=1 pod install.

If I simply use old architecture, its working fine. if I enable again it will not work.

Do you have any solution yet?

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

No branches or pull requests

5 participants