Skip to content

fix not found stuck when navigating back with search params - #88802

Open
lpalmes wants to merge 3 commits into
canaryfrom
lpalmes/reset_not_found_on_back_navigation_with_search_params
Open

fix not found stuck when navigating back with search params#88802
lpalmes wants to merge 3 commits into
canaryfrom
lpalmes/reset_not_found_on_back_navigation_with_search_params

Conversation

@lpalmes

@lpalmes lpalmes commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Bug

Not found is stuck after triggering a notFound using search params, back navigation doesn't restore the previous page.

Reproduction case: https://repro-not-found-stuck-on-search-par.vercel.app/
Source Code: https://github.com/lpalmes/repro-not-found-stuck-on-search-params-back-navigation

Steps:

  • navigate to /
  • click a page that triggers a notFound(), for example /?page=12
  • click the back button
  • page is still stuck

Try with the /non-existent button and it works

Fix

Take into account the search params in HTTPAccessFallbackErrorBoundary to reset the boundary.
Added e2e test to avoid the regression.

@nextjs-bot

Copy link
Copy Markdown
Contributor

Allow CI Workflow Run

  • approve CI run for commit: 290cfea

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@nextjs-bot

nextjs-bot commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Allow CI Workflow Run

  • approve CI run for commit: eaa5036

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@timneutkens timneutkens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me. @acdlite can you give it a review too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants