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
TypeError: Cannot read property 'props' of undefined #11113
Comments
Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link, a www.typescriptlang.org/play link or link to a GitHub repo under your username). Can you provide a minimal repro which demonstrates the issue? Please try to keep the repro as small as possible and make sure that we can run it without additional setup. A repro will help us debug the issue. The issue will be closed automatically after a while if you don't provide a repro. |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
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. |
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. |
I am facing a similar issue where we use initialState and then change the available routes underneath due to auth updates. The routes defined in the initialState didn't exist in the following updated structure, so it throws the error. It has more to do with handling the https://reactnavigation.org/docs/auth-flow/#removing-shared-screens-when-auth-state-changes |
lately i got the problem to... it appear on ios or android sometimes... i fixed it by clean data and cache (android) and reinstall app (ios) |
@rishabhmhjn Ya, I think that's what causing the error, did you find any workaround? |
i have the same issue. any solution for it? |
@focux apologies, I believe we did manage a workaround and released our app, but I cannot recall what we did on top of my mind now. I will update you as soon as I remember something related to it. |
Hi, in my case problem was initial navigation state that I was passing during the navigationContainer initialisation. Thanks |
Say we've two routes named Login and Welcome make sure the type RouteNames = "Login"|"Welcome" ✅
Wrong route name was leading to ❌ the aforementioned errors as there's no screen corresponding to SignUp name
|
Yep, that's was my problem as well, having a wrong route name on initial route name. |
In my case, I open my app by deep link like <Stack.Navigator initialRouteName="Home">
{isLogin ? (
<>
<Stack.Screen name="Home" component={Home} />
{/* some other routes */}
</>
) : (
<>
<Stack.Screen name="Login" component={Login} />
{/* some other routes */}
</>
)}
</Stack.Navigator> Yes, there is something wrong, when the user has login, the initialRouteName 🚀 change my code If someone wants to reproduce the problem, do the following:
hope this save someone's time!! |
Current behavior
In production from Sentry, I'm receiving error reporting from react-navigation.
According to report, it looks like it is only happening on IOS devices.
here is the most recent stack trace:
Expected behavior
props shouldn't be undefined in react-navigation
Reproduction
I'm not able to share repo publicly here, sorry
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: