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

"Invariant failed: No match found..." logged in the console with the touch device #3859

Open
maxicasa opened this issue Mar 26, 2025 · 1 comment

Comments

@maxicasa
Copy link

maxicasa commented Mar 26, 2025

Which project does this relate to?

Router

Describe the bug

If you activate the touch device (open dev tools in chrome and click on toggle device toolbar) and click on the <Link> button a warning will be logged in the console.

Error: Invariant failed: Could not find match for from: /about
....
Error preloading route! ☝️

Your Example Website or App

https://stackblitz.com/github/tanstack/router/tree/main/examples/react/quickstart-file-based?file=src%2Froutes%2F__root.tsx

Steps to Reproduce the Bug or Issue

  1. Open the link;
  2. Activate touch device and reload the page;
  3. Click the Home or About button;
  4. See the console.

Expected behavior

My expectation is that there is no warning in the console.

Screenshots or Videos

Image

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 134.0.6998.166 (Official Build) (arm64)

Additional context

No response

@GregPetropoulos
Copy link

GregPetropoulos commented Apr 5, 2025

I stumbled upon this while checking responsiveness viewports with chrome browser. I am guessing there is some viewport logic somewhere that drops the window location for some reason. I was unable to reproduce this in Safari.

Platform

  • OS: macOS
  • Browser: Chrome
  • Version 135.0.7049.42 (Official Build) (arm64)

I went ahead and ran the start-basic from here https://tanstack.com/start/latest/docs/framework/react/quick-start

  • When I spin up the start-basic on Chrome I can reproduce the error
  • The Stackblitz uses a virtual machine to spin up on Safari so there is no Error: Invariant failed: Could not find match for from: /about since it's Safari

In conclusion, this is a Chrome browser issue that does not place nice with tanstack in the mobile device view

  • I have tried setting the defaultPreload: 'viewport' thinking that would clear the error but to no avail.

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

No branches or pull requests

2 participants