Skip to content

useSearchParams() should be wrapped in a suspense boundary at page "/404". #61654

Answered by odafeaggreh
aseph8083 asked this question in Help
Discussion options

You must be logged in to vote

For me, the solution to the problem was a little hard to track down because I did not have useSearchParams() anywhere in my codebase. After much debugging, I found that the problem was from using next-nprogress-bar.

What worked for me was to wrap the ProgressBar in <Suspense></Suspense>

Code:

ProgressBarProvider.js

"use client";
import { AppProgressBar as ProgressBar } from "next-nprogress-bar";
const ProgressBarProvider = ({ children }) => {
  return (
    <>
      {children}
      <ProgressBar
        height="4px"
        color="#000000"
        options={{ showSpinner: false }}
        shallowRouting
      />
    </>
  );
};

export default ProgressBarProvider;

app/layout.js

<Suspense>

Replies: 22 comments 39 replies

Comment options

You must be logged in to vote
1 reply
@aseph8083
Comment options

Comment options

You must be logged in to vote
9 replies
@T1rth1
Comment options

@icyJoseph
Comment options

@AdventureBear
Comment options

@rfqma
Comment options

@jais-ravi
Comment options

Comment options

You must be logged in to vote
4 replies
@icyJoseph
Comment options

@immdraselkhan
Comment options

@Thistleman
Comment options

@AHMnesia
Comment options

Comment options

You must be logged in to vote
10 replies
@fenggwsx
Comment options

@Bunyod0301
Comment options

@contradeepak
Comment options

@moh3n007
Comment options

@Baqytbayev
Comment options

Answer selected by aseph8083
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@Lokesh01
Comment options

@kleenkanteen
Comment options

@abutalhasaqib
Comment options

@Thrinkxs
Comment options

@matsuyama-k1
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@rafadlis
Comment options

@AlecBlance
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jrnxf
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Thrinkxs
Comment options

@rafadlis
Comment options

Comment options

You must be logged in to vote
1 reply
@NatashaJWangui
Comment options

Comment options

You must be logged in to vote
1 reply
@irgiahmadm
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@irgiahmadm
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AurelieBlanc
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet