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

"Unmatched route" when starting Android app #28621

Open
rubenwardy opened this issue May 4, 2024 · 8 comments
Open

"Unmatched route" when starting Android app #28621

rubenwardy opened this issue May 4, 2024 · 8 comments
Labels
needs review Issue is ready to be reviewed by a maintainer Router expo-router

Comments

@rubenwardy
Copy link

rubenwardy commented May 4, 2024

Minimal reproducible example

https://github.com/rubenwardy/expo-router-mre

Which package manager are you using? (Yarn is recommended)

npm

If the issue is web-related, please select the bundler (web.bundler in the app.json)

metro

Summary

Expected behaviour:

  • I build my app using npx expo run:android
  • When run:android opens the app or I tap the app on the pixel launcher
  • I see the index page

Actual behaviour

  • When I open the app, I see "Unmatched Route - page could not be found"
  • Clicking "go back" correctly goes to the index page

The app index is correctly shown when using Expo Go

image

Environment

expo-env-info 1.2.0 environment info:
System:
OS: Linux 6.8 EndeavourOS
Shell: 5.2.26 - /bin/bash
Binaries:
Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
Yarn: 1.22.22 - /usr/bin/yarn
npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
npmPackages:
expo: ~50.0.17 => 50.0.17
expo-router: ~3.4.10 => 3.4.10
react: 18.2.0 => 18.2.0
react-native: 0.73.6 => 0.73.6
Expo Workflow: bare

@rubenwardy rubenwardy added needs validation Issue needs to be validated Router expo-router labels May 4, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels May 4, 2024
@rubenwardy rubenwardy changed the title "Unmatched route" when starting Android app with src/app/index "Unmatched route" when starting Android app May 4, 2024
@rubenwardy
Copy link
Author

This still happens if I move the app folder from src/app to app.

Possibly related to #28515 and #28367

@rubenwardy
Copy link
Author

rubenwardy commented May 4, 2024

Possibly related (this doesn't have a fix though): expo/router#457

@rubenwardy
Copy link
Author

rubenwardy commented May 4, 2024

As a workaround, I've created a src/app/com.rubenwardy.expo_rater_mre:.jsx file. But I shouldn't need to do this (or at least this should be better documented in the guide)

import { Redirect } from "expo-router";

export default function RedirectToHome() {
	return (<Redirect href="/" />);
}

@raajnadar
Copy link
Contributor

I am facing the same issue, with the project where I get the QR code from the GitHub action for a PR, I will try to reproduce the bug in a public repo to display the error

@marklawlor
Copy link
Contributor

@raajnadar This is fixed in 3.5.0, which is available as part of the SDK51 beta

@marklawlor
Copy link
Contributor

@rubenwardy Can you please provide more description about your issue

I run the app

Can you provide more information about where you are running the app from? It appears you are opening a deeplink, how was this link generated (or which QR code are you using)

@raajnadar
Copy link
Contributor

I am facing the same issue, with the project where I get the QR code from the GitHub action for a PR, I will try to reproduce the bug in a public repo to display the error

I can confirm this bug is solved in Expo SDK 51 & expo router 3.5.0+

@rubenwardy
Copy link
Author

rubenwardy commented May 6, 2024

Can you provide more information about where you are running the app from? It appears you are opening a deeplink, how was this link generated (or which QR code are you using)

It happens both with run:android opening the app and when I tap the app icon on the pixel launcher. I'm not using deep links at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer Router expo-router
Projects
None yet
Development

No branches or pull requests

4 participants