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

Remix - Leaving page after nuqs URI manipulation gives a 404. #884

Open
geemanjs opened this issue Jan 30, 2025 · 2 comments
Open

Remix - Leaving page after nuqs URI manipulation gives a 404. #884

geemanjs opened this issue Jan 30, 2025 · 2 comments
Labels
adapters/remix Uses the Remix adapter bug Something isn't working cannot-reproduce Either no reproduction provided, or cannot reproduce with a minimal setup

Comments

@geemanjs
Copy link

geemanjs commented Jan 30, 2025

Context

What's your version of nuqs?

2.3.1

What framework are you using?

  • ✅ Remix

Which version of your framework are you using?

2.15.2

Description

404 returned after clicking on a Link after a page using nuqs has been loaded. It's relatively inconsistent but downgrading nuqs to 2.2.3 and the issue goes away. I would take a punt that nuqs is plugging into a listener / event and overwriting something that remix uses behind the scenes. I originally thought it was something to do with Lazy route discover as the issue manifests in a similar way to some of the remix errors being talked about others have seen. But I disabled this flag and the 404's kept on coming before realising it only happened after visiting a page where nuqs was in use.

On a unrelated note:
I also had issue with the change in behaviour between 2.2.3 and 2.3.0 of shallow:true/false with remix. It was basically a "breaking change" for remix apps in a "minor version" upgrade.

Reproduction

I'll work to try and do this - very busy this week - but thought I'd raise the issue here in case anyone else sees it. The solution for me was to downgrade nuqs 2.2.3 for now.

@geemanjs geemanjs added the bug Something isn't working label Jan 30, 2025
@franky47
Copy link
Member

franky47 commented Jan 30, 2025

Thanks for the report, is the page you are linking to also using nuqs or not at all? I'm going to try and replicate this on my end, although it would help to find a consistently reproducible case that I can e2e test against to avoid regressions.

I also had issue with the change in behaviour between 2.2.3 and 2.3.0 of shallow:true/false with remix. It was basically a "breaking change" for remix apps in a "minor version" upgrade.

This "breaking change" was a fix of an incorrect behaviour introduced in 2.0.0. Documentation states that updates with shallow: true (the default) are client-only and should not call the server, which wasn't the case when we first introduced Remix / React Router support.

@franky47 franky47 added adapters/remix Uses the Remix adapter cannot-reproduce Either no reproduction provided, or cannot reproduce with a minimal setup and removed cannot-reproduce Either no reproduction provided, or cannot reproduce with a minimal setup labels Jan 30, 2025
@franky47 franky47 added this to the 🪵 Backlog milestone Jan 30, 2025
franky47 added a commit that referenced this issue Jan 30, 2025
franky47 added a commit that referenced this issue Jan 30, 2025
@franky47
Copy link
Member

I can't immediately reproduce it in #885, feel free to review the differences if you find a reproducible case on your end.

@franky47 franky47 added the cannot-reproduce Either no reproduction provided, or cannot reproduce with a minimal setup label Jan 30, 2025
@franky47 franky47 removed this from the 🪵 Backlog milestone Jan 30, 2025
franky47 added a commit that referenced this issue Jan 30, 2025
franky47 added a commit that referenced this issue Jan 31, 2025
franky47 added a commit that referenced this issue Feb 1, 2025
franky47 added a commit that referenced this issue Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters/remix Uses the Remix adapter bug Something isn't working cannot-reproduce Either no reproduction provided, or cannot reproduce with a minimal setup
Projects
None yet
Development

No branches or pull requests

2 participants