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

404 error using revalidate and useFetcher with v3_lazyRouteDiscovery #10263

Open
ataias opened this issue Nov 22, 2024 · 2 comments
Open

404 error using revalidate and useFetcher with v3_lazyRouteDiscovery #10263

ataias opened this issue Nov 22, 2024 · 2 comments

Comments

@ataias
Copy link

ataias commented Nov 22, 2024

Reproduction

Calling revalidator.revalidate() as well as having a fetcher active trigger a "Not Found" error that does not seem catchable nor recoverable, even if the endpoint actually exists. You can see that happening in https://github.com/ataias/remix-use-fetcher-with-resource-route . Both dev mode and the production build suffer from the same issue.

System Info

System:
  OS: macOS 15.1.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 253.61 MB / 16.00 GB
  Shell: 3.7.1 - /opt/homebrew/bin/fish
Binaries:
  Node: 22.11.0 - /opt/homebrew/opt/node@22/bin/node
  npm: 10.9.0 - /opt/homebrew/opt/node@22/bin/npm
  pnpm: 8.6.9 - /opt/homebrew/bin/pnpm
  bun: 1.1.34 - /opt/homebrew/bin/bun
Browsers:
  Chrome: 131.0.6778.86
  Safari: 18.1.1
npmPackages:
  @remix-run/dev: 2.15.0 => 2.15.0 
  @remix-run/node: 2.15.0 => 2.15.0 
  @remix-run/react: 2.15.0 => 2.15.0 
  @remix-run/serve: 2.15.0 => 2.15.0 
  vite: ^5.1.0 => 5.4.11

Used Package Manager

npm

Expected Behavior

Opening the home page in repo https://github.com/ataias/remix-use-fetcher-with-resource-route should not hit the ErrorBoundary

Actual Behavior

Opening the home page in repo https://github.com/ataias/remix-use-fetcher-with-resource-route hits the error boundary with error No route matches URL "/en-br/api/hello-world-1?fetcher-1". However, the route exists.

@danielmoraes
Copy link

I can confirm that I am also experiencing this issue.

@joshbuddy
Copy link

I'm having a more flaky and tougher to reproduce issue which is when I have v3_lazyRouteDiscovery enabled I eventually get a 404 error from client-side routing. But I haven't nailed down a cause for this issue. I was hoping to find some sort of debug mode for the router to see what's going on inside there, but so far have been unable to find this option.

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

3 participants