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" in brand new example app after expo prebuild #457

Closed
jiehanzheng opened this issue Apr 4, 2023 · 7 comments · Fixed by #461
Closed

"Unmatched Route" in brand new example app after expo prebuild #457

jiehanzheng opened this issue Apr 4, 2023 · 7 comments · Fixed by #461

Comments

@jiehanzheng
Copy link

jiehanzheng commented Apr 4, 2023

Summary

Hello! I see the attached screen for a fresh install.

Immediately after expo prebuild, I notice that the app was opened using:

› Opening com.anonymous.examplerouterapp://expo-development-client/?url=http%3A%2F%2F192.168.11.137%3A8083 on iPhone 14 Pro

which maybe the Router doesn't understand?

image

Minimal reproducible example

Create new app:

npx create-expo-app@latest --example with-router
# name: example-router-app

Resulting package.json

✅ Works fine if I run using Expo Go:

cd example-router-app
npm run ios

In the app, tap touch app/index.js and router works fine.

❌ However, the pre-built app shows the Unmatched Route error:

npx expo prebuild
npx expo run:ios

Get the error above.

@EvanBacon
Copy link
Contributor

expo-development-client doesn't support deep linking, workaround coming soon

@shendric-lamar
Copy link

shendric-lamar commented Apr 19, 2023

I still have an issue when I try to follow this temporary hack.
When is try opening this link palau://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081%2F in the mobile web-browser on my iOs simulator, it opens the app successfully. However, when I try to open this link palau://expo-development-client/?url=http%3A%2F%2Flocalhost%3A8081%2Fapp%2Fauth%2Fsignup it gives me this error:
Simulator Screen Shot - iPhone 14 Pro Max - 2023-04-19 at 12 18 48

I have also tried without the /app part in my link as I am new to expo-router and not sure if I should add this.
This is my folder structure at the moment:
Screenshot 2023-04-19 at 12 23 42

The normal routing inside the app works as I am able to switch between screens.

Any ideas on how to surpass this?

@jstdk
Copy link

jstdk commented Jun 23, 2023

This issue also happens on Expo for Web. Worked yesterday, When I started coding today, first thing that happened is the UnMatched Route. No deeplinking, just a simple route from page a to b

Edit:
Error goes away when I remove the package import DocumentPicker from 'react-native-document-picker'. I had to use this because the Expo native Expo Document Picker crashes Supabase.

@sheltonkertich
Copy link

happened to me.
steps to reproduce the error

i had renamed my entry file to a custom name, thus showing the error.

reverting this fixed the issue. ie the very first file or entry screen in your app should be index.js/ts and not a custom name

@rohit20001221
Copy link

i dont know if this is the solution but this is a simple hack
for the [...unmatched].tsx you could redirect to home or login screen

https://youtu.be/RglRiycD0oQ?t=642

@Sushant206
Copy link

happened to me. steps to reproduce the error

i had renamed my entry file to a custom name, thus showing the error.

reverting this fixed the issue. ie the very first file or entry screen in your app should be index.js/ts and not a custom name

Man you really saved my day .

@OoDeLally
Copy link

happened to me. steps to reproduce the error

i had renamed my entry file to a custom name, thus showing the error.

reverting this fixed the issue. ie the very first file or entry screen in your app should be index.js/ts and not a custom name

I couldnt thank you more... The official tutorial https://docs.expo.dev/router/advanced/modals/ has zero mention of that, and I was turning around for hours...

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

Successfully merging a pull request may close this issue.

8 participants